Where is the configuration file?

I am a bit puzzled. I tried using openhab2 with PaperUI but I would like to configure everything through a configuration file because it seems to be much more powerful. I don’t fear emacs :slight_smile:
However I am confused as I cannot find the main configuration file. Several docs state that it is in the conf directory, but there is nothing but other directors (and one of them contains openhab.cfg, as stated eg here: https://openhabdoc.readthedocs.io/de/latest/Beispiel/
I tried with the Beta Snapshot online distro.
Can someone help me?


You can find a overview of the file locations here:

Be aware that edits you perform in PaperUI will not be reflected in your config files but saved in a database. This confused me at the beginning.


Thank you Kenny.
But I still can’t find them. The location in the overview you cited simply shows to the directory where openhab2 gets installed. But there is no openhab.cfg there. In both the online and offline distros of the Beta snapshots (http://www.openhab.org/getting-started/downloads.html) there is no openhab.cfg or openhab_default.cfg. Neither in the main directory (where start.sh sits) nor in the conf directory or any subdirectory.
Indeed I tried with PaperUI but now I would like to do things in the cfg files, once I find them :slight_smile:

There is no openhab.cfg. That’s one of the changes with openHAB2. You can read about this here: http://docs.openhab.org/tutorials/migration

If you followed the instructions here and here you should be able to find your configuration folder at /etc/openhab2/ and can now start to configure your bindings and addons in services/addons.cfg and continue with creating your things and items. Have a look at this thread for some more hints.

Aaah that’s why… there’s a lot of documentation around that only regards 1.x. Now I understand a lot. Thank you for this important hint and for the links.
So there is no openhab2-wide configuration file anymore? Where do I then put settings like HTTP_PORT or so? Up to now, I changed it in the envir settings of karaf but it is quite annoying having to do that every time I install a new version particularly as it would accept HTTP_PORT from some config file - but from which one?

Not perfect but the currently best solution is to set up a custom port plus the important authentication following this guide: http://docs.openhab.org/configuration/nginx.html

Thank you Thom. I now played around with Openhab2 without using the PaperUI. I added my simplest bindings to services/addons.cfg by changing one line: binding = hue,miele.
After confirmation over the console in smarthome:inbox Openhab2 automatically created the right things and items, and I see them in the PaperUI. But now I am looking at the configuration files in things/ and items/ and cannot find anything. Do I have to create them by hand? Actually the “hue” and “miele” bindings don’t need a config file, but eg “serial” does need a configuration and other bindings as well.
Actually the best installation guide is the German openhab Documentation but unfortunately it only explains Openhab 1.x. Any idea who is responsible for it? I could try to add my own experience and base-level knowledge into it, so other people won’t ask the same questions (or at least not the German speaking ones).

What you are describing is a very common misconception about the way openHAB handles things and items.
Please read about this here:

In short: PaperUI and configuration files are two ways to manage your things+items. You can combine both (hue lamps in PaperUI, miele devices in file) but the openHAB system will never touch your configuration files. These are under your total control. You are in fact able to use the configuration files only and abandon the PaperUI completely. See:

In my personal humble opinion the better choice.

The documentation under https://openhabdoc.readthedocs.io/de/latest/Beispiel is indeed quite nice! We are actually trying to improve the english documentation as it will be able to reach way more users… If you want to improve the linked german document I believe here’s the project you can open an issue with your ideas.