Anyone recommend a OH2 Docker Container?

Hi OpenHABers

Does anyone have experience working with OpenHAB 2 based on a good Docker Container? I’d like to have a play. I’m interested in MQTT, Hue, Weather and HTML based content.

Any recommendations very welcome.

Thanks in advance.


I’d recommend to try - I am not sure if it is already adapted to the new Karaf packaging, though.

I used to use wetware’s openhab2 docker container, but it did not work with the switch to Karaf (and I don’t have time to fix it).

@christianjwaite created one which seems quite good to me, but I think it is still missing the startscript.

I think as soon Debian Packages are available it will be a lot easier with containers :slightly_smiling:

Yes I’ve struggled to find a reliable one - plus I’m using Docker on Synology NAS, which maybe complicating the matter.

Not an urgent project as 1.8 is working fine in the same environment. Would be nice to understand V2 - so any further experience would be really helpful.


Mine is just for me and a mate really so I can’t support it massively. But you’re welcome to try it, I have it running on UnRaid.

I’ll update it today to remove the link to zwave2 as it’s now in the master build. @cyberkov is right, I don’t have the startscript working, so you have to go in, set what you want installed (minimal, standard, demo etc) in one of the config files, launch it the first time manually, then you can generate and link in the startup script.

I would actually prefer being able to recommend you the one official docker container for openHAB. Unfortunately it does not exist :frowning:
As I think everybody will agree that this would be a valuable thing to have, I have just created and am hoping for the power of the community! “Mine is just for me and a mate” doesn’t really count :wink: If it works, share it! Others will enhance it, again others will help maintaining and supporting it.

1 Like

I agree Kai, I’m happy to share, I am just new to Dockers and feel that I don’t want to put out something that might cause people problems.
Here is the docker on Github:

Here it is on docker hub:

It’s public and I’m more than happy for people to use it and give feedback, or even better have a look and see where it can be improved. I’ll have a quick bash around today and remove/add some stuff to make it more ready.

If you know how to get it to initiate the first install without having to jump in and run and create the service, please let me know.


Thanks @christianjwaite. Have you checked whether anything from might be useful to include as well? At first sight, this seems to be further evolved already with some documentation and a couple of contributors. I’d suggest to do further discussion directly on, because this is where we can best reach the others that worked on Docker containers before.

Thanks Kai - that’s very helpful.

I guess that there will be many like Christian, who have spent time and have knowledge get to a useful container for their own requirement.

If this knowledge and effort could be combined to get something reliable, quick and easy to “spin up” and experiment - I think many more people would join in on the OpenHab journey.

I’ll have a look and get back when I can.

One thing i would especially love, would be the automated build feature from docker hub or integration of cloudbees Docker build and publish plugin (using it at my company, love it). This would definitely speed up updates of openhab :slightly_smiling:

It’s going to be necessary to have actually two images:

  • x86 - i personally would suggest basing it off java:openjdk-8-jdk since you’d already have a working java
  • arm - don’t know, any suggestions?

Pushing these two to the hub upon successful build should be easy with cloudbees plugin :slightly_smiling:

Thanks for taking on this subject :smiley:

Chhers Hannes

Yes, that would be great! Let’s continue the discussion over at GitHub. If you can bring in your experience on how to build it on Cloudbees, that would be perfect!

I think there have been some reports of strange behaviour using openHAB with openjdk, though I don’t know if this only relates to arm or x86 as well.

This is right, and we should prefer the OracleJDK. The WetwareLabs container uses that already (and so does the ARM port from armv7).

@SeaCider I created a Dockerfile based on the current PR for armhf which you can find here. Unfortunately my RPi2 is unusable atm and my Synology does not support Dockercontainers. I hope the Dockerfile helps for now, while I’ll try to get compile infrastructure for armhf :slightly_smiling:

I had a look at and the image hasn’t been updated in 6 months (on the hub), so I’m not sure if this is still maintained.


P.S.: Of course I would love to hear feedback on how this could be improved! I feel this would be an important step on getting openhab onto NASboxes and homeservers :slight_smile:

We have now an official Docker Image:

Comments, suggestions and contributions are welcome:



Thanks Chris, I will try this out on my Intel Synology (DSM 5.2)… Will feedback when I’ve had some tests completed. Thanks again for taking this on.




what about communicatioon with serial ports ?
anyone expierence with that in docker ?


I think this should work as written in the documentation. Just use --device to pass the port into the container.

Cheers Hannes

I was having problems getting device passthrough to work on the official docker with unRaid as my host system. Some digging around in the container eventually led me to realize the usb device (/dev/ttyUSB0) was being assigned to group id 16, which didn’t have a definition in /etc/groups.

I forked the container github and tested adding a group with id 16 and then assigning the openhab user to that group and it seemed to clear up the problem on my system so I submitted a pull request to make the changes to the official repo.

I’m mainly curious if anyone else is having any issues, since I realize this could potentially be specific to the unRaid implementation of docker.