X
Tech
Why you can trust ZDNET : ZDNET independently tests and researches products to bring you our best recommendations and advice. When you buy through our links, we may earn a commission. Our process

'ZDNET Recommends': What exactly does it mean?

ZDNET's recommendations are based on many hours of testing, research, and comparison shopping. We gather data from the best available sources, including vendor and retailer listings as well as other relevant and independent reviews sites. And we pore over customer reviews to find out what matters to real people who already own and use the products and services we’re assessing.

When you click through from our site to a retailer and buy a product or service, we may earn affiliate commissions. This helps support our work, but does not affect what we cover or how, and it does not affect the price you pay. Neither ZDNET nor the author are compensated for these independent reviews. Indeed, we follow strict guidelines that ensure our editorial content is never influenced by advertisers.

ZDNET's editorial team writes on behalf of you, our reader. Our goal is to deliver the most accurate information and the most knowledgeable advice possible in order to help you make smarter buying decisions on tech gear and a wide array of products and services. Our editors thoroughly review and fact-check every article to ensure that our content meets the highest standards. If we have made an error or published misleading information, we will correct or clarify the article. If you see inaccuracies in our content, please report the mistake via this form.

Close

How to set up a print server on your home network with Linux

If you have multiple computers that need to print to one printer on your home network, you can use Linux as a reliable print server.
Written by Jack Wallen, Contributing Writer
printer
FabrikaCr/Getty Images

On my home network, I have a single Brother laser printer. It's aging but still works like a champ (and the company still produces toner cartridges, which can be easily purchased from Amazon). 

Multiple computers use the printer, so I had to set up my desktop as a print server. Yes, I could have deployed Linux on a server for that purpose, but it was easier from my desktop. On top of that, most users aren't going to want to also deploy a server on their home LAN.

Also: Want to save your old computer? Try these 6 Linux distros

But how do you set up a print server? Believe it or not, it's easier than you might think. Let me show you how it's done.

How to set up your print server

What you'll need: The most important thing you'll need (besides a running instance of Linux) is a printer supported by the open-source operating system. If you're unsure, the following printers are always a safe bet:

  • Brother HL-L2350DW
  • Brother HL-L3210CW
  • Brother MFC-L3750CDW
  • HP Neverstop 1202w Laser Printer
  • HP Color LaserJet Pro M255dw
  • HP OfficeJet Pro 9025
  • Canon PIXMA TR8520 All-In-One Printer
  • HP LaserJet Pro M28w Monochrome Laser Printer
  • Epson EcoTank ET-3760 All-in-One Supertank Printer
  • Epson EcoTank ET-3830

You'll also need a running instance of Linux (I'll demonstrate this on Pop!_OS, which is based on Ubuntu) and a user with sudo privileges. Ensure your printer is connected and working properly from your server before you start making any changes.

Also: How to print from Linux using only the command line

Let's get to work.

1. Install CUPS

The first thing to do is install CUPS (Common Unix Print Server), which can be done with the command:

Show more

sudo apt-get install cups -y

If you're using a Fedora-based distribution, the command would be:

sudo dnf install cups -y

2. Start and enable the server

Next, you'll need to start and enable the CUPS server with the command:

Show more

sudo systemctl enable --now cups

3. Configure CUPS

Now that CUPS is installed, we have some configuration options. Although this is done via a terminal-based text editor, don't panic… I'll show you the way.

Show more

Open the configuration file with the command:

sudo nano /etc/cups/cupsd.conf

The first thing to change is this:

Browsing Off

Change that to:

Browsing On

Next, we need to configure the settings so you can use the web-based CUPS manager from any machine on your network. Look for the line:

Listen localhost:631

Change that to:

Port 631

We now need to ensure that CUPS is listening to all network interfaces. Look for the following section:

<Location />
  Order allow, deny
</Location>

Change that to:

<Location />
  Order allow, deny
  Allow @LOCAL
</Location>

Finally, let's add access to the admin console. Look for the following section:

<Location /admin>
  Order allow, deny
</Location>

Change that to:

<Location /admin>
  AuthType Default
  Require valid-user
  Order allow, deny
  Allow @LOCAL
</Location>

Save and close the file with the Ctrl+x keyboard shortcut.

Restart CUPS with:

sudo systemctl restart cups

4. Make the printer available to MacOS or other desktops

For MacOS and other OSes, you'll need to install software for Bonjor (MacOS) and IPP (other OSes). Do that with the command:

Show more

sudo apt-get install avahi-daemon -y

Start and enable the new service with:

sudo systemctl enable --now avahi-daemon

Now that you've taken care of the setup, your printer should be visible to any computer on your LAN. Do keep in mind that, depending on the OS, you might have to install drivers for the printer. This is often the case with Windows. 

Also: When Windows 10 support runs out, you have 5 options but only 2 are worth considering

On Linux machines, if the printer is supported on your server, chances are good you won't have to install any drivers for the other machines. I've found the same thing holds true with MacOS, but your mileage may vary.

Editorial standards