Archon ships a multi-service Docker Compose configuration that covers every deployment scenario from a single-command local run to a fully TLS-terminated production server. This page walks through the realDocumentation 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.
docker-compose.yml structure, the available profiles, environment variables, volume mounts, health checks, the Caddy reverse proxy setup, and day-to-day maintenance commands.
The official
ghcr.io/coleam00/archon image ships with Claude Code pre-installed via npm and CLAUDE_BIN_PATH pre-configured — no extra setup required. If you build a custom image that omits the npm install, set CLAUDE_BIN_PATH yourself to point at a mounted cli.js.Docker Compose structure
Thedocker-compose.yml defines four services. The app service always runs; the others are gated behind profiles.
docker-compose.yml
Profiles
Profiles let you mix and match services without editing the compose file.| Command | What runs |
|---|---|
docker compose up -d | App with SQLite (zero config) |
docker compose --profile with-db up -d | App + PostgreSQL |
docker compose --profile cloud up -d | App + Caddy HTTPS |
docker compose --profile with-db --profile cloud up -d | App + PostgreSQL + Caddy |
docker compose --profile cloud --profile auth up -d | App + Caddy + form login |
There is no
external-db profile. To connect to an external PostgreSQL database (Supabase, Neon, etc.), set DATABASE_URL in .env and run docker compose up -d with no profile. The base app service always starts.SQLite (default, no profile)
Zero-config default. The SQLite file is stored in thearchon_data Docker-managed volume at /.archon/archon.db. No database container needed.
PostgreSQL (--profile with-db)
Starts a PostgreSQL 17 container. The schema is auto-initialized on first startup via the mounted migration file. Set the connection URL in .env:
.env
127.0.0.1:${POSTGRES_PORT:-5432} for external tools. The hostname inside the Docker network is postgres (the service name) — not localhost.
Caddy HTTPS (--profile cloud)
Adds a Caddy reverse proxy with automatic TLS certificates from Let’s Encrypt. Caddy handles HTTPS, HTTP→HTTPS redirects, HTTP/3, and SSE streaming.
Before starting with --profile cloud:
- Create the Caddyfile:
cp Caddyfile.example Caddyfile - Set
DOMAIN=archon.example.comin.env - Create a DNS A record pointing to your server’s public IP
- Open ports 80 and 443 in your firewall
Quick start (local Docker Desktop)
Start the app
Server deployment (manual)
Point your domain
Create a DNS A record at your registrar:
Wait for DNS propagation (5–60 minutes). Verify with
| Type | Name | Value |
|---|---|---|
| A | archon | Your server’s public IP |
dig archon.example.com.Cloud-Init (fastest setup)
For a fully automated server bootstrap, paste the contents ofdeploy/cloud-init.yml into the User Data field when creating a VPS. It installs Docker, UFW, clones the repo, pre-pulls images, and builds the Archon image automatically.
| Provider | Where to paste |
|---|---|
| DigitalOcean | Create Droplet → Advanced Options → User Data |
| AWS EC2 | Launch Instance → Advanced Details → User Data |
| Linode | Create Linode → Metadata (User Data) |
| Hetzner | Create Server → Cloud config → User Data |
| Vultr | Deploy → Additional Features → Cloud-Init User-Data |
Environment variables
AI credentials (required — choose one)
.env
Server settings
.env
Platform tokens (optional)
.env
Volume mounts
Data directory (/.archon)
All workspaces, worktrees, artifacts, logs, and the SQLite DB are stored at /.archon inside the container. By default this is the Docker-managed archon_data volume. To store data at a specific host path, set ARCHON_DATA in .env:
.env
appuser):
User home directory (/home/appuser)
The container’s /home/appuser is persisted by default via the archon_user_home named volume. This preserves Claude Code skills, commands, agents, hooks, MCP config, Codex and Pi auth state, ~/.gitconfig, and shell history across container rebuilds.
| Path | What it persists |
|---|---|
~/.claude/ | Claude Code skills, commands, agents, hooks, MCP config, OAuth state |
~/.codex/ | Codex auth (auth.json) |
~/.pi/agent/ | Pi auth and session data |
~/.gitconfig | Author identity, signing config, aliases |
~/.config/gh/ | GitHub CLI auth |
.env
Caddy reverse proxy
TheCaddyfile.example supports three authentication modes — choose one:
Caddyfile.example
Basic auth (Option B)
HTTP Basic Auth — the browser shows a native credential dialog. No extra container required.Set CADDY_BASIC_AUTH in .env
.env
$$ to escape $ in bcrypt hashes — Docker Compose interprets bare $ as variable substitution.Form-based auth (Option A)
A styled HTML login form with session cookies. Requires theauth-service sidecar container.
Uncomment Option A in Caddyfile
Uncomment the
handle /login, handle /logout, and handle { forward_auth ... } blocks, then comment out the default handle block.Do not enable both form auth and basic auth simultaneously. Choose one method.
Port configuration
The health check endpoint inside Docker is/api/health:
Customizing the image
To add extra tools without modifying the tracked Dockerfile:Copy the override file
docker-compose.override.yml when both files are present — no extra flags needed.Maintenance
View logs
Update
Restart and stop
PostgreSQL migrations
Migrations run automatically on first startup. When upgrading to a version that adds new tables, apply incremental migrations manually:migrations/ directory is mounted read-only into the postgres container. Check for new migration files after pulling updates.
Clean up Docker resources
Troubleshooting
App won't start: no_ai_credentials
App won't start: no_ai_credentials
Docker does not support Run
CLAUDE_USE_GLOBAL_AUTH=true. Set one of these in .env:.env
claude setup-token on your local machine to generate an OAuth token.Caddy fails: 'not a directory'
Caddy fails: 'not a directory'
Docker created a directory where
Caddyfile should be a file. Fix:Caddy not getting SSL certificate
Caddy not getting SSL certificate
.env.PostgreSQL connection refused
PostgreSQL connection refused
Ensure Check that the container is healthy:
DATABASE_URL uses postgres as the hostname (the Docker service name), not localhost:.env
docker compose ps postgres.Permission errors in /.archon/
Permission errors in /.archon/
The container runs as
appuser (UID 1001). If using bind mounts:Container keeps restarting
Container keeps restarting
.env file, invalid credentials, database unreachable.Next steps
Cloud deployment
Deploy to a VPS with systemd, Caddy HTTPS, and firewall configuration for always-on uptime.
Local development
Run Archon from source with Bun for hot-reload development.
Configuration reference
Full list of environment variables and config file options.
Troubleshooting
Diagnose common startup and runtime issues.