---
title: "Deploy Nezha"
description: "Self-hosted server and website monitoring with agents, alerts, status page"
category: "Observability"
url: https://railway.com/deploy/nezha-1
---

# Deploy Nezha

Self-hosted server and website monitoring with agents, alerts, status page

**[Deploy Nezha on Railway](https://railway.com/template/nezha-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/nezha-1/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Observability

## Template content

### Nezha https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/nezha.png

- **Source:** https://github.com/aalfath/nezha-railway-template
- **Health check:** /api/v1/setting
- **Public domain:** Yes

## Documentation

# 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) from `aalfath/nezha-railway-template`
* Volume at `/dashboard/data`, which holds the SQLite database, `config.yaml` and 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:**

1. Open the service's domain and sign in with `ADMIN_USERNAME` and `ADMIN_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.
2. 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.
3. 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.



## Similar templates

- [Rootprint](https://railway.com/deploy/rootprint-1) — Open-source logs and traces with full-text search on object-storage.
- [Pyroscope profiling](https://railway.com/deploy/pyroscope-profiling) — Protected continuous profiling with durable Pyroscope storage.
- [SigOnly](https://railway.com/deploy/sigonly) — Deploy SigNoz with a working demo app & config in one click

Open this page in a browser: https://railway.com/deploy/nezha-1
