When thinking about 3D printer upgrades, one of the first things that come to mind is remote control via OctoPrint or Klipper. The ability to keep an eye on the printer while you’re away from home unlocks a new set of possibilities (and gives you some peace of mind).
Both OctoPrint and Klipper require an external computer to work and communicate with the printer. Most users install them on a Raspberry Pi, which is a single-board computer (SBC for short). It’s small, cheap, efficient, and easy to program. Unfortunately, it is no secret that Raspberry Pis are nearly impossible to come by nowadays, primarily due to the ongoing chip shortage. Luckily for us, plenty of cheap alternatives (including drop-in replacements) are perfect for our purposes.
Sometimes it’s challenging to find an installation tutorial for a specific model. This article is a (more or less) universal step-by-step guide on how to run Klipper and OctoPrint on any SBC of your choice. Keep reading to find out how to do it yourself!
So what do OctoPrint and Klipper actually do? OctoPrint is a web control interface that runs on a separate computer. It interacts with a pre-existing machine firmware, like the ever-popular Marlin. It allows you to remotely give commands to your printer, as well as monitor the status of a job, even via a webcam’s video stream. You can access it from any browser on a PC connected to your home network.
Klipper, on the other hand, is standalone firmware that runs on the printer’s mainboard and a separate compute module. It’s also controlled and programmed via a web interface and offers a set of functionalities aimed at improving print speeds while reducing vibrations.
While they are both self-sufficient and independent from each other, you can set up OctoPrint’s interface to control Klipper. This is especially helpful for those who already have OctoPrint installed or aim at having everything displayed on the same page. If you don’t have a preference or are setting everything up for the first time, we suggest using one of the purpose-made interfaces instead. We will cover the procedure in the rest of this article, so stick around to find out more about the process.
While it might seem like a lot to handle, this guide doesn’t require any additional skill or knowledge. Plus, we’ll use well-known, well-documented tools with a standardized procedure. If you want to go more in-depth on any step, you can easily find the answer to your questions across several sources:
In this article, we’ll go over the following:
Let’s begin with the basics and go over what we’ll be using for this tutorial.
Although it’s possible to install OctoPrint or Klipper on any computer running Linux, a few requirements need to be met. This is to ensure a smooth experience without any hiccups or performance degradation. You can learn more from the official Klipper documentation.
Your computer will need the following hardware components to run OctoPrint or Klipper:
You will also need the following software features:
sudo
command to execute the installation utility. We’ll use the official Debian image for our Orange Pi 3 LTS, since it’s light and features a few tools that make the user experience easier. You can consult the list of OSes available for your board on the manufacturer’s product page.Now, let’s dive into the guide itself!
Once you retrieve and unpack the image file for the OS of your choice, you can use BalenaEtcher to flash it onto your SD. With the card plugged into the PC, follow the on-screen instructions to select the image file, the target SD card, and the flash.
Once finished, an additional step is required to tell the SBC to connect to Wi-Fi on startup. You can skip this step if you plan to connect via LAN (recommended) or use a monitor directly.
To do this, open the SD card folder, and update the files using the text editor of your choice. In the case of DietPi:
dietpi.txt
. Find AUTO_SETUP_NET_WIFI_ENABLED
and set to value 1.dietpi-wifi.txt
and set aWIFI_SSID[0]
to the name of your Wi-Fi network.dietpi-wifi.txt
, set aWIFI_KEY[0]
to the password of your Wi-Fi network.This procedure and target files vary from one OS to another but are always described in the first-step guides and manuals. Don’t be afraid to check for OS-specific instructions.
We’re now ready to insert the card into our SBC and power it on. The first boot might take a while. In case you’re using a monitor, you’ll probably see a lot of commands scrolling. Let it finish and do not power it off.
If you’re going to remotely access the board from another PC via LAN or Wi-Fi, you’re going to need its IP address.
You should now be remoted into your SBC. The window that you see now is a fully-fledged terminal that you can operate remotely. You can copy text simply by highlighting it, paste it with a right-click, and send a command by pressing enter. Remember, if you close PuTTY, you also close the terminal session and the ongoing processes with it. You’ll need to start over with everything you interrupted in a new session.
We can log in with the root username and password (in this case username: root, password: dietpi). These credentials are mentioned in the OS documentation. You can then follow the on-screen instructions to set up a new username and password.
Once you’re set, you can update your OS and packages to the latest version with the command sudo apt-get dist-upgrade -y
. Follow the on-screen instructions to proceed with the update. Once it’s finished (it will reboot itself), you can carry on installing Klipper.
To streamline the installation process, cut down on commands, and save time, we’re going to use KIAUH, the Klipper Installation And Update Helper. This tool is simple yet extremely effective. It incorporates scripts to automatize the installation of each component. From a single user input, it can install everything you’ll need. Let’s follow a simple 3-step process to install all the necessary packages and tools, directly from the command line. Remember, the steps are procedural. Don’t skip anything or execute them in a different order!
To start, we need to install the Git package. This will allow us to copy the GitHub repositories we need without opening a browser. Run the command sudo apt-get install git -y
and authorize with the system password.
Now that we have Git installed, we can copy the GitHub repository where KIAUH is stored:
cd ~
.git clone https://github.com/th33xitus/kiauh.git
../kiauh/kiauh.sh
.A new menu will now pop up. You can navigate it by entering the number corresponding to the submenu or function you want to execute.
From KIAUH you can also update, remove, change versions, and install every package, including KlipperScreen, Obico for Klipper (formerly Spaghetti Detective), the Telegram Bot, and the MJPG-Streamer for webcam streaming.
If you’re interested in using only OctoPrint without Klipper, you can skip steps 2-4 and refer to our guide on how to install OctoPrint.
After installing all the needed dependencies (Moonraker and a web interface of your choice), proceed with flashing the 3D printer’s mainboard. You won’t need to compile anything, as KIAUH will do everything for you. You only have to select the correct settings for your board. You can find a list of example configurations (with the recommended flashing settings at the top) in the Klipper repository. This will also come in handy later.
We’ll be using the BTT SKR Mini E3 V3 as an example. The config files recommend compiling for the STM32G0B1 with an “8KiB bootloader” and USB communication.
In KIAUH:
Now our firmware is ready to be flashed. We can do so in two ways, depending on what the config files suggest:
In our case, we’ll have to go with the second option. But first, we have to retrieve the firmware binary file we compiled and named klipper.bin. For this, we’ll need to remotely connect to our SBC via WinSCP:
Klipper is now up and running, but we’re not ready to print just yet. We still need to retrieve our MCU ID and create the config file.
Let’s check out how to configure it!
The MCU ID is a path that identifies a microcontroller with Klipper flashed on. The host-side application will use it as a reference for where to send the instructions when multiple devices are connected to the SBC. It needs to be included in the config files.
To retrieve your printer’s specific ID:
As discussed previously, every printer requires a configuration file that includes pin definitions, configurations, and the Klipper macros. Once you’ve found one that suits your needs, you can copy it entirely.
You can open the web interface by typing the IP address of your SBC in the browser’s search bar. In the control interface that pops up:
You’re now ready to restart the firmware and connect to your printer. Remember that if you made any modification, upgrade, or pin swap, you need to change the original printer.conf to reflect those changes. Refer to the Klipper Configuration Reference for a more detailed explanation.
If you like the interface, the plug-ins, or simply the feel, you can control Klipper via OctoPrint with a plug-in extension. You won’t need Mainsail or Fluidd, but you still need Moonraker. Note that this step is optional, as Klipper is designed to work independently from OctoPrint.
You can now control every aspect of Klipper from OctoPrint’s interface. Enjoy!
License: The text of "How to Install OctoPrint/Klipper on an SBC: Tutorial" by All3DP is licensed under a Creative Commons Attribution 4.0 International License.