Android: use any printer via WLAN

CUPS makes it easy to add and manage printers via a web browser. If the printer is enabled, printing is also possible from Android devices. Even an HP Laserjet 4050 that is over 20 years old can be used conveniently from a cell phone. This requires either a small mini-server or another device on which either a Linux distribution is used or Docker containers can be operated.

Debian / Ubuntu: Install CUPS

If you are already using a Linux server, you can use the "cups" package to turn it into a print server:

sudo apt-get install cups

Docker variant

The cups service can of course also be operated in a Docker container:

Docker Basics

Docker allows applications to be launched by command in a so-called container.
A container is an isolated environment independent of the operating system (OS):
When a container is first launched, Docker independently loads all the necessary sources
from the internet.
Docker can be installed on Windows, macOS or an Linux Distribution

To operate the print server, it is sufficient to create the following docker-compose.yaml file and then start it with the command "docker compose up -d":

version: "3"
services:
    cups:
        image: anujdatar/cups
        container_name: cups
        restart: always
        ports:
            - "631:631"
        devices:
            - /dev/bus/usb:/dev/bus/usb #Optional beim Einsatz eines USB-Druckers
        environment:
            - CUPSADMIN=admin
            - CUPSPASSWORD=bitteändern
            - TZ="Europe/Vienna"
        volumes:
            - ./cups:/etc/cups

Add network printer

After starting the container, the print server can be managed in the browser: localhost:631 or IP address:631

Add printer on administration:

Important at this point: Share the printer on the network:

Use the printer from an Android device

For access from Android, it is sufficient to add the shared printer once via the IP address:

IP address:631/printers/printername

Conclusion

CUPS offers the option of managing printers easily via the web browser and also accessing them from mobile devices such as Android. Even older printer models, such as the HP Laserjet 4050, can be easily integrated into modern setups. The only requirement is a device that serves as a server, either with a Linux distribution or as a Docker container.

positive Bewertung({{pro_count}})
Rate Post:
{{percentage}} % positive
negative Bewertung({{con_count}})

THANK YOU for your review!

Questions / Comments


 
By continuing to browse the site, you agree to our use of cookies. More Details