I tried on docker but couldn’t get the USB Z wave to pass through. Simpler for me to let it live on the pi (until the SD card dies and I forget how any of the HA config works and have to do it all again)
To get USB devices working inside a container, you need to map the device into the container, which can be tricky—especially if you’re running rootless containers.
If you’re on Linux and want to avoid complicated setups with user namespaces, groups, or messing with udev rules, the easiest way to start is by manually recreating the device node inside a folder you control (like where your config is stored) using mknod.
For example, if your USB device is /dev/ttyUSB0:
Run
ls -l /dev/ttyUSB0
You should see output like:
crw-rw---- 1 root dialout 188, 0 Jan 1 1970 /dev/ttyUSB0
Note the major (188) and minor (0) numbers.
Change directory to the folder where you want to create the “clone” device node, then run:
sudo mknod -m 666 ttyUSB0 c 188 0
(Use the major/minor numbers from your device — they differ by device.)
This will create a device readable and writeable by anyone on the system so perhaps consider changing the mode from 666 to 660 and/or chown the file afterwards to your user and group. As I said, this is HACKY and not a secure solution.
You will now have a device file you can then pass into your container with the Docker/PODMAN option:
–device /path/to/your/folder/ttyUSB0:/dev/ttyUSB0
I realize this is a pretty hacky and insecure workaround—feel free to downvote or ignore if you want something cleaner. But it’s a quick way to get your USB device accessible inside the container to get started. Later on, you can look into proper handling with udev or other methods if security is important.
If you use Windows, you are on your own unfortunately, I do not have experience with podman/docker in Windows environments.
I tried on docker but couldn’t get the USB Z wave to pass through. Simpler for me to let it live on the pi (until the SD card dies and I forget how any of the HA config works and have to do it all again)
If you want a second attempt, this might help.
To get USB devices working inside a container, you need to map the device into the container, which can be tricky—especially if you’re running rootless containers.
If you’re on Linux and want to avoid complicated setups with user namespaces, groups, or messing with udev rules, the easiest way to start is by manually recreating the device node inside a folder you control (like where your config is stored) using mknod.
For example, if your USB device is /dev/ttyUSB0:
Run ls -l /dev/ttyUSB0 You should see output like: crw-rw---- 1 root dialout 188, 0 Jan 1 1970 /dev/ttyUSB0
Note the major (188) and minor (0) numbers.
Change directory to the folder where you want to create the “clone” device node, then run: sudo mknod -m 666 ttyUSB0 c 188 0 (Use the major/minor numbers from your device — they differ by device.) This will create a device readable and writeable by anyone on the system so perhaps consider changing the mode from 666 to 660 and/or chown the file afterwards to your user and group. As I said, this is HACKY and not a secure solution.
You will now have a device file you can then pass into your container with the Docker/PODMAN option: –device /path/to/your/folder/ttyUSB0:/dev/ttyUSB0
I realize this is a pretty hacky and insecure workaround—feel free to downvote or ignore if you want something cleaner. But it’s a quick way to get your USB device accessible inside the container to get started. Later on, you can look into proper handling with udev or other methods if security is important.
If you use Windows, you are on your own unfortunately, I do not have experience with podman/docker in Windows environments.
Pi 4 + USB-connected SSD with Home Assistant OS is the best way to run HA for the vast majority of people.
If you want to run other services beside HA and Add-Ons, you should be comfortable picking your own orchestration method and hardware.
That’s a good point - I think I have a USB SSD case somewhere