This documentation provides step-by-step instructions to install OctoPrint on a Debian Buster system using the terminal. Please follow each step carefully.
This guide will assist you to install OctoPrint in systems other than Raspberry Pi, such as Orange Pi, Asus Tinker Board, ODROID, Banana Pi, PINE64, NanoPi, BeagleBone and much more.
TLDR: OctoPrint is free software for managing 3D printers remotely through a web browser.
- OctoPrint is an open-source, web-based 3D printer management and control software.
- It provides a user-friendly interface accessible through a web browser, allowing you to control and monitor your 3D printers remotely.
- You can upload 3D models, start and pause prints, and view progress and status in real-time.
- OctoPrint supports a wide range of 3D printers, making it compatible with various models and brands.
- It offers a plugin system that allows you to extend its functionality and add new features to customize your printing experience.
- It was developed with a focus on convenience and ease of use, OctoPrint has become a popular tool among 3D printing enthusiasts and professionals.
- Single Board Computer (SBC) of your choice (in this guide I will be using an Orange Pi 3 LTS)
- Good power supply for your SBC - keep in mind the camera may draw some additional power (I have a 5V 3A power supply)
- microSD + reader
- Mouse and Keyboard - for first setup only
- HDMI monitor and cable - for first setup only
- A stable internet connection, either Wi-Fi or cable
- Another computer to setup and access your SBC/OctoPrint
- Optional: Webcam for monitoring and creating timelapses.
- Operating System image for your SBC - you can get at your device manufacturer website (I will use Debian Bullseye for my Orange Pi 3 LTS)
- SD card flasher app (like balenaEtcher)
- SSH (Secure Shell) client to access your device remotely (like Putty)
- Optional: IP scanner to easily find and access your device (like Angry IP Scanner)
-
Use balenaEtcher to flash the OS image onto the microSD card.
-
Once the process is completed, insert the microSD card into your SBC.
-
Turn on your device and wait for it to boot.
-
Connect and use your mouse and keyboard to connect the device to the preferred Wi-Fi network.
On the upper right corner, you can click on the Ethernet icon to find the network.
-
Optional: Open Angry IP Scanner and click on 'Start' to search for the IP address of your SBC.
-
Open Putty, write the IP address of the device on the Host Name or IP address field and make sure you have selected SSH as the connection type. Click Open.
-
Log in with the username
root
and the passwordorangepi
. Attention: this step may vary from manufacturer to manufacturer, read the SBC manual for more info.
Alternatively, you may login via SSH to your device, run
orangepi-config
and connect to the desired Wi-Fi.
-
Add a new user and set a new password for it.
sudo adduser USERNAME
π© USERNAME is just a placeholder, you can change it
-
Grant Super User Do (sudo) permission
adduser USERNAME sudo
π© USERNAME is just a placeholder, remember to change it
-
Check if the user has sudo permission
id USERNAME
π© USERNAME is just a placeholder, remember to change it
-
Login on your new user
su USERNAME
π© USERNAME is just a placeholder, remember to change it
-
Download and install overall system updates
sudo apt update
Note: This might take a while.
After all packages have been downloaded, run the next command
sudo apt upgrade
Note: This might take a while.
-
Download and install Python
sudo apt install python3-pip python3-dev python3-setuptools python3-venv git libyaml-dev build-essential
-
Optional: Download and install other dependencies for using the webcam for timelapses and monitoring.
sudo apt-get install build-essential libjpeg62-turbo-dev imagemagick libv4l-dev cmake git -y libjpeg-dev
After all packages have been downloaded, run the next command
sudo apt install cmake
-
Go to your home directory (folder)
cd ~
-
Create a new directory and enter it
mkdir OctoPrint && cd OctoPrint
-
Configure a Python virtual environment
python3 -m venv venv source venv/bin/activate
You should see the (venv) on your terminal now if everything goes OK.
-
Install Python PIP (Preferred Installer Program)
sudo apt install python3-pip
-
Install Python setuptools and wheel
sudo pip3 install --upgrade pip setuptools wheel
-
Install OctoPrint
pip install --no-cache-dir octoprint
Note: the '--no-cache-dir' ensures you are installing the latest version of OctoPrint. Also, this might take a while.
-
Grant access to the serial ports for your user
sudo usermod -a -G tty USERNAME
USERNAME is just a placeholder, remember to change it
And then
sudo usermod -a -G dialout USERNAME
π© USERNAME is just a placeholder, remember to change it
-
Go inside the /OctoPrint/venv/bin/ folder and start the octoprint service
You may use
ls -la
to list the folder and files andcd FOLDERNAME
to access it.And run the command to start it.
octoprint serve
-
Configure the automatic start of the OctoPrint service (so that every time you boot your SBC, OctoPrint will turn on as well)
Go to system folder:
cd /etc/systemd/system/
Open a text editor:
sudo nano
Paste the following piece of code (and remember to change the USERNAME to your username):
[Unit] Description=The snappy web interface for your 3D printer After=network-online.target Wants=network-online.target [Service] Environment="LC_ALL=C.UTF-8" Environment="LANG=C.UTF-8" Type=exec User=USERNAME ExecStart=/home/USERNAME/OctoPrint/venv/bin/octoprint [Install] WantedBy=multi-user.target
Save as octoprint.service.
π© USERNAME is just a placeholder, remember to change it
sudo systemctl enable octoprint.service
To confirm everything worked correctly, you may go to
/etc/systemd/system/
directory and search for the octoprint.service. -
Now open a web browser on your computer and type the IP address of your SBC and add :5000 to the end of it (example http://192.168.5.8:5000/)
After going thru all the steps on OctoPrint's UI, making sure you configure it correctly with the print bed size and maximum height and nozzle diameter, you will see a screen similar to this.
-
Make sure you are inside your /home directory of the user you created - it should contain the OctoPrint folder as well. (Remember to use the
cd
andls -la
commands to go into folders and list their contents.Use
pwd
to check the current directory you are located. -
Create a new directory and enter it
mkdir ~/mjpg-streamer && cd ~/mjpg-streamer
-
Install mjpg-streamer using the following command
git clone https://github.com/jacksonliam/mjpg-streamer.git
-
Enter the folder that has been created
cd mjpg-streamer/mjpg-streamer-experimental
-
Install / compile the files
make sudo make install
-
Connect your webcam to the SBC and check if it has been detected.
lsusb
-
Install V4L2 utilities
sudo apt-get install v4l-utils
-
Reboot the system
shutdown -r now
-
Wait for the system to boot, enter with your user and password, then navigate inside the mjpg-streamer folders until you can see something similar to this.
-
Type the following command line and wait for the webcam to initialize.
Note: remember to change the /dev/video1 to your USB webcam number (also remember that the Device 002 would be video1 - always 1 number below).
sudo ./mjpg_streamer -i "input_uvc.so -n -r 1920x1080 -f 5 -q 100 -d /dev/video1" -o "output_http.so -w ./www"
- Now open a web browser on your computer and type the IP address of your SBC and add :8080/?action=stream to the end of it (example http://192.168.5.8::8080/?action=stream)
- Lastly, go to the OctoPrint tab on your browser and look for the 'Classic Webcam' setting under 'Plugins'.
Make sure to configure the Stream URL as per above mentioned IP address (example http://192.168.5.8::8080/?action=stream) and test it.
On the Snapshot URL use the following http://127.0.0.1:8080/?action=snapshot
and click on Test. You should see an image captured by the webcam.
They may be installed via the Plugin Manager on OctoPrint, the links below are for your reference only and to get more information about those plugins.
- Simple Emergency Stop
- OctoLapse
- Print Time Genius
- Arc Welder
- OctoPrint DashBoard
- OctoPrint Fullscreen
- OctoEverywhere
- Tab Order
- Themefy
Let me know if you have any doubts or comments :)
If you are feeling generous, you may buy me a coffee β (soon).
sudo pip3 install --upgrade pip setuptools wheel won't work. Without the 'sudo' it works perfect.