# ── ntfy self-hosted server config (UnifiedPush relay) ─────────────────────
#
# Backs the Android app's opt-in push notifications (docs/android/PLAN.md §11).
# Declarative + committed: `docker compose up` provisions a working relay with
# NO interactive setup — no `ntfy user add`, no per-user accounts, no post-deploy
# steps. The website backend treats ntfy as an UNTRUSTED relay and only ever
# publishes content-free tickles ({ stream, ref }); the real, ownership-checked
# content is pulled by the app over the authenticated website API. That is why
# anonymous access to unguessable topics is intentional and safe here.
#
# The public base URL is provided per-deploy via the NTFY_BASE_URL env var in
# docker-compose.yml (ntfy env vars override this file), so this default is only
# a placeholder for a bare `ntfy serve`.
base-url: "https://ntfy.localhost"

# ntfy listens on :80 inside the container. docker-compose.yml publishes this on
# a host port (NTFY_HOST_PORT, default 2586) so the public reverse proxy — which
# lives OUTSIDE the compose network — can terminate TLS and forward the
# notification subdomain to it. Both the app (SSE subscribe) and the backend
# (POSTing content-free tickles to registered device endpoints) reach ntfy on
# that public origin, so all traffic flows through the proxy.
listen-http: ":80"
behind-proxy: true

# Persist the message cache + (empty) auth db on the named volume.
cache-file: "/var/lib/ntfy/cache.db"
auth-file: "/var/lib/ntfy/auth.db"

# No accounts to administer — anonymous read+write to unguessable topics. Safe
# because payloads are content-free; the security boundary is the authenticated
# website API, not ntfy (see the header note).
auth-default-access: "read-write"

# Pure relay: no attachments.
attachment-cache-dir: ""
