≡ Menu

How to Setup CUPS Printer Admin Web GUI for Remote Access

CUPS stands for Common UNIX Printing System

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

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


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.

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

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:631
Port 631
Listen /var/run/cups/cups.sock
..

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...
<Location />
  Order allow,deny
  Allow 127.0.0.2
  Allow your-desktop-client-ip-or-subnet
</Location>
..

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 restart
Shutting down cupsd    done
Starting cupsd         done

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 On
BrowseOrder allow,deny
BrowseAllow all
BrowseAddress 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
Add your comment

If you enjoyed this article, you might also like..

  1. 50 Linux Sysadmin Tutorials
  2. 50 Most Frequently Used Linux Commands (With Examples)
  3. Top 25 Best Linux Performance Monitoring and Debugging Tools
  4. Mommy, I found it! – 15 Practical Linux Find Command Examples
  5. Linux 101 Hacks 2nd Edition eBook Linux 101 Hacks Book

Bash 101 Hacks Book Sed and Awk 101 Hacks Book Nagios Core 3 Book Vim 101 Hacks Book