Areas we serve

Self-Hosted Gotify on Android: The Phone Client That Actually Hears Your Server

You stood up Gotify on a VPS, wired Uptime Kuma and your backup scripts to POST messages, and curled a test alert. Success in the web UI. Your phone stayed quiet until lunch because the Android app was asleep, battery optimization enabled, and nobody told you to whitelist the foreground service.

Gotify for Android (gotify/android) is the official MIT client: about 1,540 GitHub stars, Java, on F-Droid and Google Play as com.github.gotify. It does not run a notification cloud. It opens a long-lived connection to your gotify/server, shows new messages as phone notifications, and lets you browse or delete history. Self-hosting matters on the server; on the phone it means typing https://gotify.yourdomain.ca instead of trusting someone else’s infrastructure with “disk 97% full on prod-db.”

What the app actually does

Gotify server accepts REST posts and fans them out over WebSocket. The Android app is a WebSocket client with a notification layer. When a message lands, priority decides how loud your pocket gets: priority 0 is silent, 1–3 show an icon, 4–7 add sound, 8–10 add vibration (per the project README table). Your cron job’s priority=9 is supposed to hurt; your “nightly OK” ping at 2 should not.

Features are intentionally narrow: push-style alerts for new messages, in-app list, delete what you do not need. No Matrix bridge, no email reader. That simplicity is why homelab people still pair it with Kuma, n8n, and shell scripts after years of louder platforms changing pricing.

Why not just use Telegram or Discord?

Those work until alert text is sensitive, until Discord is muted, or until you want one hub on Canadian disk with tokens you can rotate per application. Gotify’s server holds the messages; the Android app is how on-call you actually feels the pipe. Same stack as the web UI, same user accounts, same app tokens your scripts use — only the transport to your handset is different.

If you have not deployed the server yet, start with our Gotify server walkthrough. This post assumes you have TLS, a real password, and at least one application token tested with curl.

Pairing the phone with your instance

Install from F-Droid, Play, or a GitHub release APK. Log in with your Gotify user (not the application token — that is for scripts). Set the server URL to your public HTTPS endpoint, e.g. https://gotify.swifthost-demo.ca on a cloud VPS in Canada. The app needs a valid certificate; self-signed only works if you install the CA on the device, which is painful on modern Android.

Expect a persistent foreground notification on Android 8 and up: the app is honest that it keeps a connection open. You can tone it down under Settings → Apps → Gotify → Notifications → “Gotify foreground notification” (minimize importance, then restart the app, as the README describes). Trade-off: a quieter status icon versus clearer signal that the websocket is still alive.

The battery-optimization trap

Android vendors love killing background network apps. If Gotify gets force-stopped, you will see messages in the web UI while your phone misses the outage. The project points to dontkillmyapp.com for Samsung, Xiaomi, and the rest. Basics: disable battery optimization for Gotify, allow unrestricted background data, and after major OS upgrades re-check because updates flip switches back.

This is operational work, not a bug you apt-upgrade away. Budget five minutes per phone model when you onboard a new on-call phone.

Build your own APK?

Source is MIT. Java 17, ./gradlew build produces an APK; maintainers regenerate API clients with ./gradlew openApiGenerate when the server OpenAPI changes. Most teams install from F-Droid or Play. Fork-and-build makes sense when you want reproducible binaries, internal MDM distribution, or a pinned version while the server lags one release.

Good fit / skip it

Good fit: Android on-call for self-hosted Gotify, homelab operators who already POST alerts to their own server, F-Droid-friendly shops, anyone who maps Gotify priority to “wake me up” vs “log only.”

Skip it: iOS-first teams (check the ecosystem for other clients), people who refuse foreground services, orgs that need MDM push without running Gotify server at all.

Bottom line

gotify/android is the pocket half of a self-hosted alert stack: WebSocket in, notification out, priorities you control, server URL you own. Run gotify/server on infrastructure you trust, point the app at it, then fight battery settings like it is production — because at 3 a.m., it is.

Talk to Swift Host if you want a Canadian VPS or TLS in front of Gotify; we are in St. Albert and we have seen enough silent phones after “successful” deploys to take notification plumbing seriously.

Tags:
  • Gotify
  • Android
  • Push Notifications
  • Homelab
  • Self-Hosted

Need Help With Your Hosting?

Tell us about your application — we respond within 1 hour with honest recommendations.