Skip to main content

Setting up a Raspberry Pi print server so I can use my printer on my WiFi network

I'm sure by now you've heard of the single board super cheap yet super powerful $35 mini computer called the Raspberry Pi that is known to make its way into almost any computer project due to its abilities, hardware, size, and accessibility.

Such wireless technology (like over your WiFi network) makes printing from any device in your house just so easy! Now, you might have an older printer and you don't want to upgrade, and it's one of those nice and cheap black and white printers. What's the easiest and cheapest solution? Make your printer wireless!

Let's use the Raspberry Pi and a WiFi adapter to make this happen! You'll need a Raspberry Pi, a WiFi adapter, and a microSD card. Get started with your Raspberry Pi with many of the getting started guides out there on the internet, then come back to this guide.

Let's get started now. Open a terminal window and type in the following commands, following all the on-screen prompts and "yes" to everything it asks:
sudo apt-get update
sudo apt-get upgrade
lsusb
Now you should see a list of printers connected to your printer. Find the one for your printer, and note this down. Continue with typing in commands.
sudo apt-get install samba
This command will install a very popular program called Samba, which will allow files to be shared between devices on the same WiFi network. Follow all the on-screen instructions. Next we'll download and install CUPS (which stands for Common Unix Printing System) just in case your printer isn't set up yet. Type the following command.
sudo apt-get install cups
Now let's add the user account you're currently logged in to (the default one, or "pi") to the printer group so you can use the printer.
sudo usermod -a -G lpadmin pi
Open a new tab in Midori or the browser of your choice available on the Raspberry Pi and go to the following website: 127.0.0.1:631 and click on "Administration." Select "Add new" then type in your login, which by default is the username "pi" and the password "raspberry" and select the printer that should have automatically installed. Set a name and check the boxes "Share printers connected to this system", "Allow printing from the internet," and "Allow remote administration." Click Continue and allow the list to populate with drivers. Click Continue again because the correct one should be already checked. Then click "Add printer" and "Set Default Options."

Now open the file explorer and find the file at /etc/samba/smb.conf. Open it and edit it with the following text, added at the bottom. These instructions are the work of these people and these people.
printing = cups
printcap name = cups
[printers]
comment = All Printers
browsable = no
path = /var/spool/samba
printable = yes
guest ok = yes
read ok = yes
read only = yes
create mask = 0700
[print$]
comment = Printer Drivers
path = /usr/share/cups/drivers
browseable = yes
read only = yes
guest ok = no
Next find "workgroup = " and replace the line with:
workgroup = Workgroup
wins support = yes
Then you'll need to restart Samba since the configuration was changed:
sudo /etc/init.d/samba restart
You should now be able to find and add the printer on any computer connected to your WiFi as you would normally any other printer. Both Windows and Mac users should be able to find it in their Network.

Comments