The README had grown to 658 lines. It is now a short overview: what Überbringer is, a quick start, a table of the docs and the licence. Each topic it held has a document of its own: - docs/install.md: install.sh, what it leaves behind, and upgrading. - docs/docker.md: the image behind a reverse proxy, the env file, health checks, and the ntfy state volume and token file. - docs/configuration.md: loading, environment variables, a table of every key in every section, and what is logged. The list of log messages becomes a summary of what is logged and reported. - docs/security.md: the API secret, issuing tokens and their scopes, the header-file recipe that keeps tokens off command lines (moved from docs/api.md), the reverse proxy, image URLs, and what is never logged. - docs/ntfy.md: the ntfy subscriptions, securing the topics and the printer's token, with the token scripts unchanged. - docs/cli.md: the command line. - docs/development.md: running from source, the Go version, make targets, the gate, generated files, the layout, CI and releases. CLAUDE.md names the new docs: a config key is now documented in docs/configuration.md, and the layout and Go version in docs/development.md. docs/api.md, design.md and the job-store plan point to the docs that now hold what they referred to in the README. The release archives also carry the docs on running the daemon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2.8 KiB
Running in Docker
The image built from the root Dockerfile is a microservice for running
behind your own reverse proxy. It contains no proxy and no TLS: it serves
plain HTTP on port 8080, and the proxy terminates HTTPS.
docker build -t uberbringer .
docker run -d -p 127.0.0.1:8080:8080 -v "$PWD/config.toml:/etc/uberbringer/config.toml:ro" uberbringer
The examples publish the port on the host's loopback address only, for a
proxy on the host; a proxy in another container reaches it over a shared
Docker network instead, with no -p at all. Publish port 8080 only to the
proxy, never directly to the internet.
The config
In the mounted config.toml (configuration.md):
- Set
bind_ip = "0.0.0.0"in[webserver]. - Set
trusted_proxiesto the address the proxy's requests come from: its container network (e.g.["172.18.0.0/16"]), or for a proxy on the host, the Docker bridge's gateway (usually172.17.0.1). Have the proxy setX-Real-IPto the client's address. Otherwise every request appears to come from the proxy, and all clients share one rate limit. - Let the proxy pass request bodies up to
webserver.body_limit(4 MiB by default).
The settings can come from
environment variables instead. To
run without a config file, set UBERBRINGER_CONFIG empty and put the
variables in an env file that only you can read
(chmod 600 uberbringer.env), so the secret stays off the command line:
UBERBRINGER_CONFIG=
UBERBRINGER_WEBSERVER_BIND_IP=0.0.0.0
UBERBRINGER_WEBSERVER_TRUSTED_PROXIES=172.18.0.0/16
UBERBRINGER_API_SECRET=<the output of uberbringer secret>
UBERBRINGER_PRINTER_ADDRESS=192.168.1.245
docker run -d -p 127.0.0.1:8080:8080 --env-file uberbringer.env uberbringer
Health checks
For container health checks, use GET / to see whether the daemon is up.
/healthz answers 503 while the printer is unreachable, so it suits
alerting better than restarting the container.
ntfy subscriptions
ntfy subscriptions keep their state in /var/lib/uberbringer,
which the image sets as ntfy.state_dir. Mount a volume there: without one
the state lives in the container, and a new container, after a pull or an
upgrade, forgets what was printed and what was held.
docker run -d -p 127.0.0.1:8080:8080 -v "$PWD/config.toml:/etc/uberbringer/config.toml:ro" \
-v uberbringer-state:/var/lib/uberbringer uberbringer
Subscriptions are set in config.toml only, so a container with one needs
the file. The image runs as user and group 10001, so give a token file
to that ID, mode 600, and mount it read-only next to the config:
sudo chown 10001:10001 ntfy.token && sudo chmod 600 ntfy.token
docker run ... -v "$PWD/ntfy.token:/etc/uberbringer/ntfy.token:ro" uberbringer