What it is
ntfy is an open source notification service built on publish and subscribe over HTTP. A program sends a message to a topic with a plain HTTP request, and every phone or browser subscribed to that topic receives it as a push notification. Messages can carry a title, priority, tags and a link to open.
There is no account or SDK needed to send. A one-line curl from a script, a server or a cloud function is enough. It can be used through the public ntfy.sh service or self-hosted, and it has apps for Android and iOS. Topics are named by the sender, so a private topic name acts as the shared secret.
How I use it
- Rental Pilot pushes error alerts and business events to my phone through ntfy, on separate topics so alerts and events do not mix.
- mervinc.com's uptime monitor uses it too: when a system goes from up to down, or comes back, a Lambda pushes a notification to my phone.
- Those probes run in AWS rather than on the servers they check, so a server that has fallen over cannot vouch for itself.
ntfy is the right tool when you want alerts on your phone from scripts and servers with almost no setup. I reach for it because the person who needs to know first is me, and a single HTTP request from any system is the least that can break.
Questions
How do you know when something breaks?
Errors and status changes push straight to my phone through ntfy. For mervinc.com, probes in AWS check each system and a Lambda alerts me the moment one goes down or comes back.
Is ntfy hard to add to an existing app?
No. Sending a notification is one HTTP request to a topic, so any script, server or cloud function can do it without an SDK.