MirrorNest
← Tutte le guide

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.

Sistema: Any Docker hostUtilitiesSito ufficiale ↗Documentazione ufficiale ↗
Questa guida è redatta a partire dalla documentazione ufficiale di ntfy, linkata sopra — verifica sempre lì i nomi esatti di pacchetti/versioni prima di eseguire questi comandi su un server di produzione, poiché le versioni della distribuzione e del progetto cambiano nel tempo.
  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