CUPS server with docker

  • Hi,

    I would like to plug my old printer in my rpi4 on which libre-elec is installed and then print

    All the documentation I found about docker can only install images from

    But I'd like to install this one Docker Hub

    Is there a way ?

    Or should I go with linuxserver/rdesktop with extra port redirection and install CUPS in it ?

    Thanks for any help

    Solved here : CUPS server with docker

  • ones can be installed via addons for added convenience and ease of use but you can use any docker image via command line (docker run) or portainer on libreelec (assuming you're using the correct arch)

  • I finally made it, the problem was not that my printer was not recognized but that I did not "give" the usb bus to the container.

    An other problem I encountered was that kodi already used the avahi port and and needed it to advertise my printer on my local network

    I solved that by asking for a second IP for my device

    ip addr add dev eth0

    Check your printer can be found with


    Save its location in a variable, my printer is a Canon, change with yours

    BUS=$(/opt/sbin/lsusb|grep Canon|awk '{print $2}')
    DEV=$(/opt/sbin/lsusb|grep Canon|awk '{print $4}')

    Then I finally ran the docker command

    docker run -d -p -p -e ADMIN_PASSWORD=mySecretPassword --name cups-server --device=$PRINTER ydkn/cups:latest

    Now, from another device on the local network try, go in the administration panel and add your printer (username admin, password mySecretPassword which you have of course changed)

    Now add a printer, search a printer a the network, host and you should find it

    Many thanks to Setting up a CUPS server with Docker on a Synology NAS for my Brother printer

  • Kodi Libreelec Print server

    I have tested it on Rapsberry Pi 3+ (Kodi / Libreelec) as a print server

    Hello everyone
    I want to share my discovery. I use my Raspberry with Kodi libreelec and I have an old laser printer with USB. Can Kodi be used as a print server?
    Yes!. After searching many forums and testing configurations I managed to get it to work
    Thanks to all your contributions (and other forums too)

    STEP 1:

    First, in my Kodi / Libreelec / Rapsberry I installed the addon “Docker” and the Container “’s Docker Add-ons”

    I connected my old laser printer to the USB port of my Rapsberry

    STEP 2:
    On my Windows PC I installed Putty.exe to connect to the Kodi terminal, via SSH
    By default the values are:
    • root user
    • password libreelec

    Then, in Putty/SSH Terminal:...

    Check if your Raspberry recognizes the USB port to which your printer is connected
    # lsusb
    Bus 001 Device 004: ID 043d: 00ee Name_of_my_Printer

    Install CUPS
    The following command installs and starts the CUPS Printer container in Docker. The line “—restart” indicates that CUPS will start automatically (autorun) every time the system is rebooted

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

    The a0js / rpi-cups package will be downloaded from the Docker container ... Be patient...

    When the installation is finished, check that the CUPS container is started

    # docker ps -a
    9ce1205452fc a0js / rpi-cups "/ usr / sbin / cupsd -f" 19 hours ago Up About an hour>631/tcp cups

    STEP 3:

    Now, in your pc browser enter the CUPS web interface
    http: // MY_KODI_IP: 631 / admin
    • admin print
    • passw print

    STEP 4:

    To add a printer in Windows (Internet Printing Protocol)
    http: // My_Kodi_IP: 631 / printers / Name_of_my_Printer

    STEP 5:


    Note: To start or stop CUPS Print server (it will always be in start or Stop in Docker autostart)
    • # docker start cups
    • # docker stop cups
    Note: TO REMOVE container name
    • # docker rm cups