Self-host ntfy
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.
Key facts
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.
Follow the ntfy deploy guide →What you need
- Any VPS with at least 256 MB of RAM
- A domain you control — most self-hosted setups need HTTPS in front of them
- Under an hour if you've used Docker before
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 notifications
services:
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 restartsWhat you take on
ntfy's defaults are tuned for the public ntfy.sh service, not for a private server, and its own docs flag each of these: