Linux printing technician providing live chat help

Joe B.

Reviewed for technical accuracy

Specialities: Linux (Ubuntu/Debian/Fedora/Arch/RHEL), CUPS, Avahi/mDNS, AirPrint & IPP Everywhere, Networking, Office Equipment

Avahi mDNS printer not showing up on Linux — fix AirPrint/IPP advertising via service file & publish options

Technician avatar Technician
Hey! Let’s get your Bonjour/mDNS printer discovery working on Linux. Tell me your distro (Ubuntu, Debian, Fedora, Arch, RHEL), your CUPS version, and whether clients need AirPrint / IPP Everywhere or classic LPD/RAW. We’ll verify the Avahi service file, publish settings in /etc/avahi/avahi-daemon.conf, open mDNS UDP 5353, and confirm CUPS is advertising via dnssd.
Customer
Ubuntu Server 22.04 with CUPS. macOS and iPhones can’t see the printer. avahi-daemon is running but the printer isn’t discovered in AirPrint. Linux Avahi not advertising printer seems to be the problem.
Technician avatar Technician
Great, here’s the fastest way to diagnose Avahi not advertising: 1) Read logs and browse services. 2) Validate the AirPrint/IPP .service file in /etc/avahi/services. 3) Check publish* options and allow-interfaces in avahi-daemon.conf. 4) Ensure firewall allows UDP 5353 and that systemd-resolved or NetworkManager aren’t filtering mDNS. 5) Confirm CUPS advertises using BrowseLocalProtocols dnssd.
Customer
What commands should I run to see if Avahi is publishing the printer?
Technician avatar Technician
Check Avahi/Bonjour advertisement:
• systemctl status avahi-daemon and journalctl -u avahi-daemon — look for errors like “Failed to create service” or interface denied.
• avahi-browse -a -t or dns-sd -B _ipp._tcp — should list services. Try also _ipps._tcp and _printer._tcp.
• From a Mac/iPhone network, you should see an IPP Everywhere or AirPrint service with TXT keys: ty, rp, UUID, URF, note, adminurl.
If nothing appears, we’ll fix the service XML and publish controls.
Customer
I don’t have a custom service file. Relying on CUPS. What should an AirPrint .service file look like?
Technician avatar Technician
AirPrint/IPP .service file (Avahi): place XML in /etc/avahi/services/airprint.service referencing your CUPS queue path (rp=/printers/QueueName) and advertise _ipp._tcp / _ipps._tcp. Include TXT keys like URF=CP1,SRGB24,W8, txtvers=1, qtotal=1, ty=Model, and adminurl=http://server:631/printers/QueueName. Mismatched keys or wrong rp cause “printer not showing in AirPrint”.
Customer
Even with the file, discovery is inconsistent. Any Avahi config flags I should set?
Technician avatar Technician
Publish settings that matter in /etc/avahi/avahi-daemon.conf: set use-ipv4=yes, use-ipv6=yes, allow-interfaces=eth0,wlan0 (or leave empty to auto), publish-user-services=yes, publish-workstation=yes, and ensure enable-dbus=yes. In containerized or multi-NIC hosts, pin the allow-interfaces and set a stable host-name to avoid duplicate service names.
Customer
Could the firewall or systemd-resolved block mDNS? Macs can ping but still no listing.
Technician avatar Technician
Yes — verify UDP 5353 and multicast are open. For ufw: ufw allow 5353/udp. For firewalld: firewall-cmd --add-service=mdns --permanent. If you run systemd-resolved, keep MulticastDNS=yes and enable mDNS in NetworkManager. Avoid L3 isolation (VLANs) unless you run an mDNS repeater/reflector.
Customer
How do I confirm CUPS is advertising properly through dnssd?
Technician avatar Technician
Enable CUPS dnssd: in /etc/cups/cupsd.conf set BrowseLocalProtocols dnssd and restart: systemctl restart cups. Make sure your queue has a meaningful Info and Location (becomes AirPrint note). If you use IPP Everywhere, ensure cups-filters and Ghostscript are current to avoid filter errors that prevent advertising.
Customer
Multiple NICs here (LAN + Docker bridge). Can that break Avahi discovery?
Technician avatar Technician
It can. Pin Avahi to real interfaces using allow-interfaces=eth0 and consider deny-interfaces=docker0. Some containers do not pass multicast. After changes: systemctl restart avahi-daemon. Re-run avahi-browse and you should see your _ipp._tcp service.
Customer
Okay, clients can now see the printer, but AirPrint shows a wrong name. How do I set the service name and metadata?
Technician avatar Technician
Set a friendly service title inside the Avahi XML’s <name replace-wildcards="yes">. Update TXT records: ty (model), note (location), product, UUID, URF, Color, Duplex. Keep the queue path rp= matching CUPS exactly. Restart Avahi and CUPS, then verify with dns-sd -L "Your Printer" _ipp._tcp local.
Customer
Perfect — the printer now appears on macOS and iOS and prints via IPP Everywhere. Anything else to harden it?
Technician avatar Technician
Summary: When Linux Avahi is not advertising a printer, validate the AirPrint/IPP .service file, enable publish-user-services and correct allow-interfaces, open UDP 5353, and ensure CUPS dnssd is active. Use avahi-browse / dns-sd to verify _ipp._tcp and _ipps._tcp records, and keep cups-filters current. Need hands‑on help? Open the chat.

Quick answer: the accepted fix

Accepted fix when Avahi is not advertising a printer (Linux): create/repair the AirPrint/IPP Avahi .service file in /etc/avahi/services, enable publish-user-services and correct allow-interfaces in avahi-daemon.conf, open UDP 5353 in the firewall, and set BrowseLocalProtocols dnssd in cupsd.conf. Verify with avahi-browse and dns-sd.


Avahi service file examples for AirPrint / IPP Everywhere

Use _ipp._tcp and optionally _ipps._tcp with TXT keys rp, URF, UUID, Color, Duplex, txtvers, and qtotal. An incorrect queue path or missing URF values often explains “Bonjour printer not showing”. Keep Ghostscript / cups-filters updated for IPP Everywhere.

How to verify mDNS discovery works

From the server: avahi-browse -a -t. From a Mac: dns-sd -B _ipp._tcp. Then print a test page via http://server:631. If discovery fails after a reboot, check allow-interfaces, publish-workstation, and systemd-resolved mDNS settings.

Avahi advertising — troubleshooting tips

Most discovery issues come from a broken service XML, disabled publish settings, blocked UDP 5353, or CUPS not using dnssd.

Quick path: confirm Avahi is running → fix the .service file → enable publish-user-services / allow-interfaces → open firewall → enable CUPS dnssd → verify with avahi-browse/dns-sd.

Disclaimer: This information is AI-generated and intended for general guidance only. For advice specific to your environment, please consult a verified expert on Whizz-Tech before making decisions.


Getting Started Is Easy

Ask for help, 24/7

Members enjoy round-the-clock access to 12,000+ verified Experts, including tech support, mechanics, vets, and more.

Expert will respond in minutes

We match you with an Expert who specializes in your situation. Talk, text, or chat — whichever you prefer.

Save time & money

No scheduling hassles or expensive consults. Membership can save you significant time and money each month.

FAQ

Why is Avahi not advertising my printer on Linux?

Common causes: broken Avahi .service file, disabled publish-user-services, wrong allow-interfaces, blocked UDP 5353, or CUPS not using dnssd. Fix the XML, enable publish options, open the firewall, and restart Avahi/CUPS.

How do I create an AirPrint service file for Avahi?

Place XML in /etc/avahi/services/airprint.service advertising _ipp._tcp/_ipps._tcp with TXT keys including rp, URF, ty, and adminurl. Ensure rp matches your CUPS queue path.

mDNS works sometimes, then stops — what now?

Pin interfaces with allow-interfaces, avoid Docker bridges, and keep systemd-resolved mDNS enabled. Check logs via journalctl -u avahi-daemon for duplicate service names or network changes.

Do I still need CUPS broadcasting if I use a custom Avahi file?

For best compatibility, enable BrowseLocalProtocols dnssd so CUPS updates records when queues change. A static XML works, but dnssd reflects status automatically.

What about Windows clients?

Windows 10/11 can add IPP Everywhere printers via Settings → Printers. Ensure DNS-SD is visible and the server allows IPP/IPP over TLS (IPP, IPPS).

Common Avahi discovery problems and quick fixes
SymptomLikely causeQuick fix
Printer not visible in AirPrint Missing/wrong .service XML; CUPS not using dnssd Create correct airprint.service; set BrowseLocalProtocols dnssd
Shows on server, not on clients Firewall blocks mDNS 5353; VLAN isolation Allow UDP 5353; use mDNS reflector or same subnet
Wrong printer name/metadata TXT keys/Avahi name mismatch Set name, ty, note, and correct rp path
Works until reboot Interfaces change; Docker bridge preferred Pin allow-interfaces; deny docker0; restart Avahi

Step‑by‑step (Linux/Avahi + CUPS)

  1. Install/enable avahi-daemon and cups; open UDP 5353.
  2. Create/validate /etc/avahi/services/airprint.service for _ipp._tcp (and _ipps._tcp) with correct TXT keys and rp.
  3. Edit /etc/avahi/avahi-daemon.conf: enable publish-user-services, set allow-interfaces, keep enable-dbus.
  4. In /etc/cups/cupsd.conf set BrowseLocalProtocols dnssd; restart CUPS and Avahi.
  5. Verify with avahi-browse -a -t and dns-sd -B _ipp._tcp from a client; add the printer via IPP Everywhere/AirPrint.

Sources

Matt Verified Icon
Matt ● replies in < 1 min
Technician Expert
⭐⭐⭐⭐⭐ Trusted by 27,000+ customers
Avatar
Alex · Expert's Assistant