DebianDebian Based

How To Install CUPS Print Server on Debian 12

Install CUPS Print Server on Debian 12

In this tutorial, we will show you how to install CUPS Print Server on Debian 12. The Common Unix Printing System (CUPS) is a robust, open-source printing system developed by Apple Inc. for Unix-like operating systems. It’s a powerful tool that manages print jobs and queues, providing a seamless printing interface for a variety of applications.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the CUPS Print Server on a Debian 12 (Bookworm).

Prerequisites

  • A server running one of the following operating systems: Debian 12 (Bookworm).
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • Make sure your Debian 12 system is connected to the internet. An active connection is essential for downloading the required packages and updates during the installation.
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install CUPS Print Server on Debian 12 Bookworm

Step 1. Kickstart the process by installing CUPS on your Debian system. First, update your system’s package list by running the following command in your terminal:

sudo apt update
sudo apt upgrade

Step 2. Installing CUPS on Debian 12.

Once the system is updated, install CUPS by executing:

sudo apt install cups

Step 3. Configuring CUPS.

After installing CUPS, the next step is to configure it. This involves editing the /etc/cups/cupsd.conf file, which controls the CUPS server settings. Use your preferred text editor to open the file:

sudo nano /etc/cups/cupsd.conf

In this file, you can set the IP addresses and ports the service listens to. Be cautious not to configure CUPS to listen on interfaces that allow access from untrustworthy networks, as this could pose a security risk.

With CUPS installed and configured, you can now add a printer. This is done using the lpadmin command. Before proceeding, ensure that CUPS is running and that the client’s IP address has permission to access the web interface. The command to add a printer is as follows:

sudo lpadmin -p [printer_name] -E -v [device_URI] -m [PPD_file]

Step 4. Configuring Printer Sharing.

CUPS also allows you to share your printer with other devices on the network. To configure printer sharing, navigate to the /etc/cups/cupsd.conf file and add the following lines:

<Location /printers>
  Order allow,deny
  Allow @LOCAL
</Location>

This configuration allows local devices to access the printer. Remember to replace @LOCAL with your network details.

Step 5. Troubleshooting Common Issues.

Despite careful setup, you may encounter issues when installing and using a CUPS Print Server. Common problems include difficulties locating the PPD file, issues connecting to a remote printer, and problems resulting from system upgrades. When troubleshooting, start by checking the CUPS error log (/var/log/cups/error_log) for any error messages. Also, ensure that your printer is correctly connected and powered on, and that the correct drivers are installed.

Congratulations! You have successfully installed CUPS Print Server. Thanks for using this tutorial to install the latest version of the CUPS (Common Unix Printing System) on Debian 12 Bookworm. For additional help or useful information, we recommend you check the official CUPS Print Server website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button