A print server is a computer with one or more connected printers that can be reached via a network. Many modern printers have a built-in print server. If your printer does not have this, you can solve this by Raspberry Pi can be used as a print server. In this tutorial I will go through the steps of setting one up Raspberry Pi-print server.
This manual covers:
- Level – Beginner, Intermediate 30%
- Duration 15 min 35%
- Cost - € 70,30 50%
Step 1: Supplies:
- Raspberry Pi 4B
- Raspberry Pi 4B power supply
- Micro SD card Raspberry Pi OS
- Micro-HDMI to HDMI cable
- Mouse & keyboard
- Monitor
- USB printer
- USB cable
Step 2: Connect & Start Up
You must first connect your printer to your computer with a USB cable Raspberry Pi. Then you sit down Raspberry Pi and USB printer. When you Raspberry Pi Once you have started, you need to open the terminal. In this terminal you can enter the commands that the Raspberry Pi has to do. What you need to type here can be found in the next chapter.
Step 3: Set up the print server
1. Raspberry Pi update
To start, we need to get the Raspberry Pi update first. We do this to ensure that we use the latest software. To do this, we enter the following commands in the terminal:
sudo apt update
sudo apt full upgrade
2. Raspberry Pi Restart
When the update is finished, restart the pi with sudo reboot.
sudo reboot
3. Install the Common Unix Print System (CUPS) software
After the Raspberry Pi is updated, we can start installing the print server software. In this case we install CUPS.
Install this software by typing the following command in the terminal:
sudo apt-get install cups
Downloading may take some time…
4. Once CUPS is done installing, there are a few additional things we need to do.
The first thing you need to do is add the pi user to the lpadmin group. This group will give the pi user access to the administrative functions of CUPS without having to use the superuser. this will allow us to manage the print server later.
sudo usermod -a -G lpadmin pi
5. Install Samba on the Raspberry Pi
Samba allows users of a Windows system to access shared files and printers of a Unix system and vice versa. So this is necessary for you Raspberry Pi to work as a print server. You can install Samba by entering the following command:
sudo apt-get install samba
When Samba is installed on you Raspberry Pi , we need to open the configuration file and perform several operations. We can open the file with the following command:
sudo nano /etc/samba/smb.conf
Scroll down here and change the following information:
guest ok = No. –> yes
readonly= Yes –> no
Then save the file by ctrl+X (Exit), and then click the j (Yes) button.
Now we have to restart Samba. You do this by typing the following line in the terminal:
sudo systemctl restart smbd
6. Add a printer to CUPS
Now that you have Samba properly installed, you can add a printer to CUPS. To do this, go to your web browser and look for the following site:
localhost.631
You will then see this screen. Click here Administration.
You will then arrive at the next screen. This is where you have to go Add Printer click.
You will often be asked to log in to continue. You must enter your username and password. If you haven't changed this, your username is 'pi', and your password 'raspberry'.
You will then arrive at this screen. Here you can select your printer. Your printer that you have on your Raspberry Pi connected with a USB cable, it will be listed under “Local Printers”. You must select this. Then click on Continue.
You now go to the next screen. Here you can give your printer a name and a description. It is useful to set the location if you have multiple printers in your home that you need to deal with. I'll leave it as it is. You must check the box if you want to share your printer. Then you have to get up Continue click.
Then click on this as well Continue.
Now you come to this screen. On this screen you will need to select the model of your printer. CUPS will try to automatically detect the model and choose the correct driver. When you have done this, click Add Printer.
The last screen you will see after you have set up your printer is shown below. This screen allows you to change some of the printer's specific settings. Such as the print size of the page, the print quality and various other options. Then click Set Default Options.
You will now arrive at the following screens:
You see that you have shared your printer.
Now you can use the Raspberry Pi use as a print server. When you go to Printer and Scanners setting on your PC, you will see the Raspberry Pi standing between them. This way you can start a network connection with a USB printer.
If you have successfully completed this project, you will know how to proceed with your Raspberry Pi create a print server.