Some Bits: Nelson's weblog

ntfy for notifications

ntfy logo ntfy.sh is a good service. It’s a tool for sending small notifications. I use it for phone alerts of server outages.

The key thing is sending notifications is very easy. It’s as simple as curl -d message ntfy.sh/topicname. On the other end you have a mobile app subscribed to topicname and the message shows up immediately on your phone. Easy-peasy.

There’s extra features too. Notifications are Markdown and can contain attachments and images and links. There’s a good web client and PWA for reading them. There’s fancy clients for sending notifications too but sending them is so easy, I haven’t bothered.

The catch is it’s only this easy (and free) if you use a public topic. There’s no guarantee of privacy with public topics. Also there are some generous rate limits for free usage. If you pick an obscure topic name probably no one will ever see it. I use one for my server notifications, like when a backup has failed.

If you want privacy you can self host a server. I did that briefly but it wasn’t worth the bother. You can also pay for the hosted service. $5/mo gets you three reserved topics which optionally require authentication before someone can read or write to them. That then requires HTTP basic auth or a token to use.