Learn to Setup CUPS Printer Admin Web GUI for Remote Access

In this quick tutorial, we’ll show you how you can allow web UI access for an existing CUPS installation.

CUPS stands for Common UNIX Printing System

There are two ways to manage your printers on Linux environment:

  1. First, from web UI, you can manage your printers interactively
  2. Second, from command line, using lpadmin command, you can configure your printer and manage the print queues

In one of our previous tutorial, we discussed about how to add new printer, change the printer settings, and manipulate print queues using 12 examples of lpadmin command on Linux.

Allow Local Subnet to Access Printer Web GUI

Add the local desktop IP address or the subnet from which you want to access the printer URL, it should look like below in /etc/cups/cupsd.conf

# vi /etc/cups/cupsd.conf..# Restrict access to the server...  Order allow,deny  Allow 127.0.0.2  Allow your-desktop-client-ip-or-subnet..

Note: In the above, change the “your-desktop-client-ip-or-subnet” to the ip-address of your desktop client. Instead of ip-address, you can also specify the subnet here.

Restart the CUPS Service

After making the above changes, restart the CUPS service as shown below.

# service cups restartShutting down cupsd    doneStarting cupsd         done

Manage Printer from Web GUI

All the printer configurations & classes that we setup using lpadmin command line, can also be managed from your browser from the following location:

https://hostname-or-ipaddress:631/admin

To configure this URL, you must do the following changes on your /etc/cups/cupsd.conf

Modify the cupsd.conf file, and do the following two changes:

  1. Comment-out this line: Listen localhost:631
  2. Add this line Port 631
# vi /etc/cups/cupsd.conf..#Listen localhost:631Port 631Listen /var/run/cups/cups.sock..

CUPS Web UI for Remote Access

After the above changes, you should be able to access the printer from Web URL as shown below:

https://{your-ip-address}:631/admin

CUPS Admin Home Page

The following displays all the printers that are connected to your Linux system.
CUPS Printer List

Shared Printer Configuration

You can also enable or disable browsing support in your CUPS.

When you enable the browsing, then this will display the shared printers from your local network.

Add the following entries to your cupsd.conf file if you want Browsing to be turned on.

# vi /etc/cups/cupsd.conf..Browsing OnBrowseOrder allow,denyBrowseAllow allBrowseAddress your-desktop-client-ip-or-subnet..

Note: Change the your-desktop-client-ip-or-subnet to your ip-address accordingly.

When you turn-off browsing, then polling will be enabled automatically. In this case, you’ll not be able to view all the shared printers from your local network. So, you have to poll for it manually.

# vi /etc/cups/cupsd.conf..Browsing Off

>

You may also like...