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. It works with almost every 3D printer to make controlling the process wireless and easy. Though certainly not a must, thousands of hobbyists love using OctoPrint to make their lives easier.

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.

Back to Contents

OctoPrint Setup: How to Install OctoPi on a Raspberry Pi

OctoPrint

Image of: OctoPrint
Filming a time-lapse is just one of the many capabilities of OctoPrint (Source: Brad Hochgesang via Plugin Repo)

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
  • 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!)

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
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“. Be aware that 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 Raspberry Pi website, 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 under-voltage during printing could cause performance issues, too.
  • Micro or full-size SD card: You’ll need whatever fits in your Pi (likely a MicroSD) and an SD adapter 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.

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

Back to Contents

Advertisement
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.

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.

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 (currently 0.18 or newer).
  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
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 have 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. For Windows users, open the file in Notepad. For MacOS users, open the file in TextEdit. (Under “Preferences”, select “Plain Text Format” and uncheck “Smart Quotes”.) Alternatively, you can open the file in text editors such as Atom or VSCode.

Here’s how to edit your Wi-Fi details and country code:

  1. Most Wi-Fi networks are WPA/WPA2 secured. In the first network block, remove the first ‘#’ from the four lines, as shown in the image above.
  2. Type in the Wi-Fi network’s name in the “ssid” line and the password in the “psk” line, keeping the quotation marks where they are.
    • If you want to let OctoPrint connect to multiple networks (e.g. home Wi-Fi and phone hotspot), simply copy and paste the network block (four lines) and fill in the details for the additional networks.
  3. Near the bottom, enter your country code. If you’re in the UK, this is already done for you. If not, you’ll have to enter a ‘#’ in front of the UK and remove the ‘#’ in front of the country where you are.
  4. Make sure that the blocks match the image above, especially with the ‘#’ locations matching up.
  5. Save the file and eject the SD card from your computer.

If you encounter any issues, be sure to check the official OctoPrint Wi-Fi setup FAQ, which also includes troubleshooting tips.

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.

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.

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

Back to Contents

Advertisement
Advertisement

License: The text of "OctoPrint Setup: How to Install OctoPi on a Raspberry Pi" by All3DP is licensed under a Creative Commons Attribution 4.0 International License.

Stay informed with notifications from All3DP.

You get a notification when a new article is published.

You can’t subscribe to updates from All3DP. Learn more… Subscribe to updates

You can’t subscribe to updates from All3DP. Learn more…

Advertisement