this post was submitted on 05 Jul 2023
4 points (100.0% liked)

ntfy

45 readers
1 users here now

ntfy (pronounced notify) is a simple HTTP-based pub-sub notification service. You can use it to send push notifications to your phone via HTTP PUT/POST.

ntfy websiteDocumentationGitHubGoogle PlayF-DroidDiscordApp StoreMatrix

If you'd like to become a sponsor, I would be humbled to accept your donation via GitHub Sponsors or Liberapay 💸💰.

founded 1 year ago
MODERATORS
 

Hi guys do you know of any way to integrate ntfy push notifications with lemmy?

Only way I've found so far is using an rss script https://github.com/camerahacks/rpilocator-rss-feed/blob/main/rpilocator-rss-ntfy.py

Curious if there are any other better ways to go about this

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (8 children)

If you self host both Lemmy and Ntfy, you can enable Ntfy's SMTP receiver, and have Lemmy send emails to that port. It's not well formatted for Ntfy but it works. Anything Lemmy would have sent an email for will be sent to Ntfy, and Lemmy thinks it's sending an email.

I just got this set up for myself and it works pretty well! You just need to use a specifically crafted email address with a token in order for it to work.

However, this is only really viable for single-user instances. For myself, this is the perfect solution. But for others with more Lemmy users, unless you want to be manually managing tokens for all of your users, this is not a good solution.

If you don't self host Lemmy, I guess you could still self host Ntfy as an open email server and get them that way, but that sounds like it could get messy.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (1 children)

That's very smart. It'd be nice to have native ntfy support for Lemmy though.

Also, the email address format is documented here: https://docs.ntfy.sh/publish/#e-mail-publishing

[–] [email protected] 2 points 1 year ago (1 children)

Oh it's the dev, hey there! o/

In case you were wondering how that reply looked through Ntfy:

Funny enough, the Lemmy devs actually do use Ntfy for their CI/CD notifications (near the bottom of this config).

But yeah, thanks for making Ntfy. I usually use Gotify for my self hosted notification needs, but I needed something with SMTP support so I could use it on Lemmy. Came across Ntfy by chance, and holy crap dude, it does everything!

[–] [email protected] 2 points 1 year ago

That actually looks wayyyy better than I thought it would. Well done.

load more comments (6 replies)