Hacker News new | past | comments | ask | show | jobs | submit login
Gotify/server: A simple server for sending and receiving messages in real-time (github.com/gotify)
132 points by rohithkp on Oct 16, 2021 | hide | past | favorite | 29 comments



I've been using Gotify for years for various notification use cases, and it's awesome. Specifically for the last 2+ years, I've been using it so that I can have Zulip notifications on Android, since the app requires Google services (FCM) for notifications, which I don't have on my phone.

Here's the thing I banged together to pipe Zulip events into notifications. There are a bunch of nice things I could add to it, but I haven't had enough need to do so yet.

https://github.com/cyphase/zulip-to-gotify/


Would be nice to get zulip to support UnifiedPush as a replacement to FCM, you can use gotify as a transport.


Indeed. It's been mentioned in the relevant issue: https://github.com/zulip/zulip-mobile/issues/3838


You can also use the unifiedpush version (https://unifiedpush.org/users/distributors/gotify/) of gotify with your own server as a UP distributor for other apps.


I stood one of these up last year to play around with it. It works flawlessly but the Android app destroyed my battery life. If that has gotten better, it's probably a fantastic solution for DIY real-time push.


I guessing that is because it wants to work without google play services so it needs to keep a connection to the server. This is similar to how signal works when run without gApps.


I don't have problems with battery life running Signal without GApps or MicroG.


Same. I don't see how a connection to random server X should eat more battery compared to Google.


I think the difference is more that each app has to maintain its own connection (more connections, more drain). Seems like gotify could remedy that though.


TIL. How does Signal sends push notifications without GCM?


Just like how google services handle push notifications on your phone: a persistent connection.

Without GCM though, every app needs to maintain a separate connection, which drains more battery.

That's why we need more alternatives to GCM, like UnifiedPush.


I've been using it for over a year now and it hardly uses any battery on my phone (Huawei Mate 10 Pro, Android 9, app is whitelisted from all battery optimization). It's so low in fact that it often doesn't even show up on the usage list, and if it does its 1-2%.


Have been using it for a year and a half, it uses nearly no battery. On both Android 10 and now with Android 11.


I've used it for a couple of years with no noticeable impact on battery life. (Motorola phones).


Same thing for me, 10-20% daily battery was for Gotify...

(Android, Samsung S20+)


6.5% on my Samsung A40, Android 11. Third higher app after Firefox and WhatsApp which have more active time but much less background time.


Wait, so setting this up will give me a REST endpoint where I can send data to, which then gets pushed to my Android phone? So that I can ship any kind of actions/events to my mobile? That's awesome!

I've wanted something like this for quite a while but instead I've been mainly using webhooks/bots to Slack/Matrix/Mattermost for this.


I'm a huge fan of gotify. I use it to receive notifications when my backup system does its job, activity from my bittorrent client, alerts from fail2ban, and I'm sure a bunch of other things I'm forgetting about. Since it uses simple webhooks, so long as you can execute curl you can use it to push notifications out. So handy!


Why would you ever care about alerts from fail2ban?


If I see persistent attacks from an IP I'll step in and blacklist the host proactively by setting up an evergreen iptables rule. It's incredibly rare but it happens once in a blue moon.


Why?


Paranoia.


I wish there was an equivalent of this for iOS. I know - paid ecosystem,etc. But, I wish it existed.


Check out pushover https://pushover.net. Slack API is also an option.

Both support simple http APIs to trigger push notifications to iOS as well as other platforms. Both options worked great for me when I needed them.


As suggested below, Pushover is great (you have to pay couple of bucks). Another free option is using, surprise, telegram for sending notifications to yourself


You could just use matrix and element for notifications.


How do I help fund an iOS app?


You first get Apple to allow apps to keep persistent websockets in the background. They recently added APIs for using a local push notification server, but you must necessarily be connected to Wi-Fi for it to work.

You otherwise get an Android phone.


Using this in combination with home IP cameras to send me alerts. Works great!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: