Zwavejs2mqtt + Podman

This forum has been a great resource with many people helping me out over the years, so I thought I would try to contribute back on something that took many hours of research. If you’re using Podman for your container management (I’m running Fedora 36), and need Z-wave support, you’ll likely end up putting together a command like this:

mkdir ~/store
podman run --rm -it -p 8091:8091 -p 3000:3000 -v ~/store:/usr/src/app/store:Z --device=/dev/serial/by-id/usb-XXXX:/dev/serial/by-id/usb-XXXX zwavejs/zwavejs2mqtt:latest

The container will launch, but upon connecting to the web and going into Settings > Zwave and setting serial port to the appropriate path (/dev/serial/by-id/usb-XXXX if you did the same as above) and hitting Save, you’ll soon notice Permission Denied errors near the top as the container doesn’t have access to the device.

/dev/serial/by-id/usb-XXXX is just a link to /dev/ttyACM0, which on my system was owned by root:root. So I changed that to root:dialout, then added my user to the dialout group.

Note: Logging out was for some reason insufficient to get the group privileges to show up, I had to completely reboot the system. You can check your current groups by just typing ‘groups’.

Then you need to add two parameters to the Podman command: --security-opt label=disable --group-add keep-groups

Final command:

podman run --rm -it -p 8091:8091 -p 3000:3000 -v ~/store:/usr/src/app/store:Z --security-opt label=disable --group-add keep-groups --device=/dev/serial/by-id/usb-XXXX:/dev/serial/by-id/usb-XXXX zwavejs/zwavejs2mqtt:latest

Hope this helps.

1 Like

that bit was super helpful. I couldn’t figure out why my volume was always empty, but it it makes sense now. Wish the quick start guide at had mentioned it.

What is the “Z” at the end for?

The Z is selinux stuff.