Turn Your Ubuntu Server into a Home Print & Scan Hub (With HP ENVY Inspire 7220)

If you’ve ever wanted to free your home or office from cloud-dependent printers and scanners, this guide is for you. We’ll walk through how to turn an Ubuntu server into a fully local print-and-scan hub using the HP ENVY Inspire 7220, with CUPS handling the printing and SANE (plus optional scanservjs) powering network scanning for any device on your LAN.

What You’ll Need

  • HP ENVY Inspire 7220 (or similar All-in-One printer/scanner)
  • A running Ubuntu Server (I’m using Ubuntu 22.04)
  • Local network access (Wi-Fi or Ethernet)
  • Basic command-line comfort
  • [Optional] Docker installed for a slick web scanning interface

Step 1: Connect Your Printer/Scanner

Connect the HP ENVY to your server:

  • Via USB, or
  • Ensure it’s connected to the same Wi-Fi network

Check it’s visible:

lsusb

Step 2: Install Essential Packages

Install the software stack for printing and scanning:

sudo apt update
sudo apt install cups hplip sane sane-utils avahi-daemon

CUPS handles printing, HPLIP manages HP-specific features, and SANE is your go-to for scanning.


Step 3: Set Up the Printer with CUPS

Run the HPLIP wizard:

sudo hp-setup

Then configure CUPS:

sudo cupsctl --share-printers
sudo usermod -aG lpadmin $USER

Now head to:

http://<your-server-ip>:631
Go to Administration > Add Printer, and make sure it’s shared.

Boom. Printer’s online for all your devices.


Step 4: Set Up Scanner Access Over the Network

Check if your scanner is recognized:

scanimage -L

Edit the SANE daemon config:

sudo vim /etc/sane.d/saned.conf

Add your network range:

192.168.1.0/24

Now allow saned to run:

sudo nano /etc/default/saned
# Change to:
RUN=yes

Start the service:

sudo systemctl enable saned.socket
sudo systemctl start saned.socket

Now your scanner is network-accessible to Linux clients.


BONUS: Add a Web-Based Scanning UI with scanservjs

If you want a smooth browser interface to scan from any device, here’s how to set up scanservjs.

Make sure Docker is installed, then run:

docker run -d \
  --name=scanservjs \
  --device /dev/bus/usb \
  -p 8080:8080 \
  --privileged \
  --restart unless-stopped \
  sbs20/scanservjs

Now go to: http://<your-server-ip>:8080
You’ll get an intuitive UI where anyone can scan documents and download them.


Step 5: Connect Client Devices

On Linux:

Printer:

  • Use hp-setup or add the printer via http://<server-ip>:631

Scanner:

  • Install SANE (sane-utils)
  • Edit /etc/sane.d/net.conf: php-templateCopyEdit<server-ip>

On Windows:

  • Use HP’s drivers for printing
  • Access scans via http://<server-ip>:8080 in browser

Why Bother?

Setting this up means:

  • 🌐 No need for cloud accounts or bloatware
  • 📡 Anyone on your network can print or scan
  • 💾 All documents stay local
  • 🔒 Full control, privacy, and flexibility

Wrap-up

Building this local-first print-and-scan hub was super satisfying. With just a bit of Linux love and a trusty HP ENVY Inspire 7220, I now have a reliable DIY print server that’s cloud-free, clutter-free, and totally Droid Matrix-approved.

Have questions or want me to script it all for you? Drop a comment here!

Leave a Reply

Your email address will not be published. Required fields are marked *