Raspberry Pi Print Server

03 Nov 2024

Last updated: 2024-12-18

In this article I will describe how to set up a USB printer as a (wireless) network printer, using a Raspberry Pi 3. Finally I will connect my Linux desktop and other clients with the printer. In this example I’m connecting a Brother laser printer (HL-L2310D), however most of the tutorial is applicable for any USB printer.

Install the Operating System

Install the Raspberry Pi Imager software on your (Linux) desktop, it makes the installation of the images easily. On EndeavourOS (Arch) this is as easy as running:

1
pacman -S rpi-imager

Connect a Micro-SD card to your desktop PC and open the program.

Operating System Choice

You can choose to install Raspberry Pi OS with desktop environment or without. For the purpose of this project I recommend to install Raspberry Pi OS Lite (64-bit), since we won’t need the desktop environment.

Custom Configuration

When proceeding to the next installation step, the Raspberry software will ask you whether to use a custom configuration. Choose to do so, since it will make things easier later.

Recommended settings:

Configure the Raspberry Pi

Connect the Pi to your router with a network cable. Plug the USB printer into your Pi. Insert the Micro-SD card and turn the Raspberry on. It can take a minute until you can login:

1
ssh pi@raspberrypi

First update the system:

1
2
sudo apt update
sudo apt full-upgrade

CUPS Configuration

Next we will need to set up the CUPS printing system. Install CUPS:

1
sudo apt install cups

Add your user to the lpadmin group:

1
sudo usermod -a -G lpadmin pi

Enable the sharing of printers with your network:

1
cupsctl --share-printers

Open a browser on your desktop PC and open the CUPS admin page (it might take a couple of seconds until the address can be resolved)

1
http://raspberrypi:631

When you go to the administration page, it will ask you to switch to the actual IP address of your Pi for managing printers. Follow this request.

When choosing to add a printer, your printer should be shown. After proceeding you’re asked to select a driver. In case no fitting driver is listed, you need to install the driver before being able to continue. If it’s listed you can skip the driver section following.

Install Printer Driver

Now install the appropriate printer drivers. In case of my Brother laser printer there are no ARM drivers available out of the box, so they need to be installed manually. Luckily there are open-source drivers available for my HL-L2310D printer, which can easily be installed:

1
sudo apt install printer-driver-brlaser

Add Printer to CUPS

Back in the CUPS admin page the device can now be selected. Choose to share this printer. Print a test page from within the CUPS web interface.

Connect Clients

Linux PC (EndevourOS)

On EndeavourOS (KDE) the printer can’t be found (via GUI) out of the box. But there is a handy tool to the rescue. Install it as follows:

1
pacman -S system-config-printer

Then launch the tool:

1
system-config-printer

Follow the instructions, add the printer and that should be it!

Linux PC (Bazzite)

While not discovered by the printer settings GUI, the easiest way I found was using a terminal command.

1
sudo lpadmin -p brother -E -v ipp://raspberrypi:631/printers/Brother_HL-L2310D_series -m everywhere

Windows PC

On Windows 10 the printer was recognized out of the box.

Android

On Android 15 I had to manually add the printer: Default Print Service -> Add printer

1
raspberrypi:631/printers/Brother_HL-L2310D_series

The printer name you can find in the CUPS web interface. Afterwards I had to restart my phone in order to show the printer in the printer dialog.

Share this on: Bluesky Threads X Facebook LinkedIn Reddit WhatsApp Email

Did you find any issue? Follow the link to the source below and open an Issue or a PR!