Archon is a Bun monorepo that runs TypeScript directly — no compile step required. This page covers the full local development setup: prerequisites (Bun, Claude Code, gh CLI), cloning the repo,Documentation Index
Fetch the complete documentation index at: https://mintlify.com/coleam00/Archon/llms.txt
Use this file to discover all available pages before exploring further.
bun install, starting the dev server with hot reload, database options, port configuration, and how to run the CLI standalone without starting the server.
If you want to run Archon in a container locally rather than from source, see the Docker guide. For a cloud VPS deployment, see the Cloud guide.
Prerequisites
Bun 1.0+
Archon uses Bun as its runtime and package manager. Install from bun.sh.
Claude Code or Codex
Archon orchestrates AI assistants — it does not bundle them. Install at least one separately.
gh CLI
The GitHub CLI is used for repository operations and GitHub adapter webhooks.
Git
Required for worktree isolation. Most systems have it; verify with
git --version.Install Bun
Install Claude Code
Source builds (
bun run dev) auto-resolve Claude Code’s cli.js via node_modules — you do not need to set CLAUDE_BIN_PATH. That variable is only required for compiled Archon binaries.Setup
Install dependencies
bun.lock) pins all versions.Start the development server
| Service | URL | Description |
|---|---|---|
| Web UI | http://localhost:5173 | React frontend (Vite dev server) |
| API server | http://localhost:3090 | Backend API + SSE streaming |
~/.archon/archon.db on first start.Verify it works
Running individual packages
You can start the backend and frontend independently:Database options
SQLite is the default and requires zero configuration. Switch to PostgreSQL when you need parallel access, heavier workloads, or want a cloud-compatible setup.| Option | Setup | Best for |
|---|---|---|
| SQLite (default) | Zero config — omit DATABASE_URL | Single-user, local development |
| Remote PostgreSQL | Set DATABASE_URL to a hosted connection string | Cloud deployments, shared access |
| Local PostgreSQL | Docker --profile with-db | Self-hosted, Docker-based setups |
~/.archon/archon.db. It is auto-initialized on first run.
Use PostgreSQL locally (optional)
Start the PostgreSQL container from the repo root:.env:
.env
The database schema is created automatically on first container startup via the mounted migration file. No manual
psql step is needed for fresh installs.DATABASE_URL so the new value is picked up.
Port configuration
| Context | Default port | Notes |
|---|---|---|
bun run dev | 3090 | API server default |
| Vite frontend | 5173 | Dev server only |
| Docker | 3000 | Set via PORT in .env |
| Worktrees | 3190–4089 | Auto-allocated, hash-based on path |
Health endpoints
| Context | Endpoint | Notes |
|---|---|---|
| Local dev | /health | Convenience alias |
| Local dev | /api/health | Also supported |
| Docker | /api/health | Used by Docker healthcheck |
Hot reload behavior
bun run dev uses Bun’s built-in file watcher. When you edit a source file:
- Backend (
packages/server/,packages/core/, etc.) — the API server restarts automatically. Active SSE connections drop and reconnect. - Frontend (
packages/web/src/) — Vite applies hot module replacement (HMR) without a full page reload for most changes. Component state is preserved where possible.
Running the CLI without a server
The Archon CLI (bun run cli) runs workflows directly from your terminal without starting the HTTP server. This is useful for scripting, quick one-off tasks, and testing workflow definitions.
The CLI requires a git repository as its working context (workflows use worktree isolation by default):
bun run cli --help to see all available commands.
Production build (local)
To run a production build locally — the compiled frontend served by the Bun backend on a single port:Regenerating frontend API types
The frontend uses generated TypeScript types derived from the OpenAPI spec. After changing API routes, regenerate with:packages/web/src/lib/api.generated.d.ts.
Troubleshooting
Port already in use
Port already in use
PORT=4000 bun run dev.Claude Code not found
Claude Code not found
Source builds resolve Claude Code’s If using a custom install path, set
cli.js from node_modules automatically. If you see a “Claude binary not found” error after bun install, verify Claude Code is installed:CLAUDE_BIN_PATH in .env or assistants.claude.claudeBinaryPath in ~/.archon/config.yaml.Database not initializing
Database not initializing
SQLite auto-initializes on first run. If you see schema errors, delete the database file and restart:For PostgreSQL, run the combined migration manually:
Container won't start (Docker local)
Container won't start (Docker local)
Bun workspace symlink errors on Windows
Bun workspace symlink errors on Windows
Build and run from WSL, not PowerShell. Docker Desktop on Windows cannot follow Bun workspace symlinks during the build context transfer. Open a WSL terminal and run from there.
Next steps
Docker deployment
Package Archon in Docker for consistent, portable deployments.
Cloud deployment
Deploy to a VPS with Caddy HTTPS for always-on access.
AI assistants
Configure Claude, Codex, or Pi as your AI provider.
Configuration reference
Full list of environment variables and config file options.