AI & Agents

How to Build a Raspberry Pi Print Server with an OpenClaw Cloud Printing Agent

A Raspberry Pi running CUPS can turn any USB printer into a network-shared printer that every device in your house can reach. Adding an OpenClaw agent on top gives you cloud-accessible print queue monitoring, low-ink alerts, and job status notifications over Telegram. This guide walks through both layers, from the initial CUPS installation to a working print monitoring agent.

Fastio Editorial Team 15 min read
AI agent managing a shared printing workflow from a Raspberry Pi

Why a Print Server Still Makes Sense

Most consumer printers ship with a USB port and maybe Wi-Fi that only works with the manufacturer's app. You plug it into one computer, install a 400MB driver package, and now exactly one device can print to it. Everyone else in the house has to email files to that computer or walk over with a USB stick.

A Raspberry Pi running CUPS fixes this. CUPS (Common Unix Printing System) is the print system behind macOS and most Linux distributions. It turns the Pi into a print server that accepts jobs over the network from any device, Windows, Mac, Linux, or phone, and forwards them to whatever printer is plugged into its USB port. The printer doesn't need Wi-Fi. It doesn't need a cloud subscription. It just needs a cable to the Pi.

The hardware cost is minimal. A Raspberry Pi 4 with 2GB RAM handles print serving comfortably, and a Pi 5 leaves room for other tasks. At idle, a Pi 4 draws around 3 watts and a Pi 5 draws roughly 3 watts headless. That works out to pennies per month in electricity for a server that runs 24/7.

Where this setup gets interesting is the second layer. Every existing Raspberry Pi print server guide stops at CUPS configuration: install the software, share the printer, done. None of them address what happens after day one. Your ink runs low and nobody notices until a print job comes out streaked. A job gets stuck in the queue and blocks everything behind it. The printer jams at midnight and you find out the next morning when someone needs a school permission slip.

OpenClaw fills that gap. Running on the same Pi as your print server, an OpenClaw agent can watch the CUPS queue, poll printer status, and send you a Telegram message when something needs attention. The rest of this guide shows how to set up both layers.

Hardware and Software You Need

Raspberry Pi hardware:

  • Raspberry Pi 4 (2GB or 4GB) or Raspberry Pi 5 (4GB or 8GB). The Pi 4 with 2GB is the minimum for running both CUPS and the OpenClaw gateway. A Pi 5 with 4GB gives you comfortable headroom
  • USB-C power supply rated for your Pi model
  • MicroSD card (16GB or larger), or a USB SSD for better reliability under sustained writes
  • Ethernet cable for the most stable network connection, though Wi-Fi works fine for typical print volumes
  • A USB printer. Nearly any USB printer manufactured in the last 15 years will work. Printers that support IPP Everywhere or AirPrint are easiest because they work driverless. Older models may need a PPD driver from the OpenPrinting database

Software:

  • Raspberry Pi OS Lite (64-bit). The 64-bit version is required for OpenClaw. The Lite variant skips the desktop environment, freeing RAM for services
  • CUPS and supporting driver packages
  • Samba, if you want Windows clients to discover the printer automatically
  • Node.js 24 (ARM64 build from NodeSource)
  • An LLM API key from Anthropic, OpenAI, or Google. OpenClaw uses the Pi as a gateway and runs inference on cloud models

Accounts:

  • A Telegram account and bot token from @BotFather, for receiving print alerts on your phone
  • Optional: a Fastio account for storing print logs, configuration backups, or sharing files that need printing with your agent
Components connected through an intelligent network layer

How to Install and Configure CUPS on Raspberry Pi

Start with a fresh Raspberry Pi OS Lite (64-bit) installation. If you haven't flashed the OS yet, use the official Raspberry Pi Imager, enable SSH during setup, and set a hostname you'll remember.

SSH into your Pi and update the system:

sudo apt update && sudo apt upgrade -y

Install CUPS along with common printer drivers:

sudo apt install -y cups printer-driver-gutenprint hplip

The printer-driver-gutenprint package includes drivers for Canon, Epson, Lexmark, Sony, Olympus, and hundreds of other manufacturers. The hplip package adds support specifically for HP printers. Between these two packages and the driverless IPP Everywhere standard built into CUPS, you cover the vast majority of consumer printers.

Add your user to the lpadmin group so you can administer printers without root:

sudo usermod -a -G lpadmin $USER

By default, CUPS only accepts connections from localhost. Open it up to your local network:

sudo cupsctl --remote-any
sudo systemctl restart cups

Now plug your USB printer into the Pi. Open a browser on any computer on the same network and navigate to https://your-pi-hostname:631. CUPS runs its web interface on port 631. You'll see a certificate warning because CUPS uses a self-signed certificate. Accept it and proceed.

Click Administration, then Add Printer. CUPS will detect your USB printer and list it. Select it, give it a descriptive name, and check "Share This Printer" so other devices on the network can find it. CUPS will suggest a driver. For most modern printers, the IPP Everywhere or Gutenprint driver works. Click through to finish setup.

Print a test page from the CUPS web interface to confirm everything works. If the test page prints, your Pi is now a working print server.

Adding Windows support with Samba:

Windows can use IPP to print directly to CUPS, but older Windows versions discover Samba-shared printers more reliably:

sudo apt install -y samba

Open the Samba configuration file at /etc/samba/smb.conf and add these sections at the end:

[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = yes
read only = yes
create mask = 0700

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = no
guest ok = no

Restart Samba:

sudo systemctl restart smbd

Windows machines on the same network should now see the shared printer under Network in File Explorer.

Installing OpenClaw as a Print Monitoring Agent

With CUPS handling print jobs, the next step is adding intelligence. OpenClaw is an open-source AI agent that runs as a lightweight gateway on the Pi and sends reasoning tasks to a cloud LLM. You're not running a large language model on the Pi itself, just a coordinator process that watches local services and communicates with a remote API.

According to the official OpenClaw Raspberry Pi documentation, the minimum requirements are 1GB RAM, 1 CPU core, and 500MB free disk. A Pi 4 with 2GB running CUPS and OpenClaw simultaneously stays well within those limits.

Install Node.js 24 if you haven't already. OpenClaw requires 64-bit Node.js:

curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt install -y nodejs

Install OpenClaw using the official installer and run the onboarding wizard:

npx openclaw@latest onboard --install-daemon

The onboarding process will ask you to configure your LLM provider. Since the Pi is only the gateway, choose a cloud API like Claude or GPT-4. Local LLMs are too slow on Pi hardware for practical use.

After onboarding, OpenClaw installs itself as a systemd service. It starts automatically on boot, restarts on crash, and survives SSH disconnects. This matters for a print server: you want the agent watching your printer queue even when you're not logged in.

Verify the gateway is running:

systemctl status openclaw-gateway
Agent monitoring system with audit trail
Fastio features

Store and manage print files from anywhere

Fastio gives your OpenClaw print agent a cloud workspace for file uploads, job archives, and configuration backups. generous storage, no credit card, MCP-ready for your agent.

Connecting Telegram and Building Print Alerts

The monitoring agent is only useful if it can reach you. Telegram is the most practical notification channel for a home print server because it works on phones, desktops, and the web without any infrastructure on your end.

Create a Telegram bot:

Open Telegram, find @BotFather, and send /newbot. Follow the prompts to name your bot. Save the token BotFather gives you, it looks like 123456:ABCdefGHIjklmNOPQrst.

Configure OpenClaw's Telegram channel:

Add the bot token to your OpenClaw configuration. You can either set it as an environment variable (TELEGRAM_BOT_TOKEN=your_token) or add it to the channels config. Then start the gateway and approve the pairing:

openclaw gateway
openclaw pairing list telegram
openclaw pairing approve telegram <CODE>

Send a test message from your phone to the bot. If the agent replies, the channel is live.

Setting up print queue monitoring:

The real value comes from scheduled monitoring. CUPS exposes print queue data through its command-line tools and its web API. You can configure OpenClaw cron jobs that check printer status on a schedule and alert you when something needs attention.

Here's what an effective print monitoring setup watches for:

  • Stuck jobs: A print job that stays in "processing" status for more than a few minutes usually means a paper jam or a communication error. The agent can detect this and send a Telegram message before more jobs pile up behind it
  • Queue depth: If five jobs are waiting and none are printing, something is wrong. An alert saves you from discovering the problem hours later
  • Printer offline: CUPS marks a printer as "stopped" when it loses communication. The agent catches this immediately instead of you finding out when you try to print
  • Supply warnings: Printers that report ink or toner levels via IPP expose those values through CUPS. The agent can parse supply levels and warn you before a cartridge runs dry

The monitoring runs as scheduled OpenClaw tasks. Each check runs a fresh agent session, queries CUPS, evaluates the results, and sends a Telegram notification only when something deviates from normal. On a quiet day with no print issues, you hear nothing. When the toner drops below 15% or a job gets stuck, you get a clear message explaining what happened and what to do about it.

For daily summaries, you can schedule a cron job that runs once in the morning. It tallies yesterday's print jobs, reports supply levels, and flags anything that needs attention. That way you get a single glanceable message instead of checking the printer manually.

Using Fastio for Print File Storage and Handoff

A print server handles the last mile: getting bits onto paper. But before that, someone has to get the file to the right place. This is where a cloud workspace adds value alongside a local print setup.

Consider the workflow for a small office or a household with multiple people who need to print. Contracts arrive via email. School assignments get downloaded to a kid's laptop. Photos live on a phone. Everyone needs to get these files to the printer, but nobody wants to walk over and plug in a USB stick.

Fastio gives the OpenClaw agent a cloud workspace where files can land before printing. Anyone with a share link can upload a document to a workspace. The agent picks up new files and queues them for printing, or notifies you first if you want approval before sending anything to the printer.

The free tier includes 50GB of storage, 5 workspaces, and included credits per month, no credit card required. That covers a lot of print files.

Practical patterns that combine Fastio with a Pi print server:

  • Remote print submission: Share a Fastio workspace link with family or coworkers. They upload files from anywhere. The agent monitors the workspace for new uploads and sends you a Telegram message asking whether to print. You reply "yes" and the agent queues the job through CUPS
  • Print job archiving: After a document prints, the agent can move the source file to an archive folder in Fastio. You get a searchable history of everything you've printed, with the original files intact. If Intelligence Mode is enabled on the workspace, those archived files are automatically indexed for semantic search, so you can later ask "find the lease agreement I printed in March" and get the actual document back
  • Configuration backup: Your CUPS config files, PPD drivers, and OpenClaw agent setup live on an SD card or SSD that could fail. The agent can periodically back up these configs to a Fastio workspace. If the SD card dies, you restore from the workspace instead of reconfiguring from scratch

The Fastio MCP server exposes workspace operations through the Model Context Protocol, making it straightforward for the OpenClaw agent to interact with files programmatically. Uploads, downloads, folder management, and AI queries all work through the same interface.

For teams, the ownership transfer feature lets an agent build out a workspace with templates, shared folders, and access controls, then hand it to a human who takes over as the owner. The agent keeps admin access for ongoing automation while the human manages day-to-day sharing. Useful when setting up a shared print queue for a small business where the agent handles the infrastructure and the office manager handles who gets access.

How to Fix Common Print Server Problems

Printer not detected by CUPS:

Run lsusb to confirm the Pi sees the printer's USB connection. If it appears in lsusb but not in CUPS, restart CUPS with sudo systemctl restart cups and check again. Some printers need to be powered off and on after the Pi boots. If the printer uses a proprietary protocol, check the OpenPrinting driver database for your model.

Print jobs stuck in queue:

Open the CUPS web interface at port 631 and check the printer status. A "stopped" printer needs to be resumed: click the printer name, then "Resume Printer" from the maintenance dropdown. Stuck jobs can be canceled individually from the jobs page. If jobs consistently get stuck, the driver may be wrong. Try switching to the generic IPP Everywhere driver if your printer supports it.

OpenClaw gateway won't start after reboot:

Check whether Node.js is on the path by running node --version. If the systemd service fails, inspect the logs with journalctl -u openclaw-gateway -n 50. A common cause is the swap file not being active early enough during boot, which causes Node.js to run out of memory on 2GB Pi models. Make sure your swap is configured in /etc/fstab rather than as a post-boot script.

Telegram bot not receiving messages:

Verify the bot token is correct by sending a direct message to the bot in Telegram. Check that you approved the pairing with openclaw pairing list telegram. If the bot is in a group, disable privacy mode via @BotFather using /setprivacy so the bot can see all messages, not just commands directed at it.

Printer works from CUPS but not from Windows:

This is almost always a Samba configuration issue. Confirm Samba is running with sudo systemctl status smbd. On the Windows machine, try adding the printer by IP address using http://your-pi-ip:631/printers/YourPrinterName as an IPP URL instead of relying on Samba network discovery. Modern Windows (10 and later) handles IPP natively and doesn't need Samba at all.

High latency on print jobs:

If print jobs take a long time to start, the bottleneck is usually the Pi processing a large file. PDFs with high-resolution images can take 30 seconds or more to rasterize on a Pi 4. Using a USB SSD instead of an SD card reduces this processing time. For the Pi 5, the faster CPU and I/O make this less of an issue.

Frequently Asked Questions

How do I set up a Raspberry Pi as a print server?

Install Raspberry Pi OS Lite (64-bit), then install CUPS with `sudo apt install cups printer-driver-gutenprint`. Add your user to the lpadmin group, enable network access with `sudo cupsctl --remote-any`, and add your printer through the CUPS web interface at port 631. The whole process takes about 20 minutes.

Can a Raspberry Pi print server work with any printer?

Most USB printers work. CUPS supports thousands of models through the Gutenprint and HPLIP driver packages, plus driverless printing via IPP Everywhere for modern printers. Some old or proprietary models may lack ARM64 Linux drivers, but this affects a small minority of printers made in the last 15 years. Check the OpenPrinting database for your specific model before buying.

How to monitor printer status remotely with Raspberry Pi?

Install OpenClaw on the same Pi running your CUPS print server. Configure a Telegram bot and set up scheduled monitoring jobs that check the CUPS queue for stuck jobs, offline printers, and low supply levels. The agent sends Telegram alerts only when something needs your attention, so you don't have to SSH in to check manually.

Can AI manage a print queue?

Yes. An OpenClaw agent running on a Raspberry Pi can monitor CUPS queue status, detect stuck or failed jobs, read printer supply levels, and send notifications when action is needed. It can also accept files from a cloud workspace like Fastio and queue them for printing. The AI handles the monitoring and notification logic while CUPS handles the actual printing.

How much power does a Raspberry Pi print server use?

A Raspberry Pi 4 draws about 3 watts at idle, and a Pi 5 draws roughly 3 watts headless. Under print load, both models peak at 5 to 7 watts. At typical US electricity rates, running a Pi print server 24/7 costs around $3 to $5 per year.

Do I need a Raspberry Pi 5 or will a Pi 4 work?

A Pi 4 with 2GB RAM handles both CUPS and OpenClaw comfortably for a home or small office print server. The Pi 5 offers faster file processing, which helps with large PDFs, and more headroom if you want to run additional services on the same device. For print serving alone, a Pi 4 is more than enough.

Related Resources

Fastio features

Store and manage print files from anywhere

Fastio gives your OpenClaw print agent a cloud workspace for file uploads, job archives, and configuration backups. generous storage, no credit card, MCP-ready for your agent.