Having ordered my first 3D printer, I am giddy and preparing various things.
I have installed Octoprint on my home server as a Docker container, but when running it, it seems that it wants to have a serial connection to a printer. Octoprint expects to be running on a Raspberry that is connected via its serial interface.
What am I missing?
The printer I ordered (Prusa Mini) comes with a wifi dongle, so I guess there will be a way to reach it over the network. But that does not automagically mean Octoprint can work with it.
Docker is just the new apt
If you’re only using your computer for octoprint and it’s a pi, you should probably just install octopI on the thing as its os. I run octoprint on a couple orange pi zero’s, so I run it in docker. It also lets you easily use the computer for multiple things, and you can easily move your services from server to server with docker. Basically, unless you have a single use computer or something that makes docker rather difficult to use, docker is the way to go for hosting most things these days.
I guess you have some kind of linux based system of your home server. The USB connection to the printer will create a Serial Interface in your system under /dev. How it is called depends on the USB chip used in your printer, but often this is something like ttyUSB0.
So when connecting the printer you get the device file /dev/ttyUSB0 (or similar) on your home server (yes, the Serial interface is just a special file on that level). You can now mount this device file into the docker container like any other hostfile via the volume option.
Like docker run -v /dev/ttyUSB0:/dev/ttyUSB0 octoprint
or by using the volumes
key for your octoprint service in the docker-compose file, providing the same string as in the docker run command.
I think that should work, though I haven’t tested it.
Besides what other people are mentioning it is also excellent to use docker if you want to run multiple instances for multiple printers. I currently run 3 printers on a single mini pc that is also running octofarm for having a single entry point for all my printers
As you’ve already noticed, the default way to get Octoprint running is by running it on an RPi with OctoPi as its operating system and connecting that to your printer using a serial connection, which basically means connecting a USB cable in your case.
The docker container gets interesting if your home server is physically close enough to your printer that you can connect the printer directly. Then you can just mount the serial connection into the container and run Octoprint there, cutting out the need for a RPi.
As others already said, the Prusa Mini also has PrusaLink integrated into its , which is an alternative to Octoprint and only needs the printer connected to your network via Ethernet or Wi-Fi with the Wi-Fi upgrade.