The cart is empty

In today's era of digitization and the constant need for information sharing, wireless printing infrastructure becomes a necessity in many households and small offices. Raspberry Pi, with its flexibility, low cost, and extensive community support, presents an ideal platform for creating your own wireless print server. In this article, we will delve into the steps required to set up Raspberry Pi as a wireless print server using the Common Unix Printing System (CUPS) software.

Prerequisites

To realize the project, you will need:

  • Raspberry Pi (recommended model 3B or newer) with a power adapter
  • SD card with Raspberry Pi OS installed
  • Internet access (for software installation and updates)
  • USB printer
  • Access to a wireless network

Installation and System Configuration

1. Installing the Operating System

Begin with the Raspberry Pi OS installed on the SD card. If you haven't installed the system yet, download the Raspberry Pi OS image from the official website and install it on the SD card using a tool like BalenaEtcher.

2. Basic Raspberry Pi Setup

After successful OS installation, perform basic system setup, including configuring the time zone, password, file system expansion, and connecting to the wireless network. You can do these steps through the Raspberry Pi Configuration graphical interface or via the terminal using sudo raspi-config.

Installation and Configuration of CUPS

1. Installing CUPS

CUPS is an open-source printing system used in Linux and macOS for printing. To install it on Raspberry Pi, use the following commands in the terminal:

sudo apt-get update
sudo apt-get install cups

2. Adding the pi User to the lpadmin Group

To manage the printer and CUPS through the web interface, you need to add the username pi to the lpadmin group:

sudo usermod -a -G lpadmin pi

3. Configuring CUPS

After installation, you need to enable remote access to the CUPS web interface to configure the server from another computer on the same network. You can achieve this by editing the /etc/cups/cupsd.conf file and changing a few lines to the following:

# Listen for connections from any address
Port 631
Listen /var/run/cups/cups.sock

# Allow remote access
<Location />
  Order allow,deny
  Allow @local
</Location>

<Location /admin>
  Order allow,deny
  Allow @local
</Location>

4. Restarting the CUPS Service

To apply the changes made, you need to restart the CUPS service:

sudo service cups restart

Adding and Configuring the Printer

After restarting the service, go to http://<RASPBERRY_PI_IP_ADDRESS>:631 using a web browser on a computer on the same network. Through the CUPS web interface, you can add and manage printers. Click on "Administration" and then "Add Printer". The system may prompt you for a username and password, where you will use pi and the password you set.

 

By setting up Raspberry Pi as a wireless print server using CUPS, you can centralize printing tasks in your home or small office. This not only simplifies print management but also enables wireless printing from various devices, including computers, laptops, smartphones, and tablets. With its small size, low power consumption, and high flexibility, Raspberry Pi emerges as an ideal solution for implementing a wireless print server.