Setting up Local USB Printer with Cups in Portainer - although Portainer is not available any more

I needed to connect an old printer to a raspberry, because the printer is so old that there are no windows drivers anymore. Because I also use HA, it seamed feasible to use Cups with HA.
There is an “old” manual on how to set up a local usb printer with cups. Unfortunatly, Portainer is nowadays not supported any more.
However, I still got it set up, and because it was quite a hazzle I want to share my solution. Hopefully, it helps somebody.

  1. Add the repository with portainer support:
  • For this, go in Homeassistant into “Settings - Addons - Add-on-Store”. Then click the 3 dots on the upper corner, and under “repositories” add: https://github.com/alexbelgium/hassio-addons.
    Now it could be that you have to restart HA to load these addons
  1. Now install the newly available Portainer addon and start it. For that, you have to disable Protection in the settings.

  2. Login to Portainer: the user ist “admin”. The pw “homeassistant”. Now you can setup Cups as a new container. For that, use this manual. I changed here the docker image from the hub to

ydkn/cups:latest

because the given image did not have a driver for my printer.

Now you should be able to access cups via http://localhassip:631

  1. This Cups version does not let you add new printers from outside the system (-> the website). So you have to change the config-file. For that go into the newly created Container, select “Console” and connect to it:

There is no file editor installed, so you have to install it by typing the commands:

apt-get update
apt-get install nano

now you can edit the config file by typing:

nano /etc/cups/cupsd.conf

And add DefaultEncryption IfRequested after DefaultAuthType Basic.

Save with “CTRL-S” and close it with “CTRL-X”. Now you can add your Local USB Printer in Cups through the website.

  1. To add this Printer to Windows, i set it up as as “shared” inside Cups. Then, in Windows I add a printer manually and add it with the url from cups. For me, it was http://192.168.0.89:631/printers/OKI_DATA_CORP_C3100

I use the Microsoft PS Class driver, however it only prints black and white, althought it should be able to print in color.

Thank you!

Can I run this guide with Home Assistant OS?