- Platform information:
- Hardware: x86_64
- OS: Fedora 28
- Java Runtime Environment: OpenJDK 11
- openHAB version: 3.1.0
- Issue of the topic: All things and model is lost when openHab is restarted
I have a aotec z-wave stick, some z-wave dimmers, and a z-wave door lock.
Every time I restart openhab, I have to start over again from scratch, and add everything back in again.
My admin user is retained, though - I don’t have to go through the admin creation or the initial setup.
Where is the configuration saved?
What should I check?
I have tried tailing /var/log/messages while adding new things, and adding new rooms and equipment to the model, but nothing is printed there. Is there somewhere else I should check?
All configuration done through the UI is saved to $OH_USERDATA. The location of that folder depends on how OH is installed and on what system. I don’t know Fedora/Red Hat standards for where to locate things. In Debian it is /var/lib/openhab and I would assume it’s the same in Fedora.
In particular Things, Items, Rules, and Widgets are saved to /var/lib/openhab/jsondb.
However if running in a container, did you mount a volume to /openhab/userdata?
If manually installed it’s where ever you unzipped the files to; for example /srv/openhab/userdata.
It sounds a whole lot like you are running in Docker and did not mount a volume for userdata or you have a minimum writes configuration and /var/lib is a tmpfs folder that only exists in RAM.
Hi, Thanks for the response.
I’m not running in Docker, I just installed using the RPMs, as found on Download openHAB | openHAB
I see jsondb in /var/lib/openhab/jsondb as you mentioned.
I notice that all those files are owned by root, but openhab is running as non-root, so maybe that’s my issue.
After I changed the ownership to openhab:openhab, my things are being saved!
That might point to a bug in the RPM. All the files in userdata should be owned by openhab:openhab. Glad you got it working!