Using a Raspberry Pi as a Wireless Print Server
![Ben](https://fleetstack.s3.eu-west-2.amazonaws.com/assets/blog/benjislab.webp)
Turning your Raspberry Pi into a wireless print server is a great way to centralize your printing needs. It allows you to print from any computer or mobile device on your network. We'll be using the Common UNIX Printing System (CUPS) for this setup.
What You'll Need
- Raspberry Pi with Raspbian installed
- USB printer
- USB cable
- Internet connection for the Raspberry Pi
- Basic knowledge of Linux and networking
Step 1: Installing CUPS
Connect to your Raspberry Pi via SSH or use a monitor and keyboard. Begin by updating your Raspberry Pi:
sudo apt-get update
sudo apt-get upgrade
Then, install CUPS:
sudo apt-get install cups
Step 2: Configuring CUPS
Add your user to the lpadmin
group to manage printers:
sudo usermod -a -G lpadmin pi
Next, edit the CUPS configuration to allow remote access:
sudo nano /etc/cups/cupsd.conf
Change the following lines:
# Only listen for connections from the local machine
Listen localhost:631
Port 631
To:
# Listen for connections from anywhere
Port 631
Listen /var/run/cups/cups.sock
And under <Location />
and <Location /admin>
, change Allow @local
to Allow all
.
Restart CUPS to apply the changes:
sudo systemctl restart cups
Step 3: Adding Your Printer
- Connect your printer to the Raspberry Pi via USB.
- Go to
http://<Your-Raspberry-Pi-IP-Address>:631
in a web browser. - Click on “Administration” and then “Add Printer.”
- Enter your Raspberry Pi’s username and password.
- Follow the prompts to add and configure your printer.
Step 4: Printing from Other Devices
Your Raspberry Pi is now a print server! On other devices, add a new printer using the Raspberry Pi’s IP address. The process varies depending on the operating system, but generally, you'll find it in the printer settings.
Conclusion
You've successfully turned your Raspberry Pi into a wireless print server! This setup not only saves space and money but also makes it more convenient to print from anywhere in your home or office.