Breaking: with state.dir set, jobs still waiting when the daemon stops or crashes print after the next start, in order and however old, instead of being marked failed or forgotten; a client that resends such jobs must stop. The Docker image sets state.dir, so a container keeps its jobs in /var/lib/uberbringer, and loses them with the container unless a volume is mounted there. The owner decided that jobs survive a restart and that a restart never prints a receipt twice. When state.dir is set, the daemon now opens the SQLite job store there, jobs.db, and the queue restores it before the subscriptions are made and before anything is served, so restored jobs go ahead of new ones and a second daemon on the directory stops before it reads the subscriptions' state. Without state.dir the queue keeps its jobs in memory, as before. The store closes once the queue has stopped. A job's sending mark is synced before its first byte, so one caught mid write reads uncertain after the restart and is never sent again; a job that had not reached the printer prints once. A store that cannot be opened stops the start with an error naming the file, rather than starting empty and forgetting which receipts are in doubt. The unit gains UMask=0077, so the store's files are its user's alone, and says why systemd's 90 s stop timeout is enough; the Dockerfile and docs/docker.md ask for --stop-timeout 40. design.md replaces "The queue lives in memory" with the store, the state machine, the sync policy, store failures, stage 1a's numbers, and that the ARM builds ship the store untested on ARM hardware. install.md and docker.md say how to set aside a store that will not open; configuration.md, api.md, cli.md and ntfy.md say what survives a restart. The license notices gain the driver's modules. TestServeRestart runs the daemon twice on one directory: jobs queued when the first run stops, its printer refusing connections, print in order after the restart, ahead of a new job, and a job seeded in sending between the runs reads uncertain and never reaches the printer. Part of stage 1d of docs/plans/job-store.md (decisions 14 and 15). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3.7 KiB
Überbringer
Bringer of information. A small daemon that takes print jobs as JSON over a REST API and prints them on an EPSON ESC/POS network receipt printer.
- Jobs return at once with an ID and print in order on a background worker, with retries while the printer is offline.
- With a state directory, jobs are kept on disk: waiting jobs print after a restart, and a restart never prints a receipt twice.
- UTF-8 text is transcoded to the printer's code page and wraps at word boundaries for the paper width.
- Text styles and sizes, QR codes, barcodes, images and raw ESC/POS.
- Boxes, rules, key-value rows and lists, laid out for the paper when the job prints.
- Modules turn a few plain fields, such as a note or a notification, into a laid-out receipt.
- It can subscribe to ntfy topics and print their messages, with a paper budget and quiet hours.
- Tokens can be limited to modules, and only tokens issued for it can send raw ESC/POS.
- A preview shows the lines a job prints without using paper, and
/healthzreports the printer's status.
Note
Pre-refactor code: no AI was used. The original Überbringer (v0.1.x), up to commit
bb73348from January 2025, was written without any AI. That commit shows the code as it was before the 0.2 refactor.
Quick start
On a fresh Debian or Ubuntu host whose domain points at it, this installs the latest release as a systemd service behind Caddy, with HTTPS:
sudo ./install.sh printer.example.com you@example.com 192.168.1.245
The arguments are the domain, the email address for the certificate and the printer's address. docs/install.md covers the rest, and docs/docker.md covers the Docker image.
Documentation
| Document | Covers |
|---|---|
| docs/install.md | Installing on Debian or Ubuntu with install.sh, and upgrading |
| docs/docker.md | Running the Docker image behind your own reverse proxy |
| docs/configuration.md | The config file, environment variables, every setting and the logs |
| docs/security.md | The API secret, tokens and their scopes, and what never reaches the logs |
| docs/api.md | The HTTP API: routes, print elements, blocks, modules and error codes |
| docs/ntfy.md | Printing ntfy topics: subscriptions, digests, quiet hours and securing ntfy |
| docs/cli.md | The command line |
| docs/development.md | Building and testing, the package layout, CI and releases |
| docs/design.md | Why the daemon is shaped as it is |
| CHANGELOG.md | The changes in each release |
docs/swagger.json is the OpenAPI 3.1 document of the
API, generated from the route table; the daemon serves it at
GET /openapi.json.
License
Copyright © 2025-2026 William Gill.
Licensed under the European Union Public Licence v. 1.2 (EUPL-1.2). The full text is in LICENSE.txt, and translations into every official EU language are equally valid. Releases up to and including 0.1.2 were published under the GNU Affero General Public License v3.0.
The binary contains third-party software under licenses of its own: the Go
standard library and runtime, and Go modules.
THIRD-PARTY-LICENSES.md lists them with their
license and notice texts. The file comes with every release archive, and the Docker
image keeps it with LICENSE.txt in /usr/share/licenses/uberbringer/.
uberbringer licenses prints the same text.