chmonitor
Deployment

Vercel

Deploy chmonitor to Vercel — legacy guide for the Next.js v0.2 build; v0.3+ targets Cloudflare Workers or Docker.

Deploy chmonitor to Vercel using the legacy Next.js build. Vercel auto-deploys on every push to main and inlines client env vars at build time.

Legacy guide — Next.js v0.2 only

This guide targets the legacy Next.js build (v0.2 and earlier). The current app (apps/dashboard, TanStack Start, v0.3+) is designed for Cloudflare Workers. If you are running v0.3 or later, use Cloudflare Workers or Docker instead.

Prerequisites

What you need

  • A Vercel account
  • Node.js 22.x or later (build runtime)
  • A reachable ClickHouse endpoint with a monitoring user

Setup

Use the one-click button, or follow the manual steps.

Deploy with Vercel

Import the repo

Go to vercel.com/new and import the repository.

Set build settings

Vercel detects Next.js automatically. Confirm the values below.

SettingValue
Framework presetNext.js
Build commandpnpm run build (or npm run build)
Output directory.next
Install commandpnpm install
Node.js version22.x or later

Set environment variables

In the Vercel dashboard, go to Project → Settings → Environment Variables and add the variables from Configure below.

Deploy

Click Deploy or push to main to trigger an automatic deploy.

Configure

Required: CLICKHOUSE_HOST, CLICKHOUSE_USER, CLICKHOUSE_PASSWORD.

Set CHM_* once (Environment variables). Do not set VITE_* or NEXT_PUBLIC_* as operator config — the current app is TanStack Start.

Template: apps/dashboard/.env.example.

Verify

  • Open the assigned Vercel URL — you should land on the overview page.
  • To upgrade, push to main (or merge a PR) and Vercel auto-deploys. For environment variable changes, update them in the dashboard and trigger a redeploy (Deployments → Redeploy).

For breaking changes between major versions, see Migrating to v0.3.

Troubleshooting

Vercel limitations

  • No D1 / Durable Objects: Cloudflare-only. Use postgres or clickhouse for conversation store.
  • Function timeout: Vercel Hobby plan limits function duration to 10 s. Use Pro or set CLICKHOUSE_MAX_EXECUTION_TIME below that limit.
  • Cold starts: Vercel serverless functions have cold starts. Set CLICKHOUSE_POOL_SIZE appropriately.

On this page