FluxyChat

How-to Guides

Self-host one command

Bootstrap a local FluxyChat stack with wrangler D1 migrations and dev env files.

Self-host in one command

pnpm run self-host copies env templates, then asks for a Groq key if the terminal is interactive. It also writes API_KEY_HASH_SALT if missing. Agent model on Groq: openai/gpt-oss-20b.

pnpm run self-host

Then start services:

# Terminal 1 — Worker API + WebSocket
pnpm --filter @fluxy-chat/worker dev

# Terminal 2 — Dashboard console (optional)
pnpm --filter dashboard dev

Verify with:

pnpm run first-message

What the script does

  1. pnpm install (if needed)
  2. pnpm run dev:setup — creates apps/worker/.dev.vars and apps/dashboard/.env.local from templates
  3. wrangler d1 migrations apply fluxychat --local — schema + seed data (including builtin_agent_templates)

Production deploy

For remote Cloudflare deploy, see Local development and Production setup:

cd apps/worker
pnpm exec wrangler d1 migrations apply fluxychat --remote
pnpm run deploy

Set secrets via wrangler secret put (JWT signing keys, LLM provider keys, webhook HMAC secrets).

On this page