How to install openHAB on Proxmox?

This is the manual way, without GUI, to passthrough a Zwave and Zigbee Stick to an LXC container using /dev/serial/by-id, rock solid since about 2 years.

root@pve:~# ls -l /dev/serial/by-id
insgesamt 0
lrwxrwxrwx 1 root root 13 Aug  9 08:19 usb-0658_0200_12345678-9012-3456-7890-123456789012-if00 -> ../../ttyACM0
lrwxrwxrwx 1 root root 13 Aug  9 08:19 usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_54aaead57b3bec11ae67a0957a0af07f-if00-port0 -> ../../ttyUSB0
root@pve:~# ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0  4. Sep 16:28 /dev/ttyUSB0

(Note down the three digit number behind the group: 188 in my case)

root@pve:~# ls -l /dev/ttyACM0
crw-rw---- 1 root dialout 166, 0 Aug  9 08:19 /dev/ttyACM0

(Note down the three digit number behind the group: 166 in my case)

root@pve:~# lsusb
Bus 001 Device 003: ID 0658:0200 Sigma Designs, Inc. Aeotec Z-Stick Gen5 (ZW090) - UZB
Bus 001 Device 002: ID 10c4:ea60 Silicon Labs CP210x UART Bridge

(Note down the vendor and product id’s: 0658:0200 for Zwave, 10c4:ea60 for Zigbee in my case)

Add the noted data to 98-persistent-local.rules:

nano /etc/udev/rules.d/98-persistent-local.rules :
#Zigbee Stick SONOFF
SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", SYMLINK+="ZIGBEE", MODE="0666"
#Zwave Stick
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0200", SYMLINK+="ZWAVE", MODE="0666"

Edit the Proxmox lxc config file (102.conf in my case) and use the noted data from above:

nano /etc/pve/lxc/102.conf :

lxc.cgroup.devices.allow: c 188:* rwm
lxc.mount.entry: /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_54aaead57b3bec11ae67a0957a0af07f-if00-port0 dev/ZIGBEE none bind,optional,create=file
lxc.cgroup.devices.allow: c 116:* rwm
lxc.mount.entry: /dev/serial/by-id/usb-0658_0200_12345678-9012-3456-7890-123456789012-if00 dev/ZWAVE none bind,optional,create=file

Restart the container to activate the changes. Good luck.

Thanks for that, I actually operated that way before and ran into issues and then switched to the GUI way of assigning the device. Both are driving me nuts.

When I restarted it took me about 2hrs to get it working again from multiple reboots/restarts/troubleshooting. Even rebooted my pve. I started building a VM to migrate to as last resort.

It’s weird, the device is being passed though no problem it seems to be something up with openhab connecting to the serial interface.. I find a clear-cache and complete shutdown&start of the lxc is more successful at getting the device to be picked up in OH. I haven’t narrowed it down to a guarantee fix just yet.

I looked at any possible locks being held or processes still holding onto /dev/ttyACM0 and it appears all good when OH cant find it.

A bit late to the party, but I too run openHAB in Proxmox (3 server cluster).
I was kind of forced to do so when my USB drive connected to RPi 4 (8GB) started failing on me. So at first it was a temporary solution, that has now been running for over a year :wink:

Currently openHAB is running on Debian Bookworm (using cloud-init)

  • used openhabian for installing openHAB
  • I use Proxmox Backup Server (PBS) for nighlty backups of my VM
  • I have had to restore the backup to another server, due to hardware failure once, but that took me less then 15 minutes to get up and running.

I am now looking into moving to an openHAB docker
On the Proxmox forums, it is advised not to run Dockers in an LXC, but I have never really seen an example of why that would fail. Most people run docker in lxc without issues. Yet I am opting for a VM.

  • VM based on Flatcar Container Linux
    (spinoff of Fedora Core, geared towards docker usage)
  • Again, planning on using PBS for backup purposed
  • Created (and still working on) scripts to fully automate deploying a vm with openHAB in a docker.
    As flatcar also runs on e.g. RPi I will be able to re-use the flatcar ignition files. This means I can have the exact same config running on a RPi without additional work, even restoring the actual openHAB data from PBS to the RPi
  • I have not automated adding the zigbee usb dongle yet
    The command to do so on proxmox is: qm set ${NewVMID} -usb0 host=1a86:55d4

For those interested, the scripts (including the ones for openhab): GitHub - ddt3/proxmox-flatcar

This appears 100% related to the device passthough to a proxmox LXC container. I ended up creating a second VM and adding the USB device to it and using ser2net to make the USB device available over ip via rfc2217. I initially made it accessible on the lxc container using socat, but to elimate another point of failure you can get zwave controller to connect directly to it.

On my VM that has the usb zwave dongle my ser2net.yaml has:

connection: &aeotecstick7
  accepter: telnet(rfc2217),tcp,4000
  enable: on
  options:
    banner: *banner
    kickolduser: true
    telnet-brk-on-sync: true
  connector: serialdev,
            /dev/ttyACM0,
            115200n81,local

and my zwave controller thing is configured as:

I might try elimating the dedicated VM for the dongle and see about intalling ser2net directly on the pve…

Even later to the game…
I am running OH on a VM in Proxmox (3 node cluster) for many years. Using debian and apt install to setup OH. Rock, rock solid. PBS for backups, and live migration was a lifesaver more than once.
I am not using docker, as I felt I do not need yet another layer of abstraction (and yet another layer to keep up-to-date), this just adds complexity for me, but maybe it is because I am not expert in any of this and with each layer of abstraction, trouble-shooting becomes more difficult for me.
I chose debian also because it super supported, solid. upgraded over several versions of OH and distro upgrades that way.
Openhabian is certainly now an enticing option, was not that applicable when I started and I wanted to learn more basics, so a manual install it is.

Now with openHAB 5 I also setup a Proxmox VM.

I setup a VM with Debian12, followed the steps under Linux documentation, installed Temurin Java 21, OH5 and restored the Backup of my OH4 setup.

After solving the health issues everything is running - as far as I was able to check at the moment.

What is not working is myopenhab.The system seems to be ONLINE:

image

Nevertheless, clicking on “Click here to access your openHAB’s dashboard” the next page is empty/white.

What steps am I missing? Since this work on OH4 without Proxmox I suspect a setting in Proxmox?

Try a different browser, just to make sure it’s not something to do with caching there.

Do the phone apps work when going through the cloud server (i.e. not on the LAN)?

This almost certainly does not have anything to do with Proxmox unless you’ve set up some complicated networking situation.

I using Chrome as standard. Tried it with Edge and installed Firefox for testing. Same white picture.

In the openHAB app (iphone version) I also see everything as long I am in the local net. Switching Wifi off and re-open the app I only get the white page.

Network: I think nothing fancy: Provider is the “Deutsche Telekom” via DSL. Router is a Fritxbox 5690Pro. The Proxmox-PC is connected through a Switch. openHAB is listed here as OH2025:

image

There are difference to the old situation: The IP and MAC changed and of course the virtualization with Proxmox is complete new.

I would like to give more information, but I don’t know what would be helpful.

  • The Fritzbox settings are standard, nothing fancy
  • The Proxmox node settings are standard. No firewall rules.

I try to reenter UUID and secret. Nothing new.

I read your post here and tried to ping myopenhab.org. This is NOT working:

image

myopenhab shows ONLINE and I can not ping it.

ping myopenhab.org

gives no result. Therefore, I tried:

ping google.de

This is working:

image

Pretty normal:

Ok. Didn’t know that.

Still, not working.

I am using a Proxmox VM, too, but unfortunately I have no idea how to help as I never encountered problems with myopenhab.org.

Check all your firewall settings (disable also the OS firewall temporary for testing) and make sure you have no firewall rules in Proxmox configured.

fw

There are a bunch of things that can be done networking wise in proxmox too which is why I asked. No plans or software defined networks or anytime like that.

This is odd behavior for sure and not wide spread out else in sure we would have dozens of posts.

But I don’t think it’s related to your running on proxmox specifically. That is unless there’s errors in the log.

I am using proxmox and myopenhab.org works fine. The only thing that doesn’t work is the floor plan part. Everything else works.

Here is my openhab server network on openhab so you can compare:

Screenshot from 2025-08-03 09-47-48

Thank you all for trying to help.

Seem that there is something unusual going on here. I tried the firewall topic mentioned:

I checked the network,

this is mine:

image

At the moment I think maybe it is an issue with the hardware. The network chip is no directly supported in the kernel. Therefore, I am using the driver from here: Motorcomm-YT6801/Proxmox - instruction.md at e45f2fca4d8bac6445d3ed98b2973b7c1e42eb35 · dante1613/Motorcomm-YT6801 · GitHub

It works - at the moment.

I noticed a short glimpse of the expected screen today. That made me think of a poor performance in this special case. The PC I am using only has a Intel N150. I use this PC for three VM’s: OMV, roon server and openHAB. For openHAB I thought 1 core should be enough. I fact I only reach myopenhab.org when giving 2 cores to the openhab VM.

I really think it has something to do with the hardware. I am not a Linux specialist. Is there a way to search for bottlenecks?

I found this also interesting. I installed the Systeminfo-Binding. You can clearly see the switch from OH4 on the old hardware (Intel NUC from 2018) to OH5 in a VM on the new hardware.

image

What is are the other servers running on proxmox?

If one it them is Debian then shut down the openHab server and install openHab on one of the other vm’s and restore your openHab backup on it.

That would free up a lot of resources on proxmox.

I am running a lot of services one Debian server rather than having individual vm’s.

Just a suggestion as it sounds like the hardware is lacking a bit.

This is absolutely something to think about.

On the old hardware I was doing this, just without virtualization and without OMV (OPENMEDIAVAULT).

The other server is roon (https://help.roonlabs.com/portal/en/kb/articles/linux-install). For this server I also need the omv (https://www.openmediavault.org/) server to copy music from my windows machine to the roon streaming server.

I want both (roon and oh) separated having no trouble with update to interfere. Also in the future I want to run roon rock (https://help.roonlabs.com/portal/en/kb/roon-labs-llc/advanced/roon-optimized-core-kit-rock) instead.