Deploy ntfy
Self-hosted push notifications to phone and desktop over plain HTTP
Just deployed
/var/lib/ntfy
Deploy and Host ntfy on Railway
ntfy is an open-source push notification service. You send a message to a topic with a plain HTTP PUT or POST, from a script, a cron job, a server or any app, and it shows up on your phone (Android and iOS apps) or in your browser. No sign-up with a third-party service is needed.
About Hosting ntfy
ntfy is a single Go binary with a small footprint. This template runs the official binwiederhier/ntfy image (v2.38.0, pinned by digest) on one Railway service with a public domain. The message cache, the user database and file attachments are SQLite files and folders on a Railway volume, so they survive redeploys. Access control is on from the start: every topic needs a login, and an admin account is created from a generated password, so there's no default password and nothing to fill in at deploy time. Railway handles HTTPS, and the health check uses ntfy's /v1/health endpoint.
Common Use Cases
- Alerts from scripts, cron jobs, backups and CI pipelines straight to your phone
- Notifications from self-hosted apps and monitoring tools (Uptime Kuma, Grafana, Home Assistant, Healthchecks and others support ntfy)
- A private, self-hosted alternative to Pushover or Pushbullet for a person, a team or a family
Dependencies for ntfy Hosting
- The ntfy server (binwiederhier/ntfy, v2.38.0)
- A Railway volume for the SQLite databases and attachments (included)
Deployment Dependencies
- ntfy documentation: https://docs.ntfy.sh
- Self-hosting and configuration reference: https://docs.ntfy.sh/config/
- Releases: https://github.com/binwiederhier/ntfy/releases
- Template source: https://github.com/aalfath/ntfy-railway-template
Implementation Details
After the deploy, open the service's Variables tab to read NTFY_ADMIN_PASSWORD, then log in to the web app at your Railway domain with the user admin. Publish a test message:
curl -u admin:YOUR-PASSWORD -d "Backup finished" https://YOUR-DOMAIN/alerts
In the Android or iOS app, add your server URL and the same credentials, then subscribe to a topic. Notes:
NTFY_ADMIN_PASSWORDis the source of truth: change it and redeploy to change the password.- To let anyone subscribe without a login, set
NTFY_AUTH_DEFAULT_ACCESS=read-only. More users, access rules and tokens can be provisioned withNTFY_AUTH_USERS,NTFY_AUTH_ACCESSandNTFY_AUTH_TOKENS, or withntfy userandntfy accessin the service shell. - Optional features are off until you set them: email notifications (
NTFY_SMTP_SENDER_*) and browser push (NTFY_WEB_PUSH_*). See the configuration reference. - Instant notifications on iOS go through
https://ntfy.shas the upstream server (only a message ID is sent). SetNTFY_UPSTREAM_BASE_URLto an empty value to turn this off. - Updates: the template builds from its GitHub repo. New ntfy versions are merged there with a changelog entry, and Railway shows you an "update available" notice that you apply when you choose.
Why Deploy ntfy on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying ntfy on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content