Skip to main content
macOSbeginner

How to Share a Printer From macOS Using CUPS

Learn how to share a printer from macOS using CUPS, enable the web interface, and connect Mac, Linux, and Windows clients over IPP on port 631.

6 min readUpdated April 2026

Want us to handle this for you?

Get expert help →

macOS has included CUPS (Common UNIX Printing System) as its print subsystem since Mac OS X 10.2, and it is still how every print job on macOS is processed today. Enabling printer sharing exposes your locally-attached printer to other machines on the network using IPP (Internet Printing Protocol) over TCP port 631 — the same standard that Linux and Windows clients speak natively. This guide walks you through enabling printer sharing from the GUI, the CUPS web interface, and the command line, then connecting Mac, Linux, and Windows clients.

Before You Begin

You will need:

  • Administrator access on the Mac hosting the printer
  • A printer already installed and working locally on the host Mac
  • The hostname of the host Mac (check System Settings > General > About)
  • Network connectivity between the host and client machines

Method 1: Enable Sharing in System Settings

The simplest option uses the graphical Sharing pane.

  1. Open System Settings
  2. Click General > Sharing
  3. Toggle Printer Sharing on
  4. Click the Info (i) button next to Printer Sharing
  5. Check the box next to each printer you want to share
  6. Optionally restrict which users can print under the Users list (default is Everyone)

macOS automatically opens TCP port 631 in the application firewall and begins advertising the printer over Bonjour.


Method 2: Use the CUPS Web Interface

CUPS ships with a browser-based administration UI at http://localhost:631/. On macOS 13 and later it is disabled by default and must be re-enabled before you can use it.

  1. Open Terminal from Applications > Utilities
  2. Enable the web interface: sudo cupsctl WebInterface=yes
  3. Open a browser and visit http://localhost:631/
  4. Click the Administration tab
  5. Under Server, check Share printers connected to this system
  6. Click Change Settings and authenticate with your administrator account
  7. Go to the Printers tab, click a printer name, then choose Administration > Set Default Options to review sharing

When you are finished, turn the interface back off:

sudo cupsctl WebInterface=no

If you see a Forbidden error when clicking administrative links, your user is not in the _lpadmin group. Add it with:

sudo dseditgroup -o edit -a $(whoami) -t user _lpadmin


Method 3: Share From the Command Line

The lpadmin tool is the scriptable way to manage CUPS. To mark an existing printer as shared:

sudo lpadmin -p PrinterName -o printer-is-shared=true

Replace PrinterName with the queue name shown by lpstat -p. You can also use lpadmin to install a new printer and share it in one step.

Common lpadmin Options

OptionPurpose
-p <name>Name of the printer queue to create or modify
-EEnable the printer and accept jobs
-v <device-uri>Device URI (USB, IPP, socket, etc.)
-m everywhereUse the driverless IPP Everywhere profile
-L <location>Human-readable location string
-o printer-is-shared=trueMark the printer as shared over the network
-o printer-is-shared=falseStop sharing the printer
-x <name>Delete the printer queue

List your current printers and their sharing status with:

lpstat -v && lpoptions -p PrinterName


Connecting From Client Machines

From Another Mac

  1. Open System Settings > Printers & Scanners
  2. Click Add Printer, Scanner, or Fax
  3. Select the IP tab
  4. Choose Internet Printing Protocol — IPP from the Protocol menu
  5. Enter the address: hostname.local/printers/PrinterName
  6. Click Add

Shared printers usually appear automatically under the Default tab via Bonjour — IPP is the reliable fallback.

From a Linux Client

Install CUPS client tools if needed (sudo apt install cups-client on Debian/Ubuntu), then add the remote queue:

sudo lpadmin -p Shared -E -v ipp://hostname.local:631/printers/PrinterName -m everywhere

Verify with lpstat -p Shared and send a test page using lp -d Shared /etc/hostname.

From a Windows Client

  1. Open Settings > Bluetooth & devices > Printers & scanners
  2. Click Add device, then Add manually
  3. Choose Select a shared printer by name
  4. Enter: http://hostname.local:631/printers/PrinterName
  5. Select a driver that matches the printer model

Firewall Considerations

  • TCP/UDP 631 — IPP traffic for print jobs and queue management
  • UDP 5353 — Bonjour/mDNS for automatic discovery by Macs and Linux
  • TCP 9100 — Only needed if clients use the raw JetDirect protocol instead of IPP
  • Enabling Printer Sharing in System Settings opens port 631 in the macOS application firewall automatically
  • On a custom pfctl ruleset or a third-party firewall, add the rules manually before clients can connect

Troubleshooting

Printer does not appear on clients

  • Confirm Printer Sharing is enabled in System Settings and the target printer has a checkmark
  • Verify the host is reachable: ping hostname.local
  • Check that cupsd is listening on port 631: sudo lsof -i :631
  • On the client, bypass Bonjour by adding the printer by explicit IPP URL

"Forbidden" errors in the CUPS web UI

The current user is not a member of the _lpadmin group. Add it with sudo dseditgroup -o edit -a $(whoami) -t user _lpadmin and sign out/in.

  • Open the queue in Printers & Scanners and click Resume
  • From Terminal, run cancel -a PrinterName to clear stuck jobs
  • Check the CUPS error log: tail -f /var/log/cups/error_log
  • Restart CUPS to recover from a hung scheduler: sudo launchctl kickstart -k system/org.cups.cupsd

Frequently Asked Questions

Find answers to common questions

CUPS (Common UNIX Printing System) is the open-source printing stack that powers printing on macOS, Linux, and most other UNIX-like operating systems. Apple acquired CUPS in 2007 and it remains the default print subsystem on macOS. When you add a printer in System Settings, macOS actually configures CUPS behind the scenes. Sharing a printer exposes it over IPP (Internet Printing Protocol) on TCP port 631 so other machines on the network can print to it.

macOS 13 and later disable the CUPS web interface by default for security. Re-enable it with sudo cupsctl WebInterface=yes and then visit http://localhost:631/ in a browser. To turn it back off when you are done, run sudo cupsctl WebInterface=no. The cupsctl command is the standard way to toggle CUPS settings on modern macOS.

Administrative actions in the CUPS web interface require membership in the lpadmin group. Standard administrator accounts on macOS are already members of lpadmin, but if you created a non-admin account or are logged in as a restricted user, you will see a Forbidden response. Add your user to the group with sudo dseditgroup -o edit -a username -t user _lpadmin.

CUPS printer sharing uses TCP and UDP port 631 for IPP. For automatic discovery by other Macs and Linux clients, you also need UDP port 5353 for Bonjour/mDNS. If you enable Printer Sharing through System Settings, macOS opens port 631 in the application firewall for you. For a custom pf or third-party firewall, add the rules manually.

Yes. Windows 10 and 11 include an IPP client that can print directly to CUPS. In Windows, choose Add a printer > The printer I want isn't listed > Select a shared printer by name, then enter http://macname.local:631/printers/PrinterName. Windows will download a generic IPP driver. For best results, install the printer manufacturer's Windows driver first and point the IPP queue at it.

Run lpadmin -p PrinterName -o printer-is-shared=false to disable sharing while keeping the printer installed locally. You can also uncheck the printer in System Settings > General > Sharing > Printer Sharing. To turn off printer sharing entirely, toggle Printer Sharing off in the same panel — this stops advertising any printers and closes port 631 in the firewall.

Need Professional IT & Security Help?

Our team of experts is ready to help protect and optimize your technology infrastructure.