Juha-Matti Santala
Community Builder. Dreamer. Adventurer.

Notifications about (almost) anything with ntfy.sh

Blogging about ntfy.sh has been on my backlog for a while and this week Alistair Shepherd’s Device notifications via HTTP with ntfy popped into my RSS reader which inspired me to share my experience too.

He described the service very well:

ntfy is just that. On my phone I install the app and subscribe to a 'topic' (which is basically just a named event stream). Then I can send notifications to my device simply by making a web request to the ntfy service with that topic name. The topic could be secret — like a long secret key that no one else knows — for private notifications, or it could be public — a notification channel that anyone can subscribe to!

In general, notifications suck. I run a very tight ship with my phone and desktop with notifications and allow only the most important things to steal my attention during the day.

It’s a whole different ball game when I’m in charge of the notifications.

Notifications when my website deploy finishes

This website is built with Eleventy and deployed to Netlify and it’s not the smallest project anymore so it takes a short while to build. I want to share my blog posts in Mastodon and in couple of blogger communities once they are published but I don’t wanna keep refreshing my blog index page to see when they are done.

So I usually publish a post by merging a pull request (that’s how I “schedule” my posts) in GitHub mobile from my bed. Once Netlify finishes the deploy, I’ve configured it to send a webhook to my ntfy channel and once my phone beeps, I know I can share the post with everyone.

It sounds a bit unnecessary (and in the grand scheme of things it is) but I’ve noticed that I’m way less irritated compared to the previous experience and I usually publish in the morning so it helps me start the day on a better foot.

Notifications when someone sends me a Webmention

Similarly, I use Webmention.io as my service for receiving Webmentions. They support web hooks directly from the settings so every time someone links to my blog in their article and sends me a Webmention, I get a ping and it’s the happiest of all pings.

I love receiving these. A connected blogosphere is a happy blogosphere.

Notifications when a long-running shell command ends

I have a pesky little script called ,notify is set up to POST a notification to my ntfy channel when run:

#!/bin/zsh
curl -D POST -d "$1" https://ntfy.sh/[my-notification-id] 

I can use it as

./long-running-script.sh && ,notify "Running long script finished"

I set the script to run and then go away from computer to do other stuff like touching grass or writing to my notebook and when my phone pings, I can get back to the computer to continue. Similarly to my website deploys, it eliminates the need to check every now and then whether it’s finished.

Cautionary note

Alistair brings up an important note at the end of his article:

The main thing to keep in mind is that ntfy topics are public. I can send notifications to that URL but so can anyone else! My secret topic for private is all very well until someone finds it and can subscribe to my stuff without me knowing. You can pay to reserve a topic to prevent people posting but it would be visible to anyone so don't use it for anything super secret. My "server under increased load" notification isn't a big deal if someone else sees it.

I create my channel keys with my password manager’s “create complicated password” feature so they are hard to guess and impossible to access by accident. I combine that with not sending anything secret or private to keep it safe.


If something above resonated with you, let's start a discussion about it! Email me at juhamattisantala at gmail dot com and share your thoughts. In 2025, I want to have more deeper discussions with people from around the world and I'd love if you'd be part of that.