# Legacy Printer AirPrint Relay

**Print from your iPhone, iPad and Mac to the old network printer that still works perfectly.**

Legacy Printer AirPrint Relay (`legacy-printer-airprint-relay`) is a small Docker container (CUPS + Avahi) that
makes an older network printer show up as an AirPrint-compatible printer on iPhone, iPad and Mac. Your devices need
no drivers or apps, and nothing goes through the cloud. It is free and MIT-licensed, and runs on a Synology NAS, a
Raspberry Pi or any always-on Linux machine on the same network as your devices.

- Source code: [github.com/jmoore2333/legacy-printer-airprint-relay](https://github.com/jmoore2333/legacy-printer-airprint-relay)
- Documentation: [the project wiki](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki)
- This page as HTML: [legacyprinters.moore.nyc](https://legacyprinters.moore.nyc/)

## Why this one

Plenty of solid laser printers were built before AirPrint existed. The relay keeps them in use, and it handles the
things that usually go wrong with a do-it-yourself print server.

- **Jobs wait while the printer is off.** Print while the printer is switched off and the job waits, then prints
  when the printer comes back (up to 7 days with `socket://`). It is not cancelled after the usual CUPS limit of
  3 hours. See [Printer Off and Job Retention](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/Printer-Off-and-Job-Retention).
- **iOS offers only the paper you load.** Set `PAPER_SIZE=Letter` (or `A4`) and that is the only size the iPhone
  print sheet offers, instead of A4, A5 and A6 on a Letter printer. See
  [Paper Size and iOS](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/Paper-Size-and-iOS).
- **Configured by environment variables.** There is no CUPS web console step and no manual `lpadmin`. The queue,
  driver and AirPrint advertisement are rebuilt from your settings every time the container starts. See the
  [Configuration Reference](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/Configuration-Reference).
- **Checks itself at start.** Before it advertises the printer, the relay asks its own queue over IPP whether it
  offers the paper size and PDF support you configured. A bad setting stops the container with a readable
  `[lpar] ERROR` message.
- **Safe defaults.** It is built for your LAN only, remote administration is off, and no secrets are written to
  the logs. See [Security](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/Security).
- **Multi-arch image, rebuilt weekly.** Built on Debian `trixie-slim` for `linux/amd64` and `linux/arm64`, and
  rebuilt every week (while the repository is active) to pick up Debian security fixes.
- **MIT-licensed, written from scratch.** The image bundles unmodified Debian packages under their own licences,
  some of them GPL or AGPL (for example Ghostscript). See the
  [third-party notices](https://github.com/jmoore2333/legacy-printer-airprint-relay/blob/main/THIRD_PARTY_NOTICES.md).
- **Run on real hardware and by automated tests.** It runs on Synology DSM 7.4 with Portainer, driving a Xerox
  DocuPrint N17b, and an end-to-end suite covers printer off and on, container re-creation during an outage, real
  multicast mDNS and more.

## How it works

Your devices talk to the relay as they would to any AirPrint printer. The relay talks to the printer in the
language it already understands.

1. **iPhone, iPad or Mac** discovers the printer with mDNS (Bonjour) and sends the job with IPP.
2. **The relay container**, on your NAS, Raspberry Pi or Linux host: Avahi advertises the AirPrint printer, CUPS
   converts the job for the printer, and the spool holds jobs while the printer is off.
3. **The legacy network printer** (PostScript or PCL) receives the job over raw socket (JetDirect, port 9100), LPD
   or IPP.

Avahi announces the CUPS queue on your network with the Bonjour records iOS and macOS look for. The phone sends the
job to CUPS over IPP. CUPS converts it for the printer's language and delivers it over raw socket (JetDirect, port
9100), LPD or IPP. If the printer is off, the job waits in the spool until the printer is back. The details are in
[How It Works](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/How-It-Works).

## Quick start

You need Docker with Compose v2 or later on an always-on Linux host in the same network (subnet or VLAN) as your
iPhone, and a fixed IP address for the printer. Nothing else on the host may use TCP port 631: stop the host's own
CUPS, or set `CUPS_PORT`.

```sh
mkdir airprint-relay && cd airprint-relay
curl -fsSLO https://raw.githubusercontent.com/jmoore2333/legacy-printer-airprint-relay/main/compose.yaml
curl -fsSL -o .env https://raw.githubusercontent.com/jmoore2333/legacy-printer-airprint-relay/main/.env.example
nano .env               # REQUIRED: set PRINTER_URI to your printer, e.g. socket://192.0.2.10:9100
docker compose up -d
docker compose logs -f  # wait for "[lpar] ready: queue 'legacy-printer' -> ..."
```

Then print. On an iPhone or iPad, open **Share › Print** and select **Legacy Printer**. On a Mac, the printer is
listed under **System Settings › Printers & Scanners** when you add a printer.

The [Quick Start guide](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/Quick-Start) has the
checks for each step. There are separate guides for
[Synology with Portainer](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/Install-Synology-Portainer),
[Synology Container Manager](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/Install-Synology-Container-Manager),
[Raspberry Pi](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/Install-Raspberry-Pi),
[Unraid](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/Install-Unraid),
[TrueNAS SCALE](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/Install-TrueNAS-SCALE),
[QNAP](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/Install-QNAP) and
[Proxmox](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/Install-Proxmox).

## What it has been run on

The project uses three status words and never claims more than has been checked. A status changes only with a real
test report.

**Tested**: printers and client devices are run on real hardware; software and platform behaviour is exercised by
the automated end-to-end suite or on real hardware.

- Synology DSM 7.2+ with Portainer (run on DSM 7.4, x86_64)
- The image on `linux/amd64` and `linux/arm64`, by the end-to-end suite
- iPhone and iPad (AirPrint), and Mac
- Xerox DocuPrint N17b with duplex unit, over port 9100

**Expected**: should work by design, but not validated yet. Reports are welcome.

- Synology Container Manager, Raspberry Pi OS 64-bit, Unraid, TrueNAS SCALE 24.10+, QNAP Container Station 3,
  Proxmox VE, and Docker Compose on your own Linux distribution
- Windows (Microsoft IPP Class Driver), Android (Default Print Service or Mopria) and Linux (driverless IPP)
  clients
- Other PostScript printers with the `generic-postscript` profile, PCL printers through `PPD_MODEL`, and the
  `lpd://` and `ipp://` connections
- Xerox DocuPrint N17 without the duplex unit

**Experimental**: known caveats, needs extra setup, or not validated.

- macOS or Windows as the relay host
- macvlan or ipvlan networking
- Devices on another VLAN or subnet, with a unicast configuration profile

The full tables are in the
[Compatibility List](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/Compatibility-List)
(printers), the [Quick Start guide](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/Quick-Start)
(hosts) and [Clients](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/Clients). If your printer
works, [send a printer report](https://github.com/jmoore2333/legacy-printer-airprint-relay/issues/new?template=printer_report.yml)
so it can be listed.

## Questions

### Do I need drivers or an app on my iPhone, iPad or Mac?

No. The relay looks like a native AirPrint printer, so iOS and macOS use their built-in printing. The only driver
is inside the container.

### Will my printer work?

It very likely will if it is a network printer that accepts PostScript, or PCL with `PPD_MODEL`, over port 9100,
LPD or IPP. Check the
[Compatibility List](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/Compatibility-List), and add
your printer once it works.

### Does it work with USB printers?

No. USB printers are out of scope: the relay is built and tested for network printers. Alternatives include a small
network print server box, or sharing the printer from the computer it is plugged into.

### Does it need internet access?

No. Discovery, printing and conversion all happen on your LAN. The host needs internet only to pull or update the
image.

### Why does it need host networking?

iPhones find printers with multicast DNS, and multicast doesn't pass through Docker's default bridge network.
macvlan or ipvlan networking also works and gives the container its own IP address; it is Experimental. See
[Host vs macvlan networking](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/Networking-Host-vs-Macvlan).

### Can I print from another VLAN, or over the internet?

Printing over the internet isn't supported: the relay is LAN-only by design. To print from another VLAN, add that
VLAN's subnet to `ALLOWED_NETWORKS` and let mDNS reach it (for example, with an mDNS reflector on your router). An
Apple configuration profile that points at the relay's address is an Experimental alternative. See
[Clients](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/Clients).

### Does it work with Windows or Android?

That's Expected, but not validated yet. Windows can add the relay by URL with the Microsoft IPP Class Driver, and
Android discovers it through its Default Print Service or Mopria. The steps are on
[Clients](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/Clients).

### I already use another CUPS AirPrint container. Why switch?

This relay adds three things: jobs wait while the printer is off, iOS offers the correct paper sizes, and the whole
configuration lives in environment variables. Moving over takes a few minutes; see
[Migrating from synology-airprint](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/Migrating-from-synology-airprint).

### Is this made by Apple or Xerox?

No. It's an independent MIT-licensed project. AirPrint is a trademark of Apple Inc., and the relay is
"AirPrint-compatible" because it speaks the same open standards (IPP and DNS-SD).

More answers are in the [FAQ](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/FAQ) and the
[Troubleshooting](https://github.com/jmoore2333/legacy-printer-airprint-relay/wiki/Troubleshooting) guide. A
machine-readable index of the documentation is in [llms.txt](https://legacyprinters.moore.nyc/llms.txt).

## Licence and trademarks

[MIT licence](https://github.com/jmoore2333/legacy-printer-airprint-relay/blob/main/LICENSE) © 2026 Jeremy Moore.
The container image bundles Debian packages such as CUPS, Avahi and Ghostscript under their own licences.

AirPrint, Bonjour, iPhone, iPad, Mac and macOS are trademarks of Apple Inc., registered in the U.S. and other
countries. Xerox is a trademark of Xerox Corporation. Synology is a trademark of Synology Inc. All other trademarks
belong to their respective owners. This is an independent project, not affiliated with or endorsed by Apple, Xerox
or Synology.
