OctoPrint: Control Your 3D Printer Remotely with Raspberry Pi and OctoPi

Untether your printer!
30 minutes

Have you ever wanted to control and view your 3D printer from your web browser and print things remotely? Thanks to the amazing OctoPrint software library and a Raspberry Pi, you can!

What is OctoPrint?

OctoPrint is free, open-source software that allows you to remotely perform and monitor all aspects of your 3D printer using a Raspberry Pi computer. You can remotely load new prints, monitor your extruder temperature, turn your printer off and on, check the status of your prints, watch your prints with a live video feed, and more.

Interest mentioned here
h/pi 253 guides
The Raspberry Pi is a small, inexpensive computer developed by the Raspberry Pi Foundation in the United Kingdom.

Setting up OctoPrint is quick and easy. Let's get started!

Note: We have a separate guide for setting up and using Octoprint on the Ender 3 V2.

OctoPrint video

I created an OctoPrint video version of this guide as well if you'd like to check it out!

Watch the video:

Raspberry PiRaspberry Pi ×1
MicroSD card, 32GB ×1
MicroSD card reader ×1
Raspberry Pi cameraRaspberry Pi camera ×1
Raspberry Pi power supply, 2.5ARaspberry Pi power supply, 2.5A ×1
Short Micro USB to USB cableShort Micro USB to USB cable ×1
Raspberry Pi camera extension cable, 610mmRaspberry Pi camera extension cable, 610mm ×1

Howchoo is reader-supported. As an Amazon Associate, we may earn a small affiliate commission at no cost to you when you buy through our links.

Before you start, make sure that OctoPrint supports both your printer and Raspberry Pi model.

Does my printer work with OctoPrint?

Probably. OctoPrint works with most popular 3D printers. Check out the complete list of supported printers. Chances are your printer is on there.

Best Raspberry Pi for OctoPrint

It is recommended you use a Raspberry Pi 3 or 3+ to run OctoPrint since the cheaper Raspberry Pi Zero is not quite up to the task. In particular, the Zero can suffer from massive Wi-Fi interference, negatively impacting your prints. You can also use the Raspberry Pi 4 for OctoPrint, though I recommend adding a cooling fan since this particular model runs hot.

Flashing OctoPrint with Raspberry Pi Imager

The easiest way to set up OctoPrint on your Raspberry Pi is to use the OctoPi disk image, which is basically a full copy of a working OctoPrint installation. Download the OctoPi SD card image from the OctoPrint downloads page.

After downloading the image, we're going to burn (or "flash") it onto your Pi's Micro SD card.

Connect the SD card to your computer using a Micro SD card reader. Then, download and install Raspberry Pi Imager.

In Raspberry Pi Imager, click Choose OS, select Use Custom, and then locate the OctoPrint disk image you downloaded. Next, select your SD card, and click Write. The flashing process takes about 5 minutes.

Note: Alternatively, you can compile OctoPrint from source instead. This is useful if you plan on using the Pi simultaneously for something else (which is generally not recommended for performance reasons).

To connect your Raspberry Pi to wifi, we're going to edit a text file on the SD card. Etcher may automatically eject your SD card after flashing. If it did, disconnect and reconnect it to your computer.

Locate your SD card in Finder (MacOS) or Explorer (Windows). Then, open the octopi-wpa-supplicant.txt file in Notepad, Sublime Text, or another text editor. Do not use Microsoft Word, Wordpad, or any other "rich text" formatting program to edit the file.

Uncomment the lines below, and input your wifi network and password:

## WPA/WPA2 secured

If you're using a Raspberry Pi 3B+ or Raspberry Pi 4, you'll also need to uncomment or add your country code in that file:

# Uncomment the country your Pi is in to activate Wifi in RaspberryPi 3 B+ and above
# For full list see: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
#country=GB # United Kingdom
#country=CA # Canada
#country=DE # Germany
#country=FR # France
country=US # United States

Note: If your country isn't already listed above (e.g. Australia), find your 2-digit ISO 3166-1 country code from this Wikipedia article and use it instead.

Save and exit. Finally, safely eject the SD card, put it into your Pi, and connect your Pi's AC adapter.

For security reasons, I recommend you change your Raspberry Pi's default password.

*Note: if you're trying to shell into your Octoprint Raspberry Pi (Octopi) via Terminal, then you'll need to use the command

ssh pi@octopi.local
OctoPrint setup wizard

You can now connect to OctoPrint to view the OctoPrint interface. From your regular computer, make sure you're on the same network as your Pi, and then visit http://octopi.local in your web browser.

You can also access the SSL-encrypted version at https://octopi.local, though you'll need to accept the self-signed certificate.

OctoPrint configuration

After loading the OctoPrint interface in your browser, you will see the OctoPrint Setup Wizard:

Access Control

Use this to set a secure username and password for Access Control. Even if your printer will not be accessible from an external network, I recommend you set this up.

Online Connectivity Check

This will ping Google's DNS server periodically to ensure your Pi is online, aborting intensive operations if it is not. Enable it, and leave it at the default 15 minutes interval.

Plugin Blacklist

This setting prevents unsigned or potentially malicious plugins from being installed on your Pi. I recommend enabling this so that later you can discover amazing, safe, OctoPrint plugins.

OctoPrint printer profile setup

This part of the Setup Wizard is important. Enter the details for your printer.

If you aren't sure of your printer's specifications, open your normal slicing program (like Cura) to view the settings or do a quick Google search.

I'm using the Creality Ender 3 with OctoPrint and my settings are as follows:

Form factor: Rectangular
Origin: Lower Left
Heated Bed: Yes (checked)
Heated Chamber: No (unchecked)
Width: 220mm
Depth: 220mm
Height: 250mm
Axes: Default**
Custom Bounding Box: No (unchecked)
Nozzle Diameter: 0.4mm
Number of Extruders: 1

** The Axes setting is only used for manually controlling the printer -- as I slice my models before putting them into OctoPrint, I didn't bother filling this out. However, you can if you choose; remember the Axes speed settings are per minute, whereas the settings in most slicing programs are per second.

Note: If your printer is an Ender 3, I wrote a separate guide that covers using the Ender 3 with OctoPrint in greater detail. If you’re using the Ender 3 V2, check out our guide on using the Ender 3 V2 with OctoPrint instead!

Connect your Printer to OctoPrint (your Pi)

Now we can connect our Pi to our printer! Obviously, this will allow OctoPrint to send commands to and control your printer. To do this, you'll need to physically connect a USB cable from the Pi to your printer's USB port.

Your printer's USB port is normally located near the SD card slot. It might be a Micro USB port or, for some insane reason, a Mini USB port (the mushroom-shaped one). I have no idea why so many electronics still use Mini USB... Perhaps some factory made too many Mini USB ports 10 years ago. But I digress.

Using the appropriate cable, connect one of Pi's USB ports to your printer's USB port. Ensure the cable you use supports data (some cheaper cables only support charging). This is the Mini USB cable I used.

Next, under Connection Settings in OctoPrint, enter the appropriate settings from the OctoPrint wiki.

For the Creality Ender 3, the settings I used were:

Serial Port: /dev/ttyUSB0
Baudrate: AUTO

Be sure to check both "Save connection settings" and "Auto-connect on server startup".

OctoPrint camera

One of the most exciting things about using OctoPrint is live watching prints remotely and recording prints. So, let's hook up a Raspberry Pi camera. Of course, this is optional but highly recommended.

First, shut down and unplug your Pi. Do not attempt to connect the camera while your Pi is powered. Then, connect the camera to your Pi and reboot it. I recommend using the official Raspberry Pi camera, but certain USB webcams are also supported. Check out our full guide on the best cameras for OctoPrint!

You should now see the webcam streaming by visiting the OctoPrint Control tab: http://octopi.local/#control


If your video feed isn't working, make sure you connected it to the "CAMERA" (not "DISPLAY") port on the Pi. I made this mistake since they're identical. If it still isn't working, check to make sure your ribbon cable connections are good, facing the right direction, and that the tiny connector that plugs into the camera itself is seated properly.

OctoPrint parts: Raspberry Pi case, camera, and buck converter enclosure

I recommend printing the following parts for your OctoPrint setup:

  • Raspberry Pi camera mount
  • Raspberry Pi case/mount
  • LM2596 step-down converter case (if powering your Pi from the printer)

The exact models to use will vary for your printer, but you can find them by searching for your specific printer on Thingiverse.

If you’re using the Ender 3, you can find the parts list in this step.

All OctoPrint components mounted

My printer uses extruded aluminum rails, so I mounted my Pi using two M4x8mm bolts and M4 t-nuts. The camera model I found clips directly to the Z-axis stepper motor to give me a good side view of the extruder. Finally, I mounted my step-down converter on the back of my Ender 3 using foam tape.

Choose whatever mounting method works for you. Just keep in mind the distances between your cables and the extended Raspberry Pi camera cable -- and don't forget how long the camera cable is when the printer is fully extended in the Z-axis!

A buck converter powering the Raspberry Pi

While you can always power your Raspberry Pi using a normal Pi AC adapter such as this one, you can also power it directly from your 3D printer's power supply! This is handy for powering the Pi on only when the printer is on and creates an overall cleaner setup. Also, you can save money by not buying a separate AC adapter for your Pi.

Because this is totally optional and requires some soldering, I wrote a separate comprehensive guide to teach you how to power a Raspberry Pi from a 3D printer.

Note: With either approach, it's always important to shut down your Pi properly before disconnecting its power supply. You can do this through the OctoPrint interface or by adding a Raspberry Pi push button to shut it down.

Focusing OctoPrint Raspberry Pi camera

Now we need to focus the Pi camera so you'll have a nice clear video feed.

Open the Feed tab in the OctoPrint interface. Center your printer's bed, place an object in the center of it, and move your extruder just above it. This will simulate performing a print.

Your Pi camera came with a small white plastic adjustment wheel. Use this small adjustment wheel to turn the camera's lens a small amount at a time (maybe 1/16 of a turn). Check the feed periodically and stop when things are in focus.

You may need to try turning it in both directions. Be patient and you'll have a nice clear video feed!

You should never run your 3D printer when you aren't around to monitor it (read: fires and stuff). This is why the concept of OctoPrint centers largely around connecting to your 3D printer remotely over the same network.

However, if you're in a position where someone can monitor your printer for you and you want to connect to OctoPrint truly remotely -- from anywhere -- it is possible to set this up.

There are a number of ways to accomplish this, but the easiest method is to use the Spaghetti Detective plugin. I wrote a separate guide on setting up The Spaghetti Detective if you'd like to check it out!

OctoPrint dashboard

Import your first gcode file using the "Upload" button and send your first print to your new OctoPrint-enabled printer. Pat yourself on the back, you're done! Don't forget to update OctoPrint periodically to gain access to new features and bug fixes!

Next up: Add an OctoPrint touchscreen to your setup!

Watch the video:

Questions? Comments? Did I miss something?

I'd love to hear from you. Post in the comments section below :)

Keep an eye on your prints!
Ash Ash (362)
5 minutes

OctoPrint is a platform designed for the Raspberry Pi that makes it possible to monitor and control your 3D printer. If you want to watch what your printer is up to remotely, you'll need a camera.