top | item 33517944

Ntfy.sh – Send push notifications to your phone via PUT/POST

1346 points| tambourine_man | 3 years ago |ntfy.sh | reply

296 comments

order
[+] binwiederhier|3 years ago|reply
Hey cool, this is my project. Happy to answer questions.

Edit: I am also looking for a new opportunity. If you need a good Staff/Principal Engineer, check out my resume here: https://heckel.io/resume.pdf

[+] adamddev1|3 years ago|reply
I absolutely love this, and my mind's already buzzing with a bunch of ways I can use it. I love the simplicity, the docs, the pleasant experience of understanding and getting it running. (In like 10 seconds!) No logins, no user permissions management, no API keys and complicated auth creds, just a topic/password. So cool. I think it's cool for every once and awhile to push back against the trends for complication/over-engineering even if just to remind us of how simple/straightforward software can really be.

You've made a beautiful piece of software for your own enjoyment and the benefit of others. It is just what it needs to be. Bravo. In a world where projects get massively complicated and pumped full of VC funding, may efforts like this live on.

[+] CameronNemo|3 years ago|reply
Have you thought about integrating with Matrix in any way? I.E. curl ntfy.sh/matrix and put the matrix room id in the post payload. The user would have to invite your ntfy.sh matrix user to the room, and it would not offer encryption, but it might add value for use cases where you want to send to a team or the user wants their notifications in the same place.
[+] Maxburn|3 years ago|reply
What does your reliability look like? Obviously no SLA but what can we really expect? Pay tier available for HA?
[+] willyyr|3 years ago|reply
Thank you for creating this. I was just looking for something like that to send notifications to my mobile without setting this all up and deploying my own app to the store. Using ntfy now :)
[+] CommitSyn|3 years ago|reply
Neat project. Where does the funding come from?
[+] marcus_cemes|3 years ago|reply
From the repository that I found, it seems that you wrote the backend in Go. How did it hold up? Any lessons learned?
[+] dested|3 years ago|reply
Yesssss, I have been looking for this type of service forever. I'm excited
[+] mongrelion|3 years ago|reply
Congratulations. It seems like your project is well received in the community.

Could you elaborate on how this differs from gotify?

[+] tristanbvk|3 years ago|reply
One really cool use I am making use of is that I am building an IRC not that interacts with Gitea webhooks.

I decided to add Ntfy.sh support today just because it was so goddamn easy. Thanks for the cool service!

Now whenever new pull requests, issues or commits are made I get a ding on my phone!

[+] syedmsawaid|3 years ago|reply
How can one integrate it into his own android app?
[+] tubs|3 years ago|reply
How were you a principal engineer with 5 years experience and a senior principle with 7? Genuinely curious.
[+] spsesk117|3 years ago|reply
Disclaimer: I know the developer of Ntfy and have worked with them in the past.

I love this tool because it sits in a very convenient place in the alerting and monitoring stack.

At work the kind of alerting pipelines and frameworks needed can by necessity end up being nontrivial and somewhat sophisticated. If you run some stuff at home or in the cloud or whatever, I have often wanted some kind of simple alerting but never want to deal with mocking out similar systems that I've built at work.

Ntfy sits perfectly in this space, and I've used to to frame out my own kind of micro-alerting frameworks for a bunch of stuff that I run. It's incredibly easy to encapsulate in something like a bash TRAP or even || conditionals on random cronjobs, and just makes getting some kind of alerting so trivial. As such, it's spiraled out into a lot of different stuff that I run.

[+] zx2c4|3 years ago|reply
I love this project. Super simple to interface with, accomplishes the task very well, reliable, good documentation. It's hard to think of better design and execution for this type of utility.

I use it to get notifications of the CI running on build.wireguard.com, which took less than a minute to get working. Sometimes I'll use it for random one-off notifications, like when a command finishes running or some shell script sleep-loop scraper finds what it was waiting for. It's the nicest thing I've had for that kind of thing since [email protected].

[+] binwiederhier|3 years ago|reply
Thank you for saying that Jason; it means a lot coming from you.

I remember when you sent me that email months ago it was super cool for me. The creator of WireGuard emailing meee? whoa! Anyway. Thanks again for the kind words.

[+] h43z|3 years ago|reply
I sometimes use my little service https://pushurl.43z.one/ If I need to notify my desktop browser or phone with a notification triggered by some code.

I just go to the website with my browser click generate. Then in my script I do `curl $pushurl?title=jobdone`. When it gets triggered a notification popups on my phone that says "jobdone".

It uses the native browser web push API so I don't need to install anything extra.

[+] dlivingston|3 years ago|reply
Awesome! Using it now. So seamless. Are there any other parameters besides `title`?

_edit:_ wrote a little Bash function for this; seems to work well:

  function notify() {
    argTitle='TerminalNotification'
    argText="$1"
    argUrl='https://www.example.com'
  
    baseUrl='https://pushurl.43z.one/XXXXXXXXXXXXX'
  
    curl --get \
         --data-urlencode "title=$argTitle" \
         --data-urlencode "text=$argText"   \
         --data-urlencode "url=$argUrl"     \
         $baseUrl
  }
[+] hu3|3 years ago|reply
Neat. I guess you had to visit pushurl.43z.one once with each browser you want to be notified right?

I'm just curious.

[+] getcrunk|3 years ago|reply
Is the code public? Seems simple to implement. But I'd rather copy and paste.
[+] superasn|3 years ago|reply
Very nice. I use a telegram bot for doing this as telegram API also makes it a simple GET request to send such notifications to yourself (once you have created a bot).

Also it's surprisingly hard to kill telegram for some reason so it's kinda robust. My stupid mi phone is quite aggresive in killing most background apps except whatsapp and telegram.

[+] londons_explore|3 years ago|reply
I find telegram messages only get insta-delivered about half the time. The other half, they're delayed till I next re-open the app. Doesn't seem to happen with any other app.

I suspect it's because I'm subscribed to too many high traffic group chats, and even though they're muted, the telegram servers still send large numbers of push notifications for them, which eventually start hitting some rate limit and everything gets dropped - even for unmuted conversations.

[+] jorvi|3 years ago|reply
> Also it's surprisingly hard to kill telegram for some reason so it's kinda robust. My stupid mi phone is quite aggresive in killing most background apps except whatsapp and telegram.

Part of the reason for this is hardcoded whitelisting.

[+] dom96|3 years ago|reply
Same. I also use Telegram for this purpose, works incredibly well for this purpose.
[+] gofreddygo|3 years ago|reply
I use telegram for this too.

Big reason is I can create groups and add people to such notifications. Super easy.

I have some scheduled ci/cd pipelines that send notifications. Just scroll up for history. This setup has been working with no changes needed for couple years, no hiccups. Love it.

[+] spuz|3 years ago|reply
When I was making my IoT washing machine sensor, I used Blynk.io to push notifications to my phone but of course that service became commercialised and is no longer free. I could not find any nice easy to use alternative except for Telegram which is what I use now. This service looks exactly like what I would need and I appreciate the promise to keep it open source.
[+] somehnguy|3 years ago|reply
Fun seeing everyone's ad-hoc solutions for this!

Personally I setup a Slack server and use webhooks to push events to a channel there. Works great :)

[+] tomjakubowski|3 years ago|reply
> IoT washing machine sensor

I'm building exactly this right now for my first hardware project. Have you published any notes anywhere?

[+] ed25519FUUU|3 years ago|reply
Cool project. Another one I’ve used for this purpose is pushover. It’s a $5 lifetime fee. It’s worked well for me so far.

https://pushover.net/

[+] TkTech|3 years ago|reply
Keep in mind that ntfy works with a bunch of backends. You can send the notifications to Telegram, jabber/XMPP, IRC (using my own https://n.tkte.ch), Slack, etc, etc. So, you probably don't have to actually install anything new to receive notifications and can just use what you've already got.
[+] Version467|3 years ago|reply
Oh this is awesome. Tried it out just yet and it worked right away. Software can be so great when it's not desperately trying to sell you something.
[+] idop|3 years ago|reply
Hey there. In Android, is there a requirement or any kind of dependency on Google Play Services? Also, do notifications work when the Ntfy app is in the background? Do I need to disable battery optimizations for it?

Thanks!

[+] __fst__|3 years ago|reply
I use this service all the time to notify me when some long running scripts are finished. Also goes very well together with '''tail -f --pid XXXX /dev/null && curl -d "process is done" https://ntfy.sh/XXXXXXX'''
[+] matxd|3 years ago|reply
I love it! Is it possible to subscribe without downloading the app? For example by visiting a special page with some confirm button?
[+] palata|3 years ago|reply
On Android, I have been using it for a while with Unified push: for Tusky (Mastodon client) and Element (Matrix client).

Works well, I wish more services were using UnifiedPush (so that I would not need the constant Telegram notification, for instance).

[+] teekert|3 years ago|reply
This is great, will add it to my docker-compose.yaml and my scripts!

To be clear, if 100 people subscribe to ntfy.sh/mytopic, they all receive this message, right?

    curl -d "Backup successful :)" ntfy.sh/mytopic
I wonder how many people got one when I was testing...
[+] mxuribe|3 years ago|reply
@binwiederhier I have heard wonderful things about ntfy.sh; kudos!

Quick question: if my team and I already "subscribe" to a private matrix room to receive alerts from our automated scripts (which auto-send alerts into said private matrix room)...is there a need for also leveraging ntfy.sh into this type of workflow? Again, much love and respect to this project...I'm just trying to learn. Thanks!

[+] techn0rabbit|3 years ago|reply
I love your project @binwiederhier. Lately I have migrated my daily driver from LineageOS to e-os (https://e.foundation/e-os/). Both use microG, but for some Reason I have massive Lag receiving the Push Notifcations on e-os. Seems like it's not really receiving Notifications via Push, but rather via Pull. I'm running my own Instance, however I can rule out that it's a problem on the Server side, as it used to work without any Problems with LineageOS. Do you maybe have any ideas how I could debug that Problem? I've checked the microG app and allowed Push Notifications for ntfy. I've also made sure that Android's Battery Optimization Feature doesn't interfere with ntfy and I got the permanent Notification open (which keeps the ntfy Process running). Of course I've also built my own Android App and I use my own Google Firebase Credentials. I'm kinda lost at the moment, honestly. Would be great if you'd have some ideas how I could figure out what's wrong.
[+] easton|3 years ago|reply
Super cool! I did something like this for personal use using a Discord bot (which you can also just POST to with no fancy backend if you want).