OpenHAB on Ubuntu - change installation folder?

I installed yesterday from APT. I’ve got it all working, but it’s fairly deep in the usr folder where it’s installed.

Can I move my install? to the /opt folder as some people seem to use?

How would I go about this. Easy for me to move the files, but I can’t seem to find where the main path is set, or the openhab_home_dir variable.

When you install openHAB via apt-get, it puts the various parts of openHAB in the “proper” Debian/Ubuntu locations. So the binaries go in /usr/share/openhab, the logs go in /var/log/openhab, all your configurations go in /etc/openhab, and runtime data (e.g. embedded persistence files, zwave nodeX.xml files) go in /var/lib/openhab.

This is the proper Debian way of installation.

If you move these things around it will break apt-get upgrade so you will be cut off from automatic updates so the best you would be able to do is to use symbolic links to make it look like everything is in /opt/openhab or have everything in /opt/openhab but make it look like it is also in all the locations described above.

But if you have the technical skill and willingness to do that you may as well just do a manual install (i.e. download the zip, unpack it in /opt, and configure the openhab user and the start scripts so it runs as a service yourself).

But I must ask, why does it matter that the binaries are installed into /user/share? 99.9% of the time you are working with OH will be spent in /etc/openhab/configurations.

I take all your points. Much easier to just set up a samba share to the config directory and work there.