Please be aware of a big potential gotcha:
If you define parameters in a .cfg file, but later change the key or comment out the key (to the left of the = sign), the old key and value remains in the configuration stored in the server. This can wreak havoc and lead to many otherwise inexplicable problems. Users expect, quite reasonably, that the old key no longer mentioned in the .cfg file disappears from the configuration, but it doesn’t. This is particularly irksome when you use a 1.x binding like MQTT or the Weather binding that allows dynamically named keys, like myhouse.url=....
.
Under openHAB 1.x, every time you restarted the server, all old configuration data was wiped out and read fresh from openhab.cfg. That no longer happens in openHAB 2.
As Kai described here for HABPanel, the configurations that the server actually uses are inside the ${OPENHAB_USERDATA}/config directory tree. You can diagnose and even fix this gotcha by looking there.