ntfy.sh
is a simple Pub-Sub notification service that allows you to receive notifications to your phone via an HTTP request sent to a predetermined URL, such as:
ntfy.sh/my-notifications
Since it uses Pub-Sub, each URL is created on-the-fly as a topic. Since these URLs are subscribed to publicly, I usually append a UUIDv4
string for uniqueness:
ntfy.sh/my-notifications-fc2d4c59-53a5-420d-9977-5113e0adb828
Sending messages to the URL endpoint can be done with any tool or language that can send an HTTP request. Here’s an example using curl
on the command line:
curl \
  -H "Title: Notification Title" \
  -H "Tags: heavy_check_mark" \
  -d "Notification body of message." \
  ntfy.sh/notifications-fc2d4c59-53a5-420d-9977-5113e0adb828
My current use cases are for SSH login notifications, and build pipeline notifications from Netlify as well:


#TIL
#TheMoreYouKnow