Building my Octopus’s Garden (in the shade)
I've mentioned before that the only thing stopping me from migrating my Home Assistant installation from a Raspberry Pi to my Proxmox server is fears around USB passthrough. According to my reading, accessing a USB device inside a Virtual Machine is trivial, whereas trying the same thing from a Linux Container needs more arcane configuration. The last thing I want is to sit in the dark trying to find the right file permissions incantation. So when my partner started sending me a bunch of Instagram Reels of cool 3D prints I thought I would learn the ins and outs of USB passthrough with a lower stakes use case.
I have a DIY Prusa i3 clone 3D printer - a bit long in the tooth but it still squeezes out hot plastic in pretty patterns so it's good enough for me. Previously I have used Repetier Server (on a Raspberry Pi, shocker) but I've heard some great things about OctoPrint, plus it is fully open source, so I thought I would give it a go.
I decided to install OctoPrint using docker, and seeing as this is the third LXC that I've needed to add docker to I opted to save future Miguel some time by creating an LXC template with docker pre-installed. Proxmox makes the process very simple: you create an LXC as usual, install whatever software you like on to it, then right click and choose Convert to template
. The only gotcha is that the container is "lost" in the process, but you can immediately recreate it by cloning the template again.

Once the container was running, installing Octoprint was a breeze so I plugged the printer in to my server, opened up the Octoprint web address, click Connect and was met with:

This was expected, but it would be a lie to say I hadn't hoped it would just magically work out of the box. My first attempt at getting the printer recognised was using this guide which involved finding the USB device (protip: disconnect the device, lsusb
, reconnect and lsusb
again instead of trying to figure out which USB controller name belongs to your device), finding a few IDs and then telling proxmox to mount the device to the container. What's actually going on under the hood is very interesting: everything in Unix is a file and this extends to USB devices. So my 3D printer's USB connection corresponds to the file /dev/bus/usb/001/007
. The Octoprint container is a completely separate world to the Proxmox host, so we need to mount that file in container. Proxmox provides another file for this, etc/pve/lxc/<container_id>.conf
and in here you can configure mounting the file, as well as cgroup rules which when combined, should make the USB device accessible inside the container. This did not work for me in practice. After doing a little more reading in the forums I realised that what I actually needed to mount was the tty device that automatically gets created for the 3D printer, because all it is really is a USB to serial converter. I amended my config to forward the tty (also a file, this time /dev/ttyACM0
) but still no luck on Octoprint. I suspect this is because I made an unprivileged container which means that even though the container could see the file, it wasn't allowed to read it. This was when I opted for the brute force approach just to make sure the setup could work at all and I ran chmod 666 /dev/ttyACM0
making the serial device accessible to every user on my system. Security: ❌ Success: ✅
I am writing this a few weeks later and I booted up the container again to make sure it was working and I was once again met with the "Could not autodetect" error. Rebooting the server and/or disconnecting the USB device will remove the file, removing my custom permissions, so I needed to rerun chmod 666 /dev/ttyACM0
to make it accessible again. Good thing I started with Octoprint, I will need to come up with a more sustainable approach for Home Assistant.
Now that the printer was accessible, I found an STL online that I liked, booted up PrusaSlicer and gave it a whirl. DIY 3D printers being what they are, the first results were a mess of bad adhesion, but luckily I had taken notes the last time I had printed and so I could run the magical command M206 Z0.4
through Octoprint to drop my hot-end (the hot plastic squirty bit) 0.4mm lower when printing. This was a grand success and 8 hours later I had a very flimsy pot cover that was too small to cover any of my pots. Oh well, I'm going to chalk that up in the W column in any case.
