Analytics cookies only (Google Analytics, PostHog). No ad networks, no cross-site tracking. See our privacy policy.
Self-host ntfy
updated Sep 2026deployed by usprices checked · Jul 2026Install verified on Ubuntu 26.04 · Nov 2026 (also on arm64) · how we test
We earn commissions when you shop through the links below. Full disclosure →
Send push notifications to your phone or desktop from any script with a simple HTTP PUT or POST — no accounts, no cloud. A tiny Go binary that turns `curl` into a notification pipeline for your servers and cron jobs.
Pick ntfy when you want push notifications that reach every device you own — it has first-party Android, iOS, web and CLI clients — from a single Go binary or container with no external database. Publishing is an HTTP PUT or POST to a topic URL — `curl -d "Backup successful" ntfy.example.com/mytopic` — and topics are created on the fly, which is why the docs say the topic name is essentially a password. The repository ships both an Apache-2.0 `LICENSE` and `LICENSE.GPLv2`; the README calls the project dual-licensed. Just do not skip the config step: a fresh ntfy server is open to the world by default.
Paid link — we earn a commission if you shop through it.
Install with Docker Compose
Save this as compose.yml and run docker compose up -d:
# ntfy — pub/sub push notificationsservices: ntfy: image: binwiederhier/ntfy:latest command: serve ports: ["80:80"] environment: NTFY_BASE_URL: http://SERVER_IP NTFY_BEHIND_PROXY: "true" volumes: - ./cache:/var/cache/ntfy - ./etc:/etc/ntfy restart: unless-stopped# docker compose up -d → http://SERVER_IP# as written anyone can publish and subscribe: before exposing it, set NTFY_AUTH_FILE=/var/lib/ntfy/user.db and NTFY_AUTH_DEFAULT_ACCESS=deny-all (mount a volume there), then add a user with: docker compose exec ntfy ntfy user add --role=admin NAME# add NTFY_CACHE_FILE=/var/cache/ntfy/cache.db to keep undelivered messages across restarts
ntfy's defaults are tuned for the public ntfy.sh service, not for a private server, and its own docs flag each of these:
non-negotiable"By default, the ntfy server is open for everyone, meaning everyone can read and write to any topic." For a private instance set auth-file and auth-default-access: deny-all, then create users — before you publish the URL.
non-negotiableInstant iOS notifications on a self-hosted server require upstream-base-url: "https://ntfy.sh" so poll requests are forwarded through the public server; the docs state that iOS restrictions make instant push impossible without a central server. If that relay is unacceptable, iOS users get delayed delivery.
non-negotiableMessages are kept in memory for 12 hours by default and attachments for 3 hours. Our snippet mounts /var/cache/ntfy but you still have to set cache-file (e.g. NTFY_CACHE_FILE: /var/cache/ntfy/cache.db) or messages vanish on restart; attachments additionally need base-url and attachment-cache-dir.
non-negotiableBehind a proxy you must set behind-proxy (our snippet does), or the docs warn that every visitor is rate-limited as if they were one client.