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.
Import the repo
Go to vercel.com/new and import the repository.
Set build settings
Vercel detects Next.js automatically. Confirm the values below.
| Setting | Value |
|---|---|
| Framework preset | Next.js |
| Build command | pnpm run build (or npm run build) |
| Output directory | .next |
| Install command | pnpm install |
| Node.js version | 22.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_TIMEbelow that limit. - Cold starts: Vercel serverless functions have cold starts. Set
CLICKHOUSE_POOL_SIZEappropriately.
Related
Cloudflare Workers
The current v0.3+ deployment target — serverless, global, D1 and Cron support.
Docker
Run the published container anywhere Docker runs.
Authentication
Choose an auth provider: none, API key, Clerk, or trusted proxy.
Migrating to v0.3
Breaking changes between major versions.
Production checklist
Harden and validate before exposing to a team or the internet.