← すべてのガイド
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.
このガイドは上記リンク先にあるntfy公式ドキュメントをもとに作成されています。ディストリビューションやプロジェクトのバージョンは時間とともに変わるため、本番サーバーでこれらのコマンドを実行する前に、必ず公式ドキュメントで正確なパッケージ名・バージョン名を確認してください。
1Create a cache directory
mkdir -p /var/cache/ntfy2Run 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.db3Optional: 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/ntfydocker run -v /etc/ntfy:/etc/ntfy -e TZ=UTC -p 80:80 -u UID:GID -it binwiederhier/ntfy serve4Send 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