Sign inSign up

prateekrajgautam/rprint

By prateekrajgautam

•Updated 18 days ago

A self-hosted web dashboard for the CUPS printers on your home network.

Image
0

698

prateekrajgautam/rprint repository overview

⁠rPrint

Remote printing for your home server & homelab.

A self-hosted web dashboard for the CUPS printers on your home network — live status, add/edit/remove printers, print job history, and a simple upload-and-print flow, all behind a login. No cloud account, no external dependency beyond the CUPS server already on your network.

  • Source: GitHub⁠
  • Full docs: see the /guide page once it's running, or README.md in the source repo
  • License: MIT

⁠Quick start

# docker-compose.yml
services:
  app:
    image: prateekrajgautam/rprint:latest
    container_name: rprint
    restart: unless-stopped
    ports:
      - "8905:8905"
    environment:
      APP_PORT: "8905"
      DEFAULT_ADMIN_USERNAME: admin
      DEFAULT_ADMIN_PASSWORD: admin        # change this after first login
      SESSION_SECRET: "change-me-to-something-random"
    volumes:
      - /var/run/cups/cups.sock:/var/run/cups/cups.sock
      - rprint-data:/srv/app/data
      - rprint-uploads:/srv/app/uploads

volumes:
  rprint-data:
  rprint-uploads:
docker compose up -d

Open http://localhost:8905⁠, log in with the default credentials above, and change the password immediately from Settings — you'll see a reminder banner until you do.

⁠Or with docker run
docker run -d \
  --name rprint \
  -p 8905:8905 \
  -e SESSION_SECRET="change-me-to-something-random" \
  -v /var/run/cups/cups.sock:/var/run/cups/cups.sock \
  -v rprint-data:/srv/app/data \
  -v rprint-uploads:/srv/app/uploads \
  prateekrajgautam/rprint:latest

⁠How printer detection works

rPrint doesn't detect printers itself — it connects to the CUPS print server already running on your host via a mounted Unix socket (/var/run/cups/cups.sock) and shows whatever CUPS already sees, whether that's a USB printer or one found over the network. This is why the socket mount above is required, not optional, on Linux hosts.

Docker Desktop (Mac/Windows): that socket path can't be shared into a container the same way. Instead, expose CUPS over TCP on the host and set:

environment:
  CUPS_HOST: host.docker.internal
  CUPS_PORT: "631"

and drop the cups.sock volume mount.


⁠What it does

  • Live printer dashboard — status (idle/printing/stopped), enable/ disable, set default, edit, remove, add a printer (driverless/IPP Everywhere — no PPD hunting), all from the browser.
  • Print profiles — save a printer + copies/color/duplex/media preset once, reuse it any time; or just upload a file and print ad hoc.
  • Job history — full log with status (pending/success/failed), retry, remove, re-download the original file.
  • Users & access control — an admin account plus optional regular accounts (self-registration with admin approval, or admin-created), each scoped to only the printers/profiles an admin has explicitly granted. Optional per-user print-credit limits.
  • Security defaults that make sense for a home network: CSRF protection, login lockout, rate limiting, Swagger UI disabled unless you turn on debug mode.

⁠Configuration

Every value below is an environment variable (-e / environment: / .env file — whichever suits your setup). Only the ones worth knowing up front are listed here; the source repo's .env.example documents every option.

VariableDefaultNotes
APP_PORT8905Port the app listens on inside the container
DEFAULT_ADMIN_USERNAME / DEFAULT_ADMIN_PASSWORDadmin / adminOnly used to seed the account the first time it starts — change the real password from Settings afterward
SESSION_SECRET(insecure default)Set this to a long random value before exposing the app beyond localhost: python3 -c "import secrets; print(secrets.token_hex(32))"
SESSION_COOKIE_SECUREfalseSet true once served over HTTPS (behind a reverse proxy)
CUPS_SOCKET/var/run/cups/cups.sockPath to the mounted host CUPS socket
CUPS_HOST / CUPS_PORT(unset)Alternative to the socket — connect to CUPS over TCP (Docker Desktop)
DATA_DIR/srv/app/dataSQLite database location (users, profiles, job history)
UPLOAD_DIR/srv/app/uploadsWhere uploaded documents land before printing
DEBUGfalseVerbose logs + re-enables the /api/docs Swagger UI

⁠Volumes

Container pathPurpose
/var/run/cups/cups.sockHost CUPS socket (read/write) — how printers are detected at all
/srv/app/dataSQLite DB — mount this, or every restart resets to a fresh install
/srv/app/uploadsUploaded print documents — mount this to keep job history/re-downloads working across restarts

⁠Ports

PortPurpose
8905Web UI + API (change via APP_PORT, remember to update the port mapping to match)

⁠Tags

  • latest — most recent build
  • X.Y.Z (e.g. 2.3.3) — a specific, pinned version; every build bumps this, so pin one if you want reproducible deploys instead of always tracking latest

⁠Security notes

This is built for a trusted home/LAN network, not the public internet. If you do expose it beyond your LAN, put it behind a reverse proxy with TLS (nginx/Caddy example configs are in the source repo's deploy/ folder) and set SESSION_COOKIE_SECURE=true.

Tag summary

Content type

Image

Digest

sha256:590812acd…

Size

61.6 MB

Last updated

18 days ago

docker pull prateekrajgautam/rprint