we will be using CUPS to create a shared printer, connected locally via usb to a raspberry pi. The Pi will be connected wirelessly to your network.
i will assume that you have a standard install of raspberry pi os already set up on your board. make sure that you have ssh enabled by creating a file called “ssh” in the root of your boot drive. also, it might be easiest to enable wifi by creating a file called “wpa_supplicant.conf” and filling it with the info from the following site:
https://www.raspberrypi.org/documentation/configuration/wireless/headless.md
after this is done, we have a few steps to go through:
- prepare installation
- install CUPS
- install printer drivers
- install samaba server
- install airprint server
1. prepare installation
before we start, we should make sure we are up to date on all our packages with the apt command:
sudo apt update && sudo apt upgrade
Also, we want to go into our router and set up a static dhcp lease. i will leave that to a separate guide.
2. install cups
then, we install cups, it’s very simple:
sudo apt install cups
we’ll need a few more things to get it ready to work. first is adding the default pi user to the permissions group to use the printer. run this:
sudo usermod -a -G lpadmin pi
then, we need to open up the networking so the CUPS server will respond to anything across the network:
sudo cupsctl --remote-any
and that’s it! you might want to reboot the Pi now to make sure we’ll all set before the next step.
3. install printer drivers
the CUPS server runs a webserver for config on port 631, navigate there in a browser, to the static address you put into your router. for me it was:
192.168.1.91:631
from there, we can use the front end to install drivers. to determine what driver you need, you can go to:
https://www.openprinting.org/printers
4. install samba server
5. install airprint server
6. install print drivers on your local windows setup
7. references
https://www.tomshardware.com/how-to/raspberry-pi-print-server
https://pimylifeup.com/raspberry-pi-print-server/
https://circuitdigest.com/microcontroller-projects/raspberry-pi-print-server
https://medium.com/swlh/setup-a-print-server-using-raspberry-pi-cups-part-1-c8f3d48af047