Debian as Printserver and Scanserver with HPLIP, CUPS, SANE

Debian as Printserver and Scanserver with HPLIP, CUPS, SANE

(10 votes, average: 4.80 out of 5)

It’s nice to have a little home-server like the Seagate Dockstar or the Buffalo Linkstation running debian quite smoothly. What do you do if you would like to use your printer and scanner with more than one device?

Yes, you connect it to your server and share it over the network!
Because I had to set this up in two locations for now I decided to write down those steps I took from powering on the printer through printing the first testpage I can scan later on.

This HowTo requires debian squeeze installed on your Dockstar/Linkstation. If you haven’t done this yet, please refer to other articles in this blog.

1. Printserver

1.1 CUPS

First of all we install cups, a powerful, web based printermanager:

Make the frontend accessible:

There are some lines in the config you may want to edit, not to require logins:

After restarting cups you should be able to login the web interface on http://dockstar:631.


In my case I have an ALL-IN-ONE Device from HP. I tested this HowTo with a psc-1310-series and a Photosmart C4100. To get our printer ready to print we need hplip:

Once it is installed, there is a tool for adding printers:

Just follow the instructions and you will have your printer installed properly.
If you now look into CUPS you should be able to print a testpage with the newly installed printer.

1.3 Install the shared printer in Windows

To install the printer go to Control Panel, Devices and Printers and click Add a printer:

Click Add a network, wireless or Bluetooth printer:

Then click The printer that I want isn’t listed:

Select the second radio button and fill in the correct URL for your printer in CUPS:

In the following steps you have to select and install the correct driver which fits to your device.
When you are ready test the whole setup with another testpage from your windows machine.

2. Scanserver

2.1 Configure Sane-backend

When you install hplip the sane backends come with it as dependency (obviously we have to install the package), so we only need to install inetd in order to make sane accessible from the network:

Add your network to saned.conf:

Enable sane:

Configure inetd:

Make sure enabled in /etc/services:

Now restart the services:

Run these tests to check if sane sees your scanner:

2.2 Install sane-twain on the client

Go to and download the newest version. Perform an installation as described.
Go and test the connection, scan your first image.

2.3 Troubleshoot

If you have problems with accessing the sane backends the usb-device probably doesn’t have the proper rights.
Try to modify them. In my case I had to chmod the device:

Examples for USB devices would be /dev/usbscanner or /dev/usb/scanner0, /proc/bus/usb/001/005 or /dev/bus/usb/001/005, parallel port scanners are connected for example to /dev/parport0.

3. References