this post was submitted on 24 Mar 2026
33 points (94.6% liked)

Selfhosted

60426 readers
405 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

What are my options for getting alerts on my android phone if services on my VPS becoming unresponsive?

My first thought is a simple app that periodically pings domains and gives a notification if any fail. Is there an open source app for that?

Or something else?

you are viewing a single comment's thread
view the rest of the comments
[–] realitaetsverlust@piefed.zip 3 points 3 months ago* (last edited 3 months ago)

There's a lot of options. There's countless paid services that offer exactly that.

If you wanna build something yourself for free, you could probably set up a site accessible via HTTP on your server and create a script on your phone that pings it every 30 seconds or so. Afaik, termux has a termux-notify function that lets you send a notification.

Codewise, it would look somewhere like this I think:

#!/usr/bin/env bash  

# Config 
NOTIFY_TITLE="Server Alert"  
NOTIFY_MESSAGE="Server returned a non‑200 status."  

HOST="funnysite.com"  
PORT=8080  
PATH="/healtcheck"  

URL="http://${HOST}:${PORT}${PATH}"  
# Config  

HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" "$URL")  

if [[ "$HTTP_CODE" != "200" ]]; then  
    termux-notify -t "$NOTIFY_TITLE" -c "$NOTIFY_MESSAGE $HOST:$PORT : $HTTP_CODE"  
fi  

exit 0  

Afaik, termux doesn't ship the cron daemon, but you can install cronie or use an external task scheduler. There, just set to run the script every 60 seconds or so. Whatever you need.

I haven't tested anything of this, but in my head, it sounds like it should work fine.