Today I discovered…
ntfy
A simple HTTP-based pub-sub service to send notifications to your phone or desktop via scripts from any computer. New notifications can be published from Email, Web app, Mobile app, or programmatically via API/CLI. Supports Firebase Cloud Messaging, UnifiedPush, Matrix Gateway to send push notifications.
💖 What I like:
Plenty self-hosting installation options: Think about your favourite OS and your preferred installation option, and chances are that it is available to install via that option. It can be installed via Docker, Kubernetes, Kustomize, or by manually installing binaries for all platforms(macOS, Windows, Linux). We can install it on different flavors of Linux such as Ubuntu via apt, on Fedora/RHEL/CentOS via rpm, on Arch Linux via paru or yay, on NixOS/Nix from nixpkgs. Of course, we can build it from source code as well (my favorite).
All batteries included: Another thing that makes ntfy a breeze to self-host. To send my first notification, all I had do was to install the app, create a topic, and send a curl request from my terminal. The project was good to go from the start - the apps, the server, the Firebase Cloud Messaging setup, and everything else I needed was available right out of the box. Zero configuration required. Of course, for a real use case, I would want to customize some more configurations, but it was exhilarating to see the MVP working within mins.
Attachments feature: Ability to attach files to notifications enables a huge number of use cases for this service.
👎 What I dislike:
Personal use case vs Developer use case and my confirmation bias: Although, it does what it promises. My initial motivation to explore this project was to evaluate it against how I can use it to send notifications to my application users (application to person) at scale (as an alternative to Amazon SNS). Only after diving deeper, I found that it is made and is more suitable for personal use case (where I am the end-user who wants to get notifications for possibly different reasons such as to get alert when my server has low space or when someone ssh into my server or when a GitHub Action fails, integrate home assistant, etc.). The project does mention clearly what it does, but it was my confirmation bias to assume otherwise 🙂. So that was a misunderstanding at my end, but I also like what it does and can think of many use cases for the project. I would have been able to create something useful out of this if this difference of personal vs developer use case was highlighted more strongly.
Author: Philipp C. Heckel @binwiederhier
Demo | Source
License: GPLv2
Tech Stack: Go, Javascript, Firebase Cloud Messaging, UnifiedPush, Amazon SES
Know of a cool open-source project? Share with the community
A reader mentioned https://github.com/nikoksr/notify , a Go library which can send notifications to various messaging services. Although slightly different than ntfy, worth checking out. Both can be useful for different use cases.