ntfy
A publish-subscribe notification service that accepts HTTP requests and delivers messages to web, desktop, and mobile clients.
Why consider ntfy?
ntfy (pronounced "notify") is an open-source, self-hostable HTTP-based pub/sub notification service that lets you send push notifications to your phone or desktop via simple PUT/POST requests — no sign-up required.
Learn ntfy by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide6 sections
ntfy: Send Push Notifications with a Simple HTTP Request
ntfy (pronounced notify) is a simple HTTP-based pub-sub notification service. With ntfy, you can send notifications to your phone or desktop via scripts from any computer, without having to sign up or pay any fees. If you'd like to run your own instance of the service, you can easily do so since ntfy is open source.
The free hosted version is available at ntfy.sh. There is also an open-source Android app available on Google Play or F-Droid, as well as an open-source iOS app available on the App Store.
How Publishing Works
Publishing messages can be done via HTTP PUT/POST or via the ntfy CLI. Topics are created on the fly by subscribing or publishing to them. Because there is no sign-up, the topic is essentially a password, so pick something that's not easily guessable.
Here's the simplest possible example — sending a message with curl:
curl -d "Backup successful 😀" ntfy.sh/mytopicThat's it. Anyone subscribed to ntfy.sh/mytopic — via the mobile app, the web UI, or the API — will instantly receive that notification.
You can also add a title, priority, and tags using HTTP headers:
curl \ -H "Title: Unauthorized access detected" \ -H "Priority: urgent" \ -H "Tags: warning,skull" \ -d "Remote access to phils-laptop detected. Act right away." \ ntfy.sh/phil_alertsThe same publish call works identically in Python:
import requestsrequests.post("https://ntfy.sh/mytopic", data="Backup successful 😀".encode(encoding='utf-8'))Or as a raw HTTP request:
POST /mytopic HTTP/1.1Host: ntfy.shBackup successful 😀Rich Message Features
ntfy supports a wide range of message enrichment via HTTP headers set at publish time:
| Header | Purpose |
|---|---|
Title | Custom notification title |
Priority | Urgency level: min, low, default, high, urgent |
Tags | Comma-separated emoji shortcodes (e.g. warning,skull) |
Click | URL to open when the notification is tapped |
Attach | URL of an image/file to attach |
Actions | Inline action buttons (open URL, HTTP request, broadcast) |
Email | Forward the notification to an email address |
Delay | Schedule delivery for a later time |
Here is a full-featured example combining a click action, file attachment, an HTTP action button, and email forwarding:
curl \ -H "Click: https://home.nest.com/" \ -H "Attach: https://nest.com/view/yAxkasd.jpg" \ -H "Actions: http, Open door, https://api.nest.com/open/yAxkasd, clear=true" \ -H "Email: phil@example.com" \ -d "There's someone at the door. 🐶" \ ntfy.sh/mydoorbellSelf-Hosting ntfy
ntfy is fully self-hostable. The server is written in Go and ships as a single statically-linked binary with no runtime dependencies. Installation on a Linux server takes only a few minutes.
Docker (quickest method):
docker run -p 80:80 -it binwiederhier/ntfy serveDebian/Ubuntu via apt:
sudo mkdir -p /etc/apt/keyringscurl -fsSL https://archive.heckel.io/apt/pubkey.txt | sudo gpg --dearmor -o /etc/apt/keyrings/archive.heckel.io.gpgsudo apt install -y ntfysudo systemctl enable ntfysudo systemctl start ntfyOnce running, your self-hosted server works exactly like ntfy.sh — you just replace the hostname. For example:
curl -d "Hello from my server" https://ntfy.myhost.com/mytopicThe server is configured via a YAML file at /etc/ntfy/server.yml. Key options include setting a base URL, enabling user authentication, configuring SMTP for email forwarding, and setting attachment storage paths.
Mobile Apps and Web UI
ntfy ships with native mobile clients and a web application:
- Android app — available on Google Play and F-Droid (open source)
- iOS app — available on the App Store (open source)
- Web app — at ntfy.sh/app, also installable as a PWA for desktop notifications
On mobile, you subscribe to a topic name. Any message published to that topic (from curl, a script, or another app) appears as a push notification on your device — no polling required.
ntfy Pro and Sponsorship
The hosted service at ntfy.sh is free. For users who don't want to self-host or want to support the project, paid plans are available starting at $5/month (→ Purchase via web app). You can also donate via GitHub Sponsors or Liberapay.
Summary
ntfy is the simplest way to wire push notifications into any script, cron job, CI pipeline, or homelab workflow. Its pub/sub model, zero-signup free tier, rich header-based API, and fully open-source self-hostable server make it a practical choice for developers who want reliable notifications without vendor lock-in.
- Source code: github.com/binwiederhier/ntfy
- Documentation: docs.ntfy.sh
- Free hosted service: ntfy.sh
Related tools
More options with a similar category or technology profile.
MISP
Open source threat intelligence and cyber security information sharing platform.
Zulip Mobile
Official React Native mobile application for Zulip organized team chat.
Wire Server
End-to-end encrypted enterprise team communication, conferencing, and file sharing platform.
Signal Server
Enterprise-grade end-to-end encrypted messaging server infrastructure powering Signal.