For many 3D printers, files to be printed are uploaded either via an SD slot or a USB port. This means you have to, for example, stick an SD card into your computer, load the G-code onto it, and insert it into the 3D printer every time you want to print something. And a printer without an SD slot requires a computer to be tethered throughout printing.

With OctoPrint, there’s no such inconvenience. You can access your printer using Wi-Fi and carry out many tasks, such as uploading and starting prints, monitoring them through a live camera feed, recording time-lapses, controlling your printer, and much more! It’s a very popular tool among 3D printer enthusiasts that improves the user experience massively.

In this article, we’ll show you how to install OctoPi on one of the Raspberry Pi boards, some of the (if not the) most known and used single-board computers (SBCs). Once you’ve got OctoPi running, you’ll be able to add the variety of features and options that OctoPrint has to offer.

But before we start with the tutorial, let’s take a closer look at OctoPrint, what it has to offer, and what’s needed to install OctoPi.

Featured image of 10 Good Reasons to Use OctoPrint
1 Through 10, They're All Good
10 Good Reasons to Use OctoPrint

Back to Contents

OctoPrint Setup: How to Install OctoPi on a Raspberry Pi

OctoPrint

Image of: OctoPrint
There are many settings to tweak for OctoPrint – especially when plug-ins are added (Source: Charlie Powell via OctoPrint)

Before we get into how to set it up, what exactly is OctoPrint? To answer that question, here’s a list of things OctoPrint allows you to do:

  • Wirelessly upload G-code files from a computer to a 3D printer.
  • Bed visualization (if you have a BLTouch or a similar ABL tool)
  • Manually control a 3D printer (moving the X-, Y-, and Z-axes, as well as forcing extrusion)
  • Monitor print temperature and change print settings
  • Set up a webcam to view in a browser
  • Slice models using CuraEngine
  • Customize operation with numerous plug-ins (and you can even write them yourself!)

In our opinion, the most useful function of OctoPrint is the ability to remotely control your printers. Many printers come with clunky touchscreens or poorly designed user interfaces, making even basic tasks like homing the axes frustrating. OctoPrint’s intuitive web interface greatly simplifies using your printer, allowing you to focus on other stuff.

The various plug-ins made available through the Plugin Manager interface provide further functionalities, including custom time-lapse creation, external monitoring/control via smartphone, and even Telegram integration for remote monitoring.

As you can see, there’s plenty you can do with OctoPrint. Setting it up requires a bit of preparation, so let’s see what we need.

Back to Contents

Advertisement
Advertisement
OctoPrint Setup: How to Install OctoPi on a Raspberry Pi

What Do You Need?

Image of: What Do You Need?
A Raspberry Pi 3B+ running OctoPi (Source: Guybrish_threepwood via Reddit)

To get started with OctoPrint, here’s what you’ll need:

  • Raspberry Pi: OctoPrint strongly recommends the Raspberry Pi models 3B, 3B+, 4B, or Zero 2 W.
    • Raspberry Pi versions 1 and 2 are compatible with OctoPrint but not officially supported, and the Pi Zero and Zero W are “not recommended explicitly“. At time of writing, the Raspberry Pi 5 is also not supported.
    • Unsupported boards are prone to performance issues and can negatively affect the 3D printing process, so use them at your own risk. This tutorial will cover the installation on the recommended boards only.
  • Power adapter for the Pi: This item is usually overlooked, but it’s actually very important to ensure enough electrical power is provided to the board.
    • According to the official documentation, all models require a 5.1-V supply, but the power supply connection varies according to the model (Micro-USB for 3B/3B+ and Zero 2W, and USB Type-C for 4B). The electrical current also depends on the board model (2.5 A for 3B/3B+ and Zero 2W, and 3.0 A for 4B), and undervoltage during printing could cause performance issues, too.
    • A word of warning: Cheap phone chargers can’t supply enough current as required for the Raspberry Pi. So, it’s best to use a quality power adapter that is rated for 3 ampere at least. The official power adapter would be a good choice. In addition to that, a high quality USB cable should also be used to ensure proper power delivery.
  • Micro or full-size SD card: You’ll need whatever fits in your Pi (likely a MicroSD) and an SD adapter or USB card reader if your computer only takes full-size SD cards. Unless you’re planning to queue many prints through OctoPrint, an 8-GB card should be enough.
    • For users planning on making time-lapses regularly, a 16-GB or 32-GB card might be better suited.
  • USB cable: This connects the Raspberry Pi to the 3D printer. Keep in mind which connection your 3D printer has – USB Type-A, Type-B, Mini, or Micro. The Pi end is USB Type-A.
    • We also recommend putting tape on the 5V pin of your USB cable following this guide, to prevent your Raspberry Pi from trying to power the printer’s controller board accidentally. Many printers, such as the Ender 3 Pro (with 8-bit board), are known to cause many issues (e.g. undervoltage warnings, unstable Wi-Fi). Hence, this will help you avoid potential issues down the line.

Naturally, you’ll also need a 3D printer that works with OctoPrint.

Back to Contents

Advertisement
Advertisement
OctoPrint Setup: How to Install OctoPi on a Raspberry Pi

Flashing the OctoPi Image

The Raspberry Pi Imager downloads and installs the OctoPrint's image to the SD card
The Raspberry Pi Imager downloads and installs the OctoPrint's image to the SD card (Source: Lucas Carolo via All3DP)

The simplest way to run OctoPrint is by booting your Raspberry Pi with the OctoPi image. To get there, you’ll need a tool to flash your SD card. And for that, we recommend using the Raspberry Pi Imager, available for Windows, MacOS, and Linux.

Before we get started, please note that you won’t have to install OctoPrint separately after flashing the OctoPi image on your Raspberry Pi. It’s bundled with the OctoPi installation, so there’s no need to install anything else afterwards.

Here’s how to do it:

  1. Download and install the Raspberry Pi Imager from the Raspberry Pi Foundation.
  2. Insert your SD card into your computer or connect it using an adapter. There’s no need to format the SD card prior to this.
  3. Open the Raspberry Pi Imager and click on “Choose OS” under “Operating Systems”.
  4. Then go to “Other specific-purpose OS > 3D printing > OctoPi”. The latest version should be there.
  5. Click on the gear button in the bottom-right corner to open the “Advanced Options”.
  6. Add a system password under “Set username and password”. Make sure to keep the same username “pi” as this username and password are only for SHH connection, not for logging in to OctoPrint.
  7. Next, you can add the Wi-Fi settings for the Raspberry Pi. Click on the “Configure wireless LAN” checkbox and enter your network SSID and password.
  8. Select your country code at the dropdown menu on “Wireless LAN country”. Click “Save”.
  9. Back on the main window, click on “Choose Storage” and select the SD card.
  10. Click “Write” and the Raspberry Pi Imager will download and install the OctoPrint image.

Once installed, the software will run a quick verification, and you should be all set to go.

For additional guidance, check out Raspberry Pi’s YouTube tutorial.

Get the latest OctoPi release from GitHub
Get the latest OctoPi release from GitHub (Source: OctoPi via GitHub)

Alternatively, you can use Etcher, which is a free tool for Windows and MacOS. Here are the steps:

  1. Download the latest version of OctoPi from the GitHub repository (1.0 at time of writing).
  2. Unzip the downloaded image. You should have an image file ending in “.img”.
  3. Insert your SD card into your computer. Once again, there’s no need to format the card prior.
  4. Open up Etcher, select your SD card, select the OctoPi image, and click “Flash”.

Once it’s done, you’re good to go!

Back to Contents

Advertisement
Advertisement
OctoPrint Setup: How to Install OctoPi on a Raspberry Pi

Setting Up Wi-Fi

Ensure you uncomment your own country
Ensure you uncomment your own country (Source: Lucas Carolo via All3DP)

If you’ve already set up the Wi-Fi via the Raspberry Pi Imager, you can jump ahead to the “Connecting the Pi to Your Printer” section of this tutorial. Otherwise, follow along to configure your Wi-Fi information manually.

  1. If the Raspberry Pi Imager or Etcher ejected your SD card when it finished flashing, be sure to re-insert it into your computer.
  2. Open your SD card’s directory (usually named “boot”). It should be located wherever external drives usually show up.
  3. There’s a whole mish-mash of files in here, but don’t be intimidated. We’re looking for “octopi-wpa-supplicant.txt”.
  4. We’ll need to edit the file, but don’t use Notepad (on Windows) or TextEdit (on MacOS) to open it, as these may introduce additional issues. We recommend using Notepad++ for Windows users and Atom or Visual Studio Code (available on Windows as well) for MacOS users.

Back to Contents

Advertisement
Advertisement
OctoPrint Setup: How to Install OctoPi on a Raspberry Pi

Securing Communication

Accessing the Pi via SSH
Accessing the Pi via SSH (Source: Lucas Carolo via All3DP)

Every Raspberry Pi board comes with a default username and password for SSH access. As such, it’s highly recommended that you change the password to prevent others from connecting to your OctoPrint and controlling your 3D printer.

If you created a password using the Raspberry Pi Imager earlier, head to the next section. If not, let’s boot up the Pi and connect to it via SSH.

  1. Insert your SD card into the Pi’s slot. If a Wi-Fi adapter is required, make sure it’s connected to a USB port on the Pi.
  2. Power up the Pi by plugging in the power cable.
  3. Open CMD (Windows) or Terminal (macOS) and run ssh pi@octopi.local (or replace “octopi.local” with the IP address assigned by your router to the Raspberry Pi).
  4. If it returns “Are you sure you want to continue connecting (yes/no)?” type yes and hit Enter.
  5. Type in the default password for the Pi: raspberry. Hit Enter.

Now you should be logged into the Pi. To change the default password, do the following:

  1. Run sudo raspi-config. It should ask for the default password once more.
  2. The first option should be “Change User Password”. Hit Enter.
  3. Enter the new password twice.

That’s it! Now your instance of OctoPrint is protected. Use this new password whenever you wish to access the Pi through SSH.

Back to Contents

Advertisement
Advertisement
OctoPrint Setup: How to Install OctoPi on a Raspberry Pi

Connecting the Pi to Your Printer

Image of: Connecting the Pi to Your Printer
Setting the Pi up (Source: 4753spinnie via Printables)

It’s time to put all the pieces together. In this step, we’ll connect the Raspberry Pi to your 3D printer:

  1.  If you used the Raspberry Pi Imager for setting up the Wi-Fi and password, then insert your SD card into the Pi’s slot. If you changed the Pi’s password manually, then disconnect the board from power.
  2. Use a USB cable to connect the Pi to your 3D printer.
  3. Power up the Pi and your 3D printer.

Back to Contents

Advertisement
Advertisement
OctoPrint Setup: How to Install OctoPi on a Raspberry Pi

Setting Up the Interface

Printing is easy with OctoPrint
Printing is easy with OctoPrint (Source: Lucas Carolo via All3DP)

After the Pi boots up, you should be able to access OctoPrint through your local network.

  1. Type in “http://octopi.local” (or the IP address assigned by your router to the Pi) on any browser. Make sure your computer is connected to the same network as the Pi.
  2. You should see the OctoPrint interface and a setup wizard pop up. Follow along, and be sure to set up a username and password for OctoPrint. Note that this is not the same as the username and password you set up for your Raspberry Pi.
  3. Connect to your printer by opening up the Connection panel on the left. With the options set to “AUTO”, hit “Connect”. If this doesn’t work, try manually setting the serial port and baud rate until it does.

Finding the IP Address of the Raspberry Pi

The Terminal Method

In case “http://octopi.local” doesn’t work for you or you want to find the IP address of your Raspberry Pi to access it directly, you can simply retrieve it from the Pi itself – provided you have a display connected to it. Here’s how to do it:

  1. Turn on the Raspberry Pi and plug a keyboard and a mouse into it. Make sure it has connected to the Wi-Fi network successfully.
  2. Open the terminal on your Raspberry Pi (it should be open by default on OctoPi).
  3. Type “hostname -I” in the terminal and hit Enter.
  4. The first part of the output will contain your Pi’s IP address, separated by periods. For example: 192.xx.x.x (numbers in the place of “x”).

The Ping Method

If you don’t have a display for your Raspberry Pi, the ping method can come in useful. Follow these steps to use it:

  1. Make sure that the Raspberry Pi is powered on and connected to your Wi-Fi network.
  2. Connect another computer (it can be running Windows, MacOS, Linux) to the same Wi-Fi network.
  3. Open the terminal (MacOS, Linux) or command line (Windows) and enter “ping octopi.local”. If you changed the host name during or after installation, make sure to replace “octopi.local” with the actual host name. If you don’t remember changing anything, it’s probably “octopi.local” by default.
  4. As soon as you send the command, you should start seeing the IP address of your Raspberry Pi in the output. For example, 192.14.1.2.

If you want to explore more methods, feel free to check out this helpful guide on how to find your Raspberry Pi on your network.

Congratulations! You’ve successfully set up OctoPrint. In order to make your very first print through OctoPrint, click on the “Upload” button in the lower-left and select an already sliced G-code file. Once imported, all files will be present on a list in the “Files” panel. To start printing, click on the small printer icon. But that’s not all…

Getting Your Bearings

Image of:
The UI is easy to get to know and navigate (Source: camil300 via OctoPrint Community)

As you can see from the picture, there are also a few more tabs you can click on to navigate to different parts of OctoPrint. Let’s take a look at what they do:

  • Temperature (purple): This is where you can see the current temperature of your extruder and bed on a graph. You can also set corresponding target temperatures.
  • Control (blue): If you have a webcam connected to the Raspberry Pi, you can see the live video feed here. It’s also possible to give control-related commands to the printer, such as moving the X-, Y-, Z-axes, extruding and retracting filament, turning motors off, turning fans on or off, setting flow rate, and more.
  • GCode Viewer (orange): As the name suggests, this shows the current layer that is being printed. You can also skip forward or backward in the visualizer to see how the entire model will get printed.
  • Terminal (brown): Here you can enter G-code commands manually and they’ll be sent to the printer directly. For example, you could enter M115 and the current firmware version of the printer should be outputted back in the terminal.
  • Timelapse (pink): You can start or adjust the configurations for your time-lapse.

Not that hard, right? Now you’re free to explore all of OctoPrint’s functionalities and plug-ins!

Back to Contents

Advertisement
Advertisement
Advertisement