This project is built on Raspberry Pi OS. Unless you plan on using a monitor or screen, you can get away with using the light version.
If you haven't already, go ahead and install Raspberry Pi OS onto a microSD card. You will need access to the internet. Visit our guides on how to enable SSH and how to set up WiFi on a headless Raspberry Pi for help setting this up.
It's important to update Raspberry Pi OS before installing CUPS. If you've never done this before, check out our guide on how to update Raspberry Pi OS. You will need to access the Pi via SSH using a terminal.
Once the Pi has been updated, run the following command to install CUPS.
$ sudo apt-get install cups
Connect your printer to the Raspberry Pi. The cable you need for this step may differ depending on the type of printer you're connecting and what model of Pi you're using.
In my case, I'm using a Canon MX922 and a Raspberry Pi Zero W. The Canon is connecting to the Pi Zero with a USB B to Micro USB setup. I had to use a USB A to Micro USB adapter. Again, your needs may not match what I'm using for this step.
When the printer is connected, turn it on.
Add your Raspberry Pi username to the CUPS system to create a profile. Replace
pi with your username.
sudo usermod -aG lpadmin pi
Now we can start the CUPS software on the Raspberry Pi. In a terminal window, run the following command.
sudo /etc/init.d/cups start
Permissions are necessary to access the web interface from any computer. Run the following command to apply the appropriate permission level and restart the application.
$ sudo cupsctl --remote-any $ sudo /etc/init.d/cups restart
As an optional step, you can take this opportunity to set a static IP address on the Raspberry Pi.
Access the CUPS web interface using either the hostname or IP address for the Raspberry Pi. Paste this address into your browser, replacing [YOUR_PI] with the IP or hostname.
When the web interface loads, go to the Administration tab and choose Add Printer.
Choose your printer from the list. Set a name, description, and location for your printer. The name field can't have any spaces, slashes, or pound signs. You can use this screen to choose whether or not the device is shareable on the network. Click Continue.
Select a PPD for your printer model from the list or upload one from your machine. When a PPD file has been specified, click Add Printer. It should now appear under the Printers tab.
To manage your printer, select it under the Printers tab. Use the Jobs section to show a list of completed jobs or currently queued print jobs.
In the upper left are a couple of drop-down menus. The left menu has maintenance features like test pages and print job management. The right menu has administrative options like adding user permissions or removing the printer entirely. You can also use the Administration menu to change the default print settings for the printer under Set Default Options.
Great job! You've created a Raspberry Pi-powered print server. You should be able to discover and connect to printers on this Pi server like any other wireless printer.
The Raspberry Pi is a wonderfully flexible SBC and easily one of our favorite open-source boards on the market today.