Setup in Docker

Using OctoPrint in a docker container? You need to do some slightly different config.

The plugin needs to be able to access 3 files to run. These are:

  • /boot/config.txt

  • /boot/commandline.txt

  • /proc/device-tree/model

It also needs access to the underlying hardware to drive the LEDs. To do this it will need to run privileged with docker.

This guide assumes you are using the official OctoPrint container and it's docker-compose.yml file.

Add the following mappings to docker-compose.yml under the volumes: section of the OctoPrint service

volumes:
 - octoprint:/octoprint
 - /boot/config.txt:/boot/config.txt
 - /boot/cmdline.txt:/boot/cmdline.txt

To enable access to the hardware to drive the LEDs, the container must be run privileged:

privileged: true

The final file should look something like this Gist: https://gist.github.com/cp2004/5e32b021fca66e7167039a1737fd7f21

Last updated

Was this helpful?