How to turn your Raspberry PI in a Google Cloud Print device

Google Cloud Print (GCP) is a quite useful Google service, allowing you to print in a GCP compliant printer from everywhere and from every device of yours, be it a desktop, a tablet or a smartphone. There are quote a lot of printers out there supporting GCP out of the box, but here I will explain how to turn every Linux supported printer in a fully functional GCP printer. As a bonus you’ll have a cheap Linux based print server in your local network, which is alone a nice thing to have. All this thank to the amazing Raspberry PI ARM GNU/Linux mini PC.

Install and configure CUPS on the Raspberry PI

First of all install cups, the most famous Unix print server:

sudo apt-get install cups

Now you’ll have to edit the cups server configuration, to allow configuration of printers from your local network.

Edit /etc/cups/cupsd.conf and find the line:

Listen localhost:631

Delete localhost:, so that the line becomes:

Listen 631

Now search the Location directives <Location />, <Location /admin> and <Location /admin/conf>, and in all of them add the line

Allow from 192.168.1.*

Here I’m assuming that your local network is 192.168.1.*, please change this according to your local network configuration. This make CUPS accept connection from your local network, allowing you to configure printers from an handy web interface.

As a last step add pi user to lpadmin group:

sudo adduser pi lpadmin

Assuming that your Raspberry PI has address 192.168.1.100, access cups web interface at the address:

https://192.168.1.100:631/admin

Login with the credentials of user pi.In Raspbian the default credentials are pi/raspberry, but you changed the default password, right?

Now you can connect your printer to the Raspberry PI, then you can click on Printers and add the printer in CUPS, choosing the right model and the recommended driver/ppd.

Install and configure Google Cloudprint Service

First of all you’ll need to install some dependencies:

sudo apt-get install python-daemon python-cups

Then you can download the latest version of cloudprint and couldprint-service deb packages from this page. Put the packages on the Raspberry PI (or download the packages directly from the PI using wget), then install the packages with:

sudo dpkg -i cloudprint*.deb

Then all you have to do is to configure your Google account (the account you’ll use to access Google Cloud Print from your devices) by doing:

sudo service cloudprintd login

It will ask you your Google account and your password. Then you can start the service with:

sudo service cloudprintd start

The service should be launched automatically at boot from now on, so you’ll not need to start it every time manually.

That’s it, now you could try to print from your PC, Tablet or Smartphone with Google Cloud Print (see GCP page for instruction on how to print) and then wait for your beloved printer to enter in action!

Printing from another Linux box in the network

Other than having a Google Cloud Print enabled printer now you have also a cheap CUPS print server in your local network. You can print from other hosts in the network very easily!

On other hosts add the remote printer using ipp (use the same address you see in browser when editing the printer on the CUPS web interface, but with ipp instead of http).

Advertisements

5 thoughts on “How to turn your Raspberry PI in a Google Cloud Print device

  1. I have been able to send print jobs from my chromebook to a printer attached to my Raspberry Pi. The printer was added to google cloud print with instructions for setting it up with Chromium (i.e. X.org is running). I was led here hoping to find a solution that does not require X.org. I was able to install and configure cloudprint service with your clear instructions, but even after checking with ps command that the cloudprintd is running, printing didn’t work.

    • You should check that CUPS server is working correctly and printer is correctly configured. You can use a browser to connect to the CUPS administration page and see if you can print a test page from there.

  2. Great blog post! I used this solution for some time but it stoped working. Is this still working for you?

    • I just tried this solution and it doesn’t seem to be working. It always gets a bad response from server.

  3. Hi is it possible to have your login credentials pre saved on your pi.

    I want a pi I can turn on and immediately it is a Google cloud printer server. And even if it gets powered down and back on it will still be back online. With no intervention

    Is that possible ?

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s