Deploy Nezha
Self-hosted server and website monitoring with agents, alerts, status page
Just deployed
/dashboard/data
Deploy and Host Nezha on Railway
Nezha is an open-source, self-hosted server and website monitoring dashboard. Small agents on your machines report CPU, memory, disk, network traffic and uptime to the dashboard over gRPC. It also runs HTTP, TCP and ping checks against services, sends alerts through configurable webhooks, and serves a public status page.
About Hosting Nezha
Nezha's dashboard is one Go binary. It serves the web UI, the REST API and the agents' gRPC endpoint on a single port, and keeps its data in SQLite. Hosting it means three things: keep the data directory on persistent storage, give agents a raw TCP path to the gRPC endpoint, and secure the admin/admin login that a fresh install seeds. This template does all three. It builds the official image (pinned by version and digest) from a public GitHub repo, so you get Railway's update notices. It puts the database on a volume and adds an HTTPS domain for the UI plus a TCP proxy for agents. On first boot it replaces admin/admin with a generated password before the dashboard goes public.
Common Use Cases
- Watch CPU, memory, disk and traffic across a fleet of VPSs, home servers or Raspberry Pis from one dashboard
- Uptime and latency checks for websites and APIs, with alerts sent through configurable webhooks (Telegram bots, chat apps, email APIs)
- A public status page for your servers and services
Dependencies for Nezha Hosting
- The Nezha dashboard service, built from this template's repo, with a volume for SQLite, config and secrets
- The Nezha agent, installed on each machine you want to monitor (the dashboard shows the install command)
Deployment Dependencies
- Nezha source and releases: https://github.com/nezhahq/nezha (v2.7.0, WTFPL)
- Nezha agent: https://github.com/nezhahq/agent
- Nezha documentation: https://nezha.wiki
- Template repo, Dockerfile and changelog: https://github.com/aalfath/nezha-railway-template
Implementation Details
The template deploys one service, Nezha:
- Builds
ghcr.io/nezhahq/nezha:v2.7.0(pinned by digest) fromaalfath/nezha-railway-template - Volume at
/dashboard/data, which holds the SQLite database,config.yamland the generated JWT and agent secrets - Public HTTPS domain for the web UI, and a health check on
/api/v1/setting - A Railway TCP proxy on the same port (8008) for agent gRPC traffic, which can't pass through Railway's HTTP domain
Variables: ADMIN_USERNAME (default admin), ADMIN_PASSWORD (generated, 24 characters) and PORT (8008). You don't need to fill anything in.
After deploying:
- Open the service's domain and sign in with
ADMIN_USERNAMEandADMIN_PASSWORD, which you'll find in the service's Variables tab. The variables apply only on first boot. Change the password later in the dashboard under Profile. - Under Settings, "Dashboard server domain/IP for agent connections" already shows the TCP proxy address (
YOUR-PROXY.proxy.rlwy.net:PORT). Leave TLS off, because the proxy carries plain TCP. - Under Servers, copy the install command and run it on each machine you want to monitor.
Agent traffic through the TCP proxy isn't encrypted. Put a TLS proxy of your own in front of it if your agents report over untrusted networks.
Resources: the dashboard idles at about 25–35 MB of RAM, so Railway's smallest 0.5 GB instance is enough. If the dashboard stops unexpectedly, the service exits non-zero and Railway restarts it.
Updates: when a new Nezha release is pinned in the repo, Railway shows you an "update available" notice. Read the repo's CHANGELOG.md, then apply the update. Your data stays on the volume.
Why Deploy Nezha 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 Nezha 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

