Setup RPI print server with CUPS
CUPS (Common Unix Printing System) is a tool there is allowing you Raspberry Pi to act as a network printer, and the tool will of course work on other systems aswell. You can manage Classes, ques, filter and so much more with CUPS and is going t make your life a lot easier if you only has a USB printer!
Step 1. Pre-requisites
You are going to need the following items
1. Raspberry pi (Model doesn’t matter)
2. At least one printer with USB connection
Step 2. Install and Configure CUPS
The first thing we are going to do is to install cups.
sudo apt-get install cups
Then we are going to add our existing user named pi to the usergroup lpadmin created by CUPS.
sudo usermod -a -G lpadmin pi
And that was it. Theoretical you have a print server now, but we need to make a few changes in the configuration to make it work. I am going to use VIM as my text editor but if you prefer another text editor such as Nano then go change vim in the command with your favorite text editor.
sudo vim /etc/cups/cupsd.conf
And go to line 6. and change
0.0.0.0:631to make it listen on all interfaces.
# Only listen for connections from the local machine.
Go to line 32. as you can see this is where you can restrict the access to the server, go ahead and insert
Allow @local right under Order allow,deny. if you are going to run into trouble later the replace
Allow @local with
# Restrict access to the server...
To be able to access the configuration files then insert
Allow @local right under Order allow,deny. And again if you are going to run into trouble and see a message in the web gui then replace
Allow @local with
# Restrict access to the configuration files...
< /Location >
Exit and save the configuration file. And the restart CUPS to make it load the new configuration.
Step 3. Add a printer
So close the terminal and head over to your browser and type
you_RPI's_IP:631 and then you should see something similar to this
This is the CUPS WEBGUI where you easily can add and configure the server if you don’t feel too familiar with the terminal.
Fill out the needed information and make sure to check
Sharing. Make sure to select the right model for the printer! if your printer aren’t listed there then you should try to see if you can find a PPD file for it instead.
And that is it! you should have a running and fully working print server now. The nex thing will be to add a network printer on you computer.