Docker
Use the published image from GitHub Container Registry. Pin a release tag in
production; use :main only when you intentionally want the rolling image.
https://github.com/duyet/clickhouse-monitoring/pkgs/container/clickhouse-monitoring
Image name: the current image is
ghcr.io/duyet/chmonitor. The legacyghcr.io/duyet/clickhouse-monitoringimage name is also published for every release and kept forever, so existing pulls keep working — both names point at the same build.
Replace vX.Y.Z with the release tag you want to run.
docker run --rm -it \
-p 3000:3000 \
--add-host=host.docker.internal:host-gateway \
-e CLICKHOUSE_HOST='http://host.docker.internal:8123' \
-e CLICKHOUSE_USER='monitoring' \
-e CLICKHOUSE_PASSWORD='change-me' \
-e CLICKHOUSE_TZ='UTC' \
-e CLICKHOUSE_MAX_EXECUTION_TIME='15' \
-e NEXT_QUERY_CACHE_TTL='300' \
--name chmonitor \
ghcr.io/duyet/chmonitor:vX.Y.Z
Open http://localhost:3000 after the container starts.
Docker Compose
services:
chmonitor:
image: ghcr.io/duyet/chmonitor:vX.Y.Z
ports:
- '3000:3000'
environment:
CLICKHOUSE_HOST: 'http://clickhouse:8123'
CLICKHOUSE_USER: 'monitoring'
CLICKHOUSE_PASSWORD: 'change-me'
CLICKHOUSE_TZ: 'UTC'
CLICKHOUSE_MAX_EXECUTION_TIME: '15'
NEXT_QUERY_CACHE_TTL: '300'
healthcheck:
test: ['CMD', 'wget', '-q', '-O', '/dev/null', 'http://localhost:3000/api/health']
interval: 30s
timeout: 5s
start_period: 20s
retries: 3
If ClickHouse runs in the same Compose project, use the service name in
CLICKHOUSE_HOST. If ClickHouse runs on the Docker host, use the host gateway
address for your platform.
Health Check
docker compose exec chmonitor \
wget -q -O /dev/null http://localhost:3000/api/health
Common Problems
-
localhostinside the container points at the container, not your host. -
Empty pages usually mean the monitoring user lacks system-table grants.
-
Public deployments should protect agent, MCP, settings, and action features with authentication.