Openhab in Docker Container on Openmediavault

Hello,

I’m currently planning a fresh install of OH on another hardware. I use a home server running openmediavualt with installed Docker and would like to use this machine for OH, too.

Are there any disadvantages on using OH inside a Docker container on openmediavault? My first thought was to set up another layer under OMV (e.g. Proxmox) and install all software as containers. But I have a stable system running now with OMV and already two smoothly working containers managed via compose/portainer. So I would rather keep that system if there is no important reason to switch.

Maybe anybody here has experiences with that kind of solution.

Thank you!

I have wxperience in running openHAB in a docker container on synology NAS. That worked really good but I have a need of having my OH machine in a specific room for best coverage for zwave.

I did even try the master slave configuration of openHAB som my rpi didn’t have to run all bindnings and scripts that worked good as well.

The one con that also could be pro is that upgrade was made by launcing a new containerbut you may endup with alot of binding/things configuration if you doesn’t have it all configured via files or good routine for backup.

That’s my experience for having it running for about two or three months.

This is standard for running anything in containers. The data (i.e. configs, userdata and conf folders in OH) are supposed to be mounted into the container as a volume so you don’t lose them on an upgrade.

You should lose nothing when upgraded if the container is properly configured.

Yes I get that and in one way it’s conveient to be able to just start a new clnatiner with a newer version and if you run into problem just stop that one and go back to the previous version.

But pay attention to setting up config folders outside the container, or whatever your specific configuration require.

That’s exactly what I’m saying. In openHAB’s case the userdata and conf folders should exist outside the container and be mounted in as volumes. That makes the data and config separated from the container and you lose nothing of you create a new container.

A lot of work has been put into the OH Docker Image to ensure that upgrades and downgrades happen smoothly and you never lose any data or config by switching to a new container. But that’s only possible if you’re on FB and userdata folders are volumes.

Thank you for your replies!

So does that mean, that I should use mounted volumes for the data folders? Is this the better way than using mounted host directories?

If you also use add-ons that use serial ports read this :point_right: Common Problems > OpenMediaVault

Either way is fine so long as the conf and userdata folders are mounted into the container. They can be Docker volumes or host folders. I believe the docs for the OH container show both ways.

Thank you for your help, I set up openhab inside a docker container using mounted host directorys for the config and userdata stuff. Running perfectly :slight_smile:

1 Like