
ntfy everywhere: the voice of the whole lab
Once ntfy runs (see Homelab: ntfy), any script can reach your phone with a single HTTP request. The interesting part comes after: deciding what deserves to ring, and making every notification lead somewhere useful. Here is how ntfy became the voice of our whole lab.
What you get. A phone that tells you what matters and nothing else: an agent waiting for your yes, a service that failed, a new message from a visitor. Tap the notification and you land on the exact screen. No Google services involved.
A bit of history
Phones get their notifications through a push service run by the platform: Google's on Android, Apple's on iOS. Every app that wants to wake your phone goes through it. ntfy, an open-source project by Philipp Heckel first released in 2021, turned that around: a tiny server you host yourself, where publishing is a plain HTTP request and subscribing is an app that keeps its own connection. In parallel, the UnifiedPush project defined an open standard so that any Android app can receive pushes through a distributor of your choice, ntfy included.
1. One topic per purpose
- Fleet alerts: only events of severity error or critical, from the lab's event table.
- Agents: a coding session asking for permission, a task finished, a pull request ready to read.
- Contact: a new message on the site's form that the triage could not answer alone.
Separate topics let you mute one without losing the others, and give each its own sound on the phone.
2. Severity decides whether it rings
Every event carries a severity. Info never rings: it is there when you look. Warning arrives quietly. Error and critical ring. A daily "I am alive" from each machine is info; the silence of a machine for too long is an error (see failures that call you).
curl -H "Priority: high" -H "Tags: warning" \
-d "backup.service failed on the server" https://ntfy.your-lab.example/fleet-alerts
3. Links that open the right screen
A notification can carry a click action: a web address, or an address that opens your own app. Our phone console registers its own scheme, so a "session waiting for approval" notification opens that exact session in the app, one tap away from approving it (see Inari).
curl -H "Click: swarmfox://session/4182" -d "The agent asks to run the tests" https://ntfy.your-lab.example/agents
4. Without Google
On Android, the ntfy app keeps its own connection to your server, and can act as a UnifiedPush distributor: other apps (ours included) receive their notifications through it instead of Google's push service. Nothing about your lab passes through a third party.
Traps
Notification fatigue is real: one week of noisy alerts and you stop reading them. Report a failure once and its recovery once; never repeat every minute.
Keep the server reachable from your phone through your private network, and close publishing to strangers: an open topic lets anyone send you notifications.
Sources
Found this useful? Tell us what to measure next.