MirrorNest
← All guides

ntfy

ntfy is a simple HTTP-based publish-subscribe push notification service that lets you send notifications to your phone or desktop via plain HTTP PUT/POST requests, officially shipped as tarballs, deb/rpm packages, and a Docker image.

Target: Any Docker hostUtilitiesOfficial homepage ↗Official docs ↗
This guide is synthesized from ntfy's own official documentation, linked above — always cross-check exact package/version names there before running these commands on a production server, since distro and project versions move over time.
  1. 1Create a cache directory

    mkdir -p /var/cache/ntfy
  2. 2Run the ntfy server with persistent cache

    docker run -v /var/cache/ntfy:/var/cache/ntfy -p 80:80 -it binwiederhier/ntfy serve --cache-file /var/cache/ntfy/cache.db
  3. 3Optional: use a config file

    The image does not ship /etc/ntfy/server.yml by default; create one from the official template to customize behavior (auth, attachments, etc.).

    mkdir -p /etc/ntfy
    docker run -v /etc/ntfy:/etc/ntfy -e TZ=UTC -p 80:80 -u UID:GID -it binwiederhier/ntfy serve
  4. 4Send a test notification

    Publish a message to a topic to verify the server works, then subscribe to that topic in the ntfy app or web UI.

    curl -d "Hello" http://your-server/mytopic