← How-Tos
raspberry-pi 3 days ago ◑ 8 views ◯ 6 min read

Running Multiple 3D Printers from One Raspberry Pi: Multi-Instance Klipper, Mainsail, and Moonraker

klippermulti-instancemainsailmoonrakerraspberry piprint farmkiauh

A single Raspberry Pi is more computing power than one 3D printer's Klipper firmware host actually needs, which raises an obvious question for anyone running more than one printer: why dedicate a whole Pi to each machine? Klipper, Moonraker, and Mainsail/Fluidd all support running multiple independent instances on one host, each with its own printer connection, own config, own web interface port, and own systemd service — letting a single Pi 4 or Pi 5 comfortably host two, three, or more printers depending on available USB ports and how much simultaneous print activity you expect. This guide covers the actual multi-instance setup, which is different enough from a single-printer install that following a standard single-instance guide and just repeating it will leave you with port conflicts and services stepping on each other.

Why This Isn't Just "Install Klipper Twice"

A standard single-instance Klipper/Moonraker/Mainsail install assumes it owns the whole Pi: default config paths, a fixed web server port (80 or 7125 for Moonraker's API), a single systemd service name, and a single serial/USB connection to the printer's board. Running a second printer from the same Pi means every one of those needs its own independent namespace — its own config directory, its own Moonraker port, its own systemd service, and a way to reliably identify which USB device belongs to which printer, since Linux's default /dev/ttyACM0-style naming isn't guaranteed to stay consistent across reboots once more than one board is plugged in.

Step 1: Use KIAUH's Multi-Instance Support Rather Than Doing It by Hand

KIAUH (Klipper Installation And Update Helper) has built-in support for installing additional Klipper/Moonraker instances alongside an existing one, and it's worth using rather than hand-rolling the systemd unit files and directory structure yourself — it handles the instance naming, port allocation, and service file generation consistently, which is exactly the part that's easy to get subtly wrong by hand.

cd ~
git clone https://github.com/dw-0/kiauh.git
cd kiauh
./kiauh.sh

From KIAUH's menu, choose the install option and, when prompted for the number of Klipper instances, specify how many printers you intend to run from this Pi. KIAUH creates separate instance directories (typically named printer_1, printer_2, and so on, or custom names if you specify them) each with their own config, log, and systemd service.

Step 2: Give Each Printer a Stable Device Path

This is the step most multi-instance problems trace back to. By default, Linux assigns /dev/ttyACM0, /dev/ttyACM1, and so on in whatever order devices happen to enumerate at boot — which is not guaranteed to stay consistent, especially after a power cycle or a USB hub replug. Instead, reference each printer's board by its persistent by-id path:

ls /dev/serial/by-id/

This lists stable identifiers (typically including the board's USB vendor/product ID and serial number) that stay consistent across reboots regardless of enumeration order. Use these paths — not the generic ttyACM# names — in each instance's printer.cfg under the [mcu] section:

[mcu]
serial: /dev/serial/by-id/usb-Klipper_rp2040_XXXXXXXXXXXXXXXX-if00

If two boards are physically identical models from the same vendor, check that their serial numbers actually differ in the by-id listing; most genuine boards have unique serials, but some clone boards have been known to ship with duplicate or missing serial identifiers, which breaks the by-id approach and needs a physical USB port-based workaround instead (referencing by USB bus/port path rather than by-id) if you hit this.

Step 3: Confirm Each Instance's Ports Don't Collide

Each Moonraker instance needs its own listening port, and each Mainsail/Fluidd web interface needs its own port as well, since only one process can bind to a given port on the Pi at a time. KIAUH's multi-instance installer assigns these automatically and sequentially (commonly something like 7125, 7126, 7127 for Moonraker instances, and corresponding web interface ports), but it's worth explicitly confirming the assigned ports in each instance's moonraker.conf rather than assuming:

[server]
port: 7125

and checking that each instance's value is unique before your first real test, since a port collision tends to manifest as one instance silently failing to start or one web interface showing stale/wrong data from a different printer, which is a more confusing failure mode to debug after the fact than catching it up front.

Step 4: Set Up Separate Web Interfaces

Install a Mainsail or Fluidd instance per printer (or per small group of printers if you prefer a combined dashboard approach via a tool built for that), each pointed at its corresponding Moonraker port. KIAUH's web interface installer supports this as part of the same multi-instance flow — when prompted, point each web interface installation at the matching Moonraker instance's port rather than accepting whatever default it suggests, since a mismatched pairing here results in a dashboard that looks fine but is actually showing and controlling the wrong printer.

Step 5: Check Resource Headroom Before Scaling Up

A Raspberry Pi 4 or 5 handles two to three Klipper instances comfortably under normal printing load, but each additional instance adds its own Klipper process, Moonraker process, and web server, all competing for the same CPU and memory. If you're running several printers simultaneously (not just several configured, but actually printing at the same time), monitor CPU load (htop is sufficient for a quick check) during concurrent prints rather than assuming headroom exists just because idle load looks fine — input shaping and other computation-heavy Klipper features add real per-instance CPU cost under active printing that idle monitoring won't reveal.

InstancesTypical Pi 4/5 Experience
2Comfortable headroom under normal concurrent printing on either board
3-4Generally fine on a Pi 4B/2GB+ or any Pi 5, worth monitoring CPU during simultaneous input-shaping-heavy prints
5+Consider whether a more powerful single host, or splitting across two Pis, serves you better than pushing one Pi further

Updating Multiple Instances

KIAUH's update function is instance-aware and can update all installed Klipper/Moonraker instances together, which matters because manually updating one instance's Klipper checkout while forgetting the others leaves them on inconsistent firmware versions — usually harmless, but worth avoiding as a matter of configuration hygiene, especially if you ever need to directly compare behavior between printers.

When Multi-Instance Isn't the Right Call

For a genuinely large print farm (a dozen or more printers), a single Pi hosting every instance becomes a single point of failure for the entire farm — one SD card corruption or one Pi hardware fault takes every printer offline simultaneously, not just one. Beyond a handful of printers, many print farm operators split instances across several Pis specifically to contain that blast radius, even though a single powerful host could technically handle the combined CPU load. For two to four printers in a home shop or small operation, though, one Pi running multiple well-configured instances is a practical, cost-effective setup that avoids buying and maintaining a separate single-board computer per machine.

The setup is more involved than a single-printer install specifically because every piece that a single-instance guide takes for granted — the device path, the port number, the service name — needs to be made explicit and unique per printer. Lean on KIAUH's multi-instance support rather than hand-building the directory structure, and verify device paths and ports explicitly rather than trusting default enumeration order, and the result is a genuinely reliable way to run a small fleet from one board.