The Webcoast
Back to ntfy

Setting up ntfy

About as simple as self-hosting gets: one container, and publishing is just an HTTP request.

  1. 1

    Run the container

    The default config serves over plain HTTP on port 80; put it behind a reverse proxy with TLS for anything reached outside the local network.

    services:
      ntfy:
        image: binwiederhier/ntfy
        container_name: ntfy
        command: serve
        restart: unless-stopped
        ports:
          - "8080:80"
        volumes:
          - ./cache:/var/cache/ntfy
  2. 2

    Pick a topic name and subscribe

    There's no account system by default, a topic is just a name in the URL. Install the app (or open the web UI) and subscribe to a topic name that's specific enough not to collide with someone else's if this instance is ever reachable from outside.

  3. 3

    Publish a test notification

    Anything that can make an HTTP request can trigger a notification, which is what makes it easy to bolt onto scripts and automations.

    curl -d "Backup finished" ntfy.example.com/my-topic-name

Further reading

  • ntfy documentation

    Full docs including access control, if topics need to be locked down rather than left open by name.

  • ntfy on GitHub

    Source for the server and every official client.