Where Does openHAB Store Config and Userdata?
openHAB splits config across /etc/openhab for files and /var/lib/openhab for userdata on Linux repo installs. Back up both.
Last updated
openHAB keeps two trees and newcomers usually find only one. Text config you write by hand lives under /etc/openhab. Everything the runtime generates, including anything clicked together in the UI, lives under /var/lib/openhab. Logs sit in a third place.
Manual zip installs shift the roots to /opt/openhab/conf and /opt/openhab/userdata but keep the same split. Check Help and About in the web UI if unsure: it prints the resolved paths for your install.
Where openHAB stores this, by platform
/etc/openhab
Site config for repo installs: items, things, rules, sitemaps, services. This is the tree most people edit and version with git.
/var/lib/openhab
Runtime data: jsondb for UI-made config, persistence databases, backups. Missing this tree is why restores come back empty.
/var/log/openhab
Plain log files. Worth tailing when rules misbehave, but exclude from backups.
Frequently asked questions
How do I back up openHAB?
Copy /etc/openhab and /var/lib/openhab, or run openhab-cli backup. That script zips both trees into /var/lib/openhab/backups. Restore with openhab-cli restore on the new box.
Where is UI-made config versus file-based config?
Things and items made in the web UI land in /var/lib/openhab/jsondb as JSON. File-based items and rules live under /etc/openhab/items and friends. You need both trees for a full restore.
Notice an outdated path? Let us know.