AirPrint on Any Linux NAS: The Universal Setup
Tags: Networking · macOS · iOS · Printing · Linux · Synology · Open Source
Published: May 23, 2026
The Setup That Works Everywhere
I set up AirPrint for a Brother HL-1210W on a Synology DS918Plus. Every iOS and macOS device on the network now discovers the printer instantly.
The technique is universal—it works on Raspberry Pi, Ubuntu NAS, Docker, or any Linux box. Only the startup method changes.
Why This Matters
Network printers without AirPrint are invisible to Apple devices. You either replace the printer (~$200+) or turn your Linux box into a print server.
I chose option two. Five minutes of setup, zero hardware cost beyond electricity.
What You Need
- Any Linux NAS or server (Synology DSM 7.x, Raspberry Pi, Ubuntu, Docker, etc.)
- Brother printer or any network-capable printer with IPP/LPD support
- Printer connected to WiFi
- SSH access to your server
- Minimal sudoers privilege
The Problem
CUPS (Linux print server) + Avahi (mDNS daemon) let your NAS advertise the printer as AirPrint-compatible.
But getting them talking requires finding the right protocol. Synology adds friction: no systemd, custom init, undocumented paths.
Universal Setup (Core Steps)
1. SSH into Your NAS/Server
2. Find Your Printer's IP Address
Run this scan to locate the printer:
Note the IP (example: 192.168.178.44)
3. Configure CUPS
First, kill any running CUPS daemon:
Create the CUPS configuration file:
4. Start CUPS and Add Your Printer
Start the CUPS daemon:
Add your printer using LPD protocol (more reliable than IPP):
Verify it was added:
You should see device for Brother-HL-1210W: lpd://192.168.178.44
5. Create the Avahi Service File
This tells Apple devices the printer supports AirPrint:
6. Start Avahi (mDNS Broadcasting)
Verify it's advertising the printer:
7. Test from iOS or macOS
On iOS: Settings → Printers & Scanners → tap printer → Print Test Page
On macOS: System Preferences → Printers & Scanners → add printer
You should see your printer appear and print immediately. No drivers needed.
Auto-Start on Reboot
Pick the setup that matches your OS:
Synology DSM 7
Create startup script:
Add to cron:
Ubuntu / Debian / Raspberry Pi (systemd)
Create a systemd service:
Docker
Troubleshooting
Printer appears then disappears
Cause: CUPS is only listening on localhost, not the network.
Fix: Verify Listen 0.0.0.0:631 in cupsd.conf, then restart CUPS.
Print jobs stuck in queue
Cause: Physical jam or printer error.
Fix:
- Check printer tray for paper jams
- Power cycle printer for 10 seconds
- Check printer's web interface for persistent errors
Blank pages printing
Cause: PostScript mismatch. Printer doesn't support PostScript (common with Brother models).
Fix for Synology DSM 7:
This removes PostScript from advertised formats. iOS/macOS will send PDF or URF instead, which non-PostScript printers can handle.
Fix for Ubuntu/Raspberry Pi: Use the correct printer driver in the Avahi service file
Fix for Docker: Build image with the correct printer driver
Two printer entries on iPhone
Cause: Same service advertising on multiple network interfaces.
Fix: Forget and rejoin WiFi on the iPhone.
Printer shows offline
Cause: Printer lost WiFi connection or IP changed.
Fix:
- Reconnect printer to WiFi
- Verify printer IP hasn't changed
- Update CUPS configuration if needed
Why This Works
- CUPS translates between AirPrint (IPP) and your printer's native protocol (LPD, raw, etc.)
- Avahi broadcasts the printer via Bonjour—Apple's zero-config networking standard
- LPD protocol is more reliable than raw IPP for older network printers
- One printer, many devices, no driver installation per device
Full Setup Scripts & Contributing
Complete setup + automation scripts:
github.com/oleg-koval/universal-airprint-setup
Tested on: Synology DS918Plus · Raspberry Pi 4 · Ubuntu 24.04
Contributing: PRs welcome. Include your hardware + OS version.
Why I Built This
My Brother printer works perfectly but has zero AirPrint support. Replacing it would cost $200+.
Turning my NAS into a print server cost 5 minutes and electricity.
The core technique is just CUPS + Avahi. The friction is platform-specific init systems and documentation gaps. Now printing from iOS just works everywhere.

Comments
No comments yet. Be the first to share your thoughts.