One-Click Deploy Templates
Community templates for deploying chmonitor on Railway, Render, and Fly.io.
Honest note: These are starting-point templates, not verified CI pipelines. They have not been boot-tested end-to-end against a live ClickHouse instance in automated CI. Review the env var placeholders, substitute real values, and verify the deployment works in your environment before relying on it in production.
All three templates run the published image ghcr.io/duyet/chmonitor:latest, expose port 3000, and define a health check against /api/healthz. You must supply three env vars:
| Variable | Description |
|---|---|
CLICKHOUSE_HOST | ClickHouse HTTP URL, e.g. http://your-host:8123 |
CLICKHOUSE_USER | ClickHouse username |
CLICKHOUSE_PASSWORD | ClickHouse password (use your platform’s secret store) |
The template files live in deploy/templates/ in the repository.
Railway
Section titled “Railway”Template: deploy/templates/railway.json
- In the Railway dashboard, choose New Project → Deploy from image.
- Set the image to
ghcr.io/duyet/chmonitor:latest. - Add the three env vars above (Railway → Variables tab). Use Railway’s secret management for
CLICKHOUSE_PASSWORD. - Railway auto-assigns a public URL. The health check path is
/api/healthz.
Alternatively, copy deploy/templates/railway.json into your repository root as railway.json — Railway picks it up automatically on the next deploy.
{ "build": { "builder": "IMAGE", "image": "ghcr.io/duyet/chmonitor:latest" }, "deploy": { "healthcheckPath": "/api/healthz" }}Render
Section titled “Render”Template: deploy/templates/render.yaml
- Fork or copy
deploy/templates/render.yamlasrender.yamlin your repository root. - In the Render dashboard, choose New → Blueprint and point it at your repository.
- Render reads
render.yaml, pullsghcr.io/duyet/chmonitor:latest, and creates the service. - Set
CLICKHOUSE_PASSWORDas a Secret in the Render environment (do not store it in plain text inrender.yaml).
Key snippet:
services: - type: web name: chmonitor image: ghcr.io/duyet/chmonitor:latest healthCheckPath: /api/healthz envVars: - key: CLICKHOUSE_HOST value: http://YOUR_CLICKHOUSE_HOST:8123 - key: CLICKHOUSE_USER value: YOUR_CLICKHOUSE_USER - key: CLICKHOUSE_PASSWORD value: YOUR_CLICKHOUSE_PASSWORD # use Render secret insteadFly.io
Section titled “Fly.io”Template: deploy/templates/fly.toml
- Install the Fly CLI and run
fly auth login. - Copy
deploy/templates/fly.tomlto your working directory. - Edit
app,primary_region, andCLICKHOUSE_HOST/CLICKHOUSE_USER. - Store the password as a secret (not in
fly.toml):
fly secrets set CLICKHOUSE_PASSWORD=your-password- Deploy:
fly launch --no-deploy # imports fly.tomlfly deployThe health check polls /api/healthz every 10 seconds with a 20-second grace period on startup.
After deploying
Section titled “After deploying”- Open
https://your-app-url— you should land on the overview page. - If the page loads but charts are empty, check that the ClickHouse user has
SELECTonsystem.*. - If the health check fails, verify
CLICKHOUSE_HOSTis reachable from inside the container (use the private/internal hostname your platform provides, notlocalhost). - For additional configuration (authentication, AI agent, conversation store), see the Docker deploy guide — the same env vars apply.