|
| 1 | +# cups |
| 2 | + |
| 3 | +Containerised CUPS print server using the |
| 4 | +[LinuxServer CUPS image](https://docs.linuxserver.io/images/docker-cups/), |
| 5 | +which ships with a comprehensive set of print filters and supporting programs: |
| 6 | + |
| 7 | +| Package | Purpose | |
| 8 | +|---|---| |
| 9 | +| `cups` | Core print server and IPP listener | |
| 10 | +| `cups-filters` | PDF, PostScript, raster, and text filter chain | |
| 11 | +| `ghostscript` | PS/PDF rendering | |
| 12 | +| `poppler-utils` | PDF inspection and conversion | |
| 13 | +| `qpdf` | PDF linearisation and repair | |
| 14 | +| `imagemagick` | Image format conversion (PNG, JPEG, TIFF, …) | |
| 15 | +| `foomatic-db` + `foomatic-db-engine` | Generic printer driver database | |
| 16 | +| `printer-driver-gutenprint` | High-quality open-source raster drivers | |
| 17 | +| `hplip` | HP printer drivers | |
| 18 | +| `libcupsimage2t64` | CUPS raster image library | |
| 19 | + |
| 20 | +## Networks |
| 21 | + |
| 22 | +| Network alias | Actual network | Purpose | |
| 23 | +|---|---|---| |
| 24 | +| `cups` | `cups-net` | Other containers join this to submit print jobs | |
| 25 | +| `proxy` | `nginx-proxy-net` | Reverse proxy access to the CUPS web UI | |
| 26 | + |
| 27 | +## Volumes |
| 28 | + |
| 29 | +| Mount | Purpose | |
| 30 | +|---|---| |
| 31 | +| `../../lib/cups` → `/config` | All CUPS state: config, spool, logs, per-queue PPDs | |
| 32 | +| `./ppds` → `/usr/share/cups/model/custom` (read-only) | Custom PPD files; any PPD placed here appears as an available driver in the CUPS add-printer wizard | |
| 33 | + |
| 34 | +## Adding custom PPDs |
| 35 | + |
| 36 | +Drop `.ppd` files into the `ppds/` directory next to this file. They are |
| 37 | +mounted read-only into CUPS's model directory and appear automatically under |
| 38 | +**Administration → Add Printer → Choose Driver** the next time you open the |
| 39 | +wizard (no restart required). |
| 40 | + |
| 41 | +Example — adding the Rongta RP326 driver: |
| 42 | + |
| 43 | +```sh |
| 44 | +cp /path/to/Printer80.ppd apps/cups/ppds/ |
| 45 | +``` |
| 46 | + |
| 47 | +## First-time setup |
| 48 | + |
| 49 | +```sh |
| 50 | +cp .env.example .env |
| 51 | +# Edit .env if you need non-default PUID/PGID or TZ |
| 52 | +docker compose up -d |
| 53 | +``` |
| 54 | + |
| 55 | +The CUPS web UI is available at `http://cups:631` from other containers on |
| 56 | +`cups-net`, or via nginx-proxy-manager if you set up a proxy host pointing |
| 57 | +to `cups:631`. |
| 58 | + |
| 59 | +To allow other containers to print without credentials, open the CUPS web UI |
| 60 | +and under **Administration → Server** enable: |
| 61 | + |
| 62 | +- Allow printing from the Internet |
| 63 | +- Allow remote administration |
| 64 | + |
| 65 | +## Adding a printer from another container |
| 66 | + |
| 67 | +Any container that needs to print should join `cups-net`: |
| 68 | + |
| 69 | +```yaml |
| 70 | +networks: |
| 71 | + cups: |
| 72 | + external: true |
| 73 | + name: cups-net |
| 74 | +``` |
| 75 | +
|
| 76 | +Then configure the app's printer URL as `ipp://cups:631/printers/<queue-name>`. |
| 77 | + |
| 78 | +## Stopping safely |
| 79 | + |
| 80 | +```sh |
| 81 | +docker compose down |
| 82 | +``` |
0 commit comments