Community-driven coverage of elementary OS — news, guides & forums
Dark abstract low-poly geometric landscape with layered triangular facets in deep navy, charcoal, and muted teal, illuminated by a soft electric-blue glow near the horizon

News roundups, tutorials, application guides, and forums — built by users, for users of the elegant Linux distribution.

elementary weekly
#20
Latest roundup · 18 Apr 2015
Freya Release
Final
Covered in weekly #19 & #20
Forum Topics
Active
Installation, customization & more

Set up a CUPS print server on elementary OS

A spare elementary OS computer can become a reliable print server for a home, studio, or small office. The Common Unix Printing System, better known as CUPS, handles printer drivers, queues, jobs, and network access, allowing other computers on the same network to print without connecting directly to the device. This is useful when a USB-only printer is shared between several users or when an older printer lacks modern wireless features.

The setup works best when the elementary OS machine has a dependable connection to the local network. A desktop connected by Ethernet is preferable, although a laptop on Wi-Fi can also work if it remains powered on. In an Australian home using an NBN modem-router, the printer server and client computers should be connected to the same private network rather than an isolated guest network.

Prepare elementary OS and the printer

Start by installing updates and the packages needed for CUPS, printer discovery, and common drivers. Open Terminal and run:

sudo apt update
sudo apt full-upgrade
sudo apt install cups cups-client avahi-daemon printer-driver-gutenprint

The Gutenprint package supports many older Epson, Canon, HP, Brother, and other models. It is not required for every printer, particularly newer models that support IPP Everywhere, but it provides useful fallback drivers. Some manufacturers distribute Linux drivers separately, so check the exact model number if the printer does not appear or produces blank pages.

Enable the printing service and make sure it starts automatically:

sudo systemctl enable --now cups
sudo systemctl enable --now avahi-daemon

Avahi publishes the printer on the local network using mDNS, which is the technology behind names ending in .local and much of automatic printer discovery. It should be active on the server and, where necessary, on client machines.

Connect the printer by USB and switch it on. Then open System Settings and look for the printer settings panel. If the device is detected, add it and print a test page. The queue name created by CUPS is important later, so record it from the printer properties. A short name such as office_laser is easier to use than a long manufacturer-generated identifier.

If the printer is already network-capable, plugging it directly into the router may be simpler than sharing it through elementary OS. A CUPS server is most useful for a USB printer or a model that needs a particular Linux driver. For an office in Melbourne or Perth, this distinction can also reduce troubleshooting: a network printer remains available when the designated elementary OS computer is asleep.

Add and test the local print queue

CUPS provides a browser-based administration page at http://localhost:631. Open it on the elementary OS server and select Administration or Printers. The first time you add a printer, the page may ask for authentication. Use your normal elementary OS username and password, provided that your account belongs to the lpadmin group.

Add the account to that group if required:

sudo usermod -aG lpadmin "$USER"

Log out and back in before trying the CUPS administration page again. Membership in lpadmin permits printer administration without granting unrestricted system access. It is preferable to carrying out every printer task as the root user.

Choose Add Printer, select the USB or detected network connection, and give the queue a recognisable name. Avoid spaces and punctuation in the queue name. When CUPS asks for a make and model, select the exact driver if it is listed. If the printer supports driverless printing, choose an option labelled IPP Everywhere, AirPrint, or a similar driverless profile. These profiles are often the best choice for recent multifunction printers.

The queue’s device URI deserves attention. A USB queue may look similar to usb://HP/..., while a network queue can use an address such as ipp://192.168.1.45/ipp/print. Do not change the URI unless the printer is not responding or you have a specific reason. A wrong address can leave jobs stuck in the queue even though the printer appears correctly installed.

Print a test page from CUPS, then test a document with plain text and a PDF containing graphics. Check paper size, duplex settings, colour mode, and tray selection. Australian offices generally use A4 paper, but an imported printer may default to US Letter. Set A4 as the default in the printer properties so that documents from LibreOffice and web browsers do not unexpectedly spill onto a second page.

The CUPS command line is useful for diagnosis:

lpstat -t
lpstat -p office_laser -d
lp -d office_laser /usr/share/cups/data/testprint

Replace office_laser with the queue name shown on your system. The first command displays the server, devices, queues, and jobs. The second checks whether the queue is enabled and identifies the default printer. The last sends a built-in CUPS test page.

Share the printer across the local network

A printer installed locally is not automatically available to other computers. CUPS must be told to share it, and the server must accept connections from the trusted local network. The following command enables printer sharing and allows remote clients to use shared queues:

sudo cupsctl --share-printers --remote-any
sudo systemctl restart cups

--remote-any permits access from remote addresses, so use it only on a private network behind your router. Do not expose CUPS directly to the internet through port forwarding. A public CUPS service can allow unauthorised printing, reveal printer information, or become an entry point for attacks.

If elementary OS has its firewall enabled, allow IPP traffic on the local network. With UFW, a simple rule is:

sudo ufw allow 631/tcp
sudo ufw status

A more restrictive rule can permit only the local subnet. For a typical home network using 192.168.1.x, use:

sudo ufw allow from 192.168.1.0/24 to any port 631 proto tcp

Use the subnet shown by your router rather than copying this range blindly. Many Australian NBN routers use 192.168.1.x or 192.168.0.x, but mesh systems, business gateways, and custom configurations can differ.

Avahi can advertise the shared queue automatically. On another Linux computer, the printer may appear in the printer settings within a few seconds. If it does not, add it manually using the server’s IP address. The shared queue normally follows this format:

ipp://SERVER_IP:631/printers/QUEUE_NAME

For example:

ipp://192.168.1.20:631/printers/office_laser

Use the elementary OS server’s local IP address, not its public address. A DHCP reservation in the router is a sensible next step because it keeps the server’s address stable after a reboot. In a Brisbane home office, for example, a reserved address prevents every household computer from losing the printer after the router renews its leases.

You can check the server address with:

hostname -I

If the server has several addresses, choose the one belonging to the same network as the client. Avoid relying solely on a Wi-Fi connection that frequently sleeps, particularly if the computer is an older laptop with aggressive power management.

Connect elementary OS and other clients

On another elementary OS computer, open the printer settings and wait for network discovery. A shared queue may appear under the server name or as an IPP printer. Select it, verify the driver, and make it the default if appropriate. The client generally sends the print job to CUPS, while the server handles the USB connection and the final communication with the printer.

Manual setup is often more predictable. Select Add Printer, choose an IPP connection, and enter the shared queue address. Use the exact queue name from lpstat -p on the server. If the client asks whether to use a local driver, select the same driver family used by the server where possible. For a driverless queue, choose IPP Everywhere rather than installing an unrelated model-specific driver.

Windows clients can usually add a shared IPP printer by entering the same http:// or ipp:// address, depending on the version and printer wizard. macOS clients commonly discover the queue through Bonjour, which is Apple’s name for the same general mDNS approach used by Avahi. Android devices and Chromebooks may print directly if the printer advertises IPP or if an appropriate printing service is installed.

When a client cannot discover the queue, test basic connectivity first:

ping SERVER_IP
curl http://SERVER_IP:631/printers/QUEUE_NAME

A successful ping shows that the machines can reach one another, while curl should return a CUPS page or printer information. If ping works but the CUPS request fails, inspect the firewall and CUPS listening settings. If both fail, check whether the client is connected to guest Wi-Fi. Guest networks commonly block communication with wired devices and other wireless clients.

For community troubleshooting, record the elementary OS release, printer model, connection type, and the output of lpstat -t. The elementary OS news section can also help identify distribution changes that affect desktop settings, package availability, or printing support.

Secure, maintain, and troubleshoot the server

The server should be treated like any other shared network service. Use a strong local account password, install updates regularly, and keep the printer on a private LAN. CUPS administration should remain limited to the elementary OS machine unless remote administration is genuinely needed. Printer sharing and remote administration are separate features; clients need to submit jobs, not manage the server.

To inspect the service and recent errors, use:

systemctl status cups
journalctl -u cups --since today

CUPS also records activity in /var/log/cups/. If a job remains in the queue, inspect it with:

lpstat -o
cancel -a office_laser

A queue that is paused can be resumed with:

cupsenable office_laser
cupsaccept office_laser

Replace the queue name as required. cupsenable allows the printer to process jobs, while cupsaccept permits new jobs to enter the queue. These are useful after a paper jam, an unplugged USB cable, or a printer restart.

For poor output, revisit the driver rather than repeatedly resending the document. A generic PostScript driver may produce incorrect fonts, while a Gutenprint profile may improve colour and duplex handling. Driverless IPP is usually clean for recent printers, but multifunction features such as scanning may require a separate package or vendor utility.

Power management is another common source of confusion. If the server suspends, the queue may appear available while jobs wait until the computer wakes. Set the server to remain awake when it is acting as a print host, or schedule printing around its normal use. A small always-on desktop or low-power mini PC can be more dependable than a family laptop that travels between a home in Adelaide and the office.

Keep the printer’s physical location practical as well. Dust, heat, and unstable power can cause failures that look like software problems. A surge-protected outlet is worthwhile, and storing spare A4 paper near the printer avoids needless queue testing when the tray is empty. For a small shop in regional New South Wales, keeping a USB cable available is also sensible in case Wi-Fi discovery stops working during a router replacement.

Once the queue prints locally, the firewall permits trusted LAN traffic, and clients use the shared IPP address, the arrangement is straightforward to maintain. The elementary OS computer must stay powered on, CUPS must remain active, and the server’s local IP should remain stable. In practice, a reserved DHCP address, a tested A4 default, and a written queue address provide the most useful day-to-day safeguards.

Browse the News Archive
Latest Updates

From the elementary weekly series

Low-poly faceted abstract render in dark charcoal and electric blue tones, suggesting a news bulletin or announcement
elementary news

elementary weekly #20

The first week with the final Freya release — community reactions, tips, and early impressions gathered in one roundup.

Abstract low-poly geometric scene in midnight blue and soft cyan, conveying a live broadcast or event atmosphere
elementary news

elementary SPECIAL

A live Hangouts event with the elementary OS founders, held on 11 April 2015, discussing the Freya final release.

Low-poly faceted render in deep navy and muted teal with subtle amber highlights, suggesting a tutorial or guide
Tips and Tricks

Timeshift Guide

How to use Timeshift — the intuitive system restore utility for elementary OS — to recover from configuration mishaps.

Explore

Topics & Resources

Dive into guides, application recommendations, and community discussions covering every aspect of elementary OS.