I want to setup a local network printer for me and my roomates, so they can print papers remotely without sending file to me then I have to do the operation.
At the very beginning, I installed Windows Server 2016 on a miniPC, it works perfectly fine but the CPU (Atom D425 1.8GHz) is really a pain in the ass when I try to do other jobs(Remote Display, IIS Hosting, etc). So I change the OS to Ubuntu and the performace becomes better.
Sharing a printer on Ubuntu is not that hard(it’s more complicated than its on Windows which has a GUI configuration and you just need to click some buttons), we just need to configure the printer in the system then install CUPS.
Plug the printer in and set it up.
In Ubuntu desktop, go to Settings -> Printers, then click the Add button. The left panel shows all the ports that already connected to the machine, choose the printer then choose the right driver, the system will take care of the rest configurations.
You can print a test page to check whether the printer is working when it’s done.
Open Terminal(you can open it by pressing CTRL+ALT+T on desktop).
sudo apt update
sudo apt install cups
After the installation, CUPS Web Page will listening on port 631, visit http://127.0.0.1:631 to get access to CUPS.
19-04-13 Update： I checked the settings again and realized that you don’t have to setup a reverse proxy, CUPS(version 2.1.3) will automatically listen on the external IP. But you still have to disable https if you don’t have a SSL certification or using a IP address. Open CUPS’ config file, located at /etc/cpus/cpusd.conf and add this line(the full config file documentation is here):
Then restart CPUS service:
sudo service cups restart
# or use this
sudo systemctl restart cups.service
Visit http://[IP address or domain]:631 to see the web interface. Old stuff: If you want to visit CUPS web page on your other devices, you can install nginx to setup a simple reverse proxy.
sudo apt install nginx
Open a file named [your name].conf under /etc/nginx/conf.d/, then paste: