Skip to content

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:

VariableDescription
CLICKHOUSE_HOSTClickHouse HTTP URL, e.g. http://your-host:8123
CLICKHOUSE_USERClickHouse username
CLICKHOUSE_PASSWORDClickHouse password (use your platform’s secret store)

The template files live in deploy/templates/ in the repository.


Template: deploy/templates/railway.json

  1. In the Railway dashboard, choose New Project → Deploy from image.
  2. Set the image to ghcr.io/duyet/chmonitor:latest.
  3. Add the three env vars above (Railway → Variables tab). Use Railway’s secret management for CLICKHOUSE_PASSWORD.
  4. 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"
}
}

Template: deploy/templates/render.yaml

  1. Fork or copy deploy/templates/render.yaml as render.yaml in your repository root.
  2. In the Render dashboard, choose New → Blueprint and point it at your repository.
  3. Render reads render.yaml, pulls ghcr.io/duyet/chmonitor:latest, and creates the service.
  4. Set CLICKHOUSE_PASSWORD as a Secret in the Render environment (do not store it in plain text in render.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 instead

Template: deploy/templates/fly.toml

  1. Install the Fly CLI and run fly auth login.
  2. Copy deploy/templates/fly.toml to your working directory.
  3. Edit app, primary_region, and CLICKHOUSE_HOST / CLICKHOUSE_USER.
  4. Store the password as a secret (not in fly.toml):
Terminal window
fly secrets set CLICKHOUSE_PASSWORD=your-password
  1. Deploy:
Terminal window
fly launch --no-deploy # imports fly.toml
fly deploy

The health check polls /api/healthz every 10 seconds with a 20-second grace period on startup.


  • 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 SELECT on system.*.
  • If the health check fails, verify CLICKHOUSE_HOST is reachable from inside the container (use the private/internal hostname your platform provides, not localhost).
  • For additional configuration (authentication, AI agent, conversation store), see the Docker deploy guide — the same env vars apply.