CUPS, or the return of CloudPrint?

Hello!

I have been a long time DietPi user and had a successful CUPS print server running off of it using the CloudPrint package that was removed here:

https://dietpi.com/forum/t/google-cloud-prints-end-please-put-alternative-into-dietpi/4589/1

Unfortunately I had a power outage and my SD card bit the dust. I purchased a new one and went to install and configure DietPi again and there are no traditional print options available any longer.

If you’d prefer not to add CUPS as a standalone function, can you re-add the CloudPrint software package, but mark it as deprecated since it came packaged with a functional CUPS deployment baked in?

Would help a lot in getting my print server back online. Thanks for the great work!

Another fix would be to add cloudprint sideloaded if it’s still not a package for dietpi that is just hidden

It’s looks pretty easy to setup and configure

Ah crud!

Planned discontinuation
In November 2019, Google announced end of support for Google Cloud Print on December 31, 2020.[6] Google cited improvements in native Chrome OS printing as well as a marketplace of other print solutions providers in its decision to terminate the service.[19]

I did some digging and all the other print services similar to GCP are geared for enterprise setups

I did stumble across this though
https://hub.docker.com/r/ydkn/cups

Docker image including CUPS print server and printing drivers (installed from the Debian packages).

This one has an armv7 and armv8 variant
I can verify it does install and work

It appears with that docker image it’s ready to go, there is also a howto configure from this link (once you get past installing the CUPS part)

Thank you SO MUCH for this detailed reply. I’ll give it a try today <3

Thanks WarHawk, Looks like we’re in business!

For anyone else who has found these instructions in the future, Install docker for dietpi from the dietpi-software menu. Do not install Docker via the get.docker.com convenience shell script. For reasons I don’t understand, it will not work.

In my effort to get set up, I did the following:

Installed Docker using the guide here: https://phoenixnap.com/kb/docker-on-raspberry-pi

Installed with convenience script. Successfully ran docker hello-world. Things looking good at the beginning.

Added the dietpi user to the docker group as suggested.

Ran
#docker run -d --restart always -p 631:631 -v $(pwd):/etc/cups ydkn/cups:latest

Checking on the container with
#docker ps -a

Unfortunately the container constantly restarts with code 139 immediately after using the run command and never ends up started and running. Googled around, looks like 139 code for docker is any number of possible code related segfaults or errors. Tried removing and repulling the image, same results. Tried running with the second command the container author gives, which just looks like it is specifying an admin password. Tried getting the logs for the container and I get no output. Tried running as root. Nothing gets this goin’. Uninstalled docker and everything related to it with this guide https://askubuntu.com/questions/935569/how-to-completely-uninstall-docker.

After that was all said and done, I installed Docker via the dietpi-software menu, pulled and ran the container as directed by the author, and boom! CUPS!

Thanks friend!

I may have spoken too soon. I got excited when it didn’t loop restarting and posted that message, but I was never able to get to the default CUPS port I mapped remotely. Stopping and restarting the container proved unsuccessful. No log output to tell me what was problematic either. ROUGH!

Going to give this image a shot to see if it treats me any better.

https://hub.docker.com/r/a0js/rpi-cups

Success! The docker image at https://hub.docker.com/r/a0js/rpi-cups didn’t give me any trouble starting.

I had to modify the command to use as follows:

#docker run -d –restart always -p 631:631 --privileged -v /var/run/dbus:/var/run/dbus -v /dev/bus/usb:/dev/bus/usb --name cups a0js/rpi-cups

and the only other annoyance I had was that there’s a default admin user which is only prompted for when you try to add the printer to cups, and the credentials are not given or editable anywhere.

The default username and password are both print

sorry for late answer but maybe not to late.

As CloudPrint depreciated, it will not be added back again :wink:

In principle it’s quite easy to setup cups on DietPi and there is no need to run Docker.

apt install cups

By default, CUPS access is quite limited and you would need to adjust /etc/cups/cupsd.conf to gain access from local network

First change LISTEN address to 0.0.0.0 to enable cups to listen on all interfaces

# Only listen for connections from the local machine.
Listen 0.0.0.0:631

as well allow access to web interface for main web site as well as admin site by adding an Allow From to Location section. 192.168.0.* is an excample and would need to be repplaced by your network information

# Restrict access to the server...
<Location />
  Order allow,deny
  Allow From 192.168.0.*
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
  Allow From 192.168.0.*
</Location>

save the file and restart cups

systemctl restart cups