Table of Contents

OctoPrint Server Setup on Linux Using OctoPrint Deploy

Author: mcnult1
Email: [email protected]
Date: Last modified on 06/26/2024
Keywords: OctoPrint, Linux, 3D Printing, Setup, Tutorial, OctoPrint Deploy, Networking, Server


Motivation and Audience

This tutorial's motivation is to help users set up multiple instances of OctoPrint on a Linux system using the OctoPrint Deploy script. Readers of this tutorial assume the following background and interests:


Original Work Credit

This tutorial is based on the original work by paukstelis OctoPrint Deploy GitHub Repository. For there setups, other operating systems, or to support the developer, please refer to the original documentation.


Table of Contents


Quick Start Guide

Prerequisites

What Does It Do?

octoprint_deploy is a script that makes installing multiple instances of OctoPrint easy. You do not have to edit any files as the entire script is guided to let you set up multiple instances exactly how you want them, just following simple prompts.

Requirements

octoprint_deploy only works on Linux systems. The only additional requirement is that the Linux system must use systemd (most of them do).

Note: For more details on supported Linux distributions, see the section Useful Information below.

Steps

  1. Install git
    sudo apt install git
  2. Clone the OctoPrint Deploy Repository
    git clone https://github.com/paukstelis/octoprint_deploy cd octoprint_deploy
  3. Run the Deployment Script
    sudo ./octoprint_deploy.sh
  4. Prepare System
    • Follow the on-screen instructions to prepare the system. This will install necessary packages, install OctoPrint, and prompt you to create the first instance.
    • > Note on Port Sensitivity: During udev detection, if your printer does not have a serial number (e.g., most Creality printers), it will be detected by the USB port you plugged it into. This makes the setup port-sensitive, meaning if you move the printer to a different USB port, you will need to set up a new instance. Printers with serial numbers do not have this issue. For more details, visit the OctoPrint Deploy GitHub Repository.
  5. Add Instance
    • Continue with the octoprint_deploy script, choose Add Instance, and follow the instructions. Add as many instances as you have printers, following the instructions.

paukstelis Wiki with Quick Start Guide


Detailed Deployment Guide

Step 1: System Preparation

  1. Install git
    sudo apt install git
  2. Clone the Repository
    git clone https://github.com/paukstelis/octoprint_deploy.git cd octoprint_deploy

Step 2: Run the Install Script

  1. Run the Install Script
    sudo ./octoprint_deploy.sh
  2. Configuration Prompt Follow the on-screen prompts to:
    • Register the OctoPi-created instance in octoprint_deploy.
    • Detect udev (only needed if you are adding multiple printers).
      • > Note on Port Sensitivity: During uev detection, if your printer does not have a serial number (e.g., most Creality printers), it will be detected by the USB port you plugged it into. This makes the setup port-sensitive, meaning if you move the printer to a different USB port, you will need to set up a new instance. Printers with serial numbers do not have this issue. For more details, visit the OctoPrint Deploy GitHub Repository.
    • Install a new streamer.
  3. Add Instances
    • Choose Add Instance and follow the instructions.
    • Use an existing instance as a template, if prompted.
    • Add as many instances as you have printers.

Useful Information

General Linux (Ubuntu/Mint/RPiOS/Debian/Fedora/Arch/etc.)

Additional Configuration

Useful Commands

Other features from commandline arguments:


Important Notes

Port Sensitivity

- Port Sensitivity: During udev detection, if your printer does not have a serial number (e.g., most Creality printers), it will be detected by the USB port you plugged it into. This makes the setup port-sensitive, meaning if you move the printer to a different USB port, you will need to set up a new instance. Printers with serial numbers do not have this issue. For more details, visit the Original GitHub Repository.

octoprint_deploy 1.0.11

These files provide a bash script for quickly deploying multiple octoprint instances on a single computer. For Linux systems (Ubuntu, Fedora, etc.) it will also install OctoPrint and a video streamer (ustreamer). No need for lots of file editing or complicated Docker compose scripts! A background video on how it generally works from my ERRF2022 talk can be found here: ERRF2022 talk video.

Note: Unfortunately, octoprint_deploy > 1.0.0 is not directly compatible with older versions, as so much has changed. If you want to use the new version of octoprint_deploy with an older setup, create backups (either with OctoPrint UI or with octoprint_deploy), then use the `remove` command line argument before updating octoprint_deploy. Re-make your instances using the same instance names, then recover your backups.


Additional Resources


Final Words

This tutorial's objective was to provide a comprehensive guide for setting up multiple instances of OctoPrint on Linux using OctoPrint Deploy. Complete setup instructions. Once the concepts were conveyed, the reader could efficiently set up and manage multiple 3D printers.

Speculating future work derived from this tutorial includes enhancing the setup with additional plugins, exploring automation scripts for maintenance, and integrating advanced monitoring tools. In the big picture, the problem of managing multiple 3D printers from a single server can be solved with this tutorial.

For questions, clarifications, etc., Email: [email protected]