Skip to content

로컬 개발

이 가이드는 Archon server를 로컬, Docker, 프로덕션에서 실행하는 방법을 다룹니다. 자동 HTTPS를 포함한 VPS 배포는 Cloud 배포 가이드를 참고하세요.

빠른 링크: 로컬 개발 | Remote DB를 사용하는 Docker | Local PostgreSQL을 사용하는 Docker | 프로덕션


SQLite를 사용하는 로컬 개발이 권장 기본값입니다. database 설정이 필요 없습니다.

  • Bun 1.0+
  • 설치 및 설정이 완료된 AI assistant 최소 1개(Claude Code 또는 Codex. Archon은 이를 orchestrate하지만 bundle하지 않습니다)
  • repository cloning용 GitHub token(GH_TOKEN / GITHUB_TOKEN)

source install(bun run)은 node_modules를 통해 Claude Code의 cli.js를 자동으로 resolve합니다. compiled Archon binary에는 CLAUDE_BIN_PATH 또는 assistants.claude.claudeBinaryPath가 필요합니다. AI Assistants → Binary path configuration을 참고하세요.

Terminal window
# 1. Clone and install
git clone https://github.com/coleam00/Archon
cd Archon
bun install
# 2. Configure environment
cp .env.example .env
nano .env # Add your AI assistant tokens (Claude or Codex)
# 3. Start server + Web UI (SQLite auto-detected, no database setup needed)
bun run dev
# 4. Open Web UI
# http://localhost:5173

개발 모드에서는 두 server가 동시에 실행됩니다.

ServiceURL용도
Web UIhttp://localhost:5173React frontend(Vite dev server)
API Serverhttp://localhost:3090Backend API + SSE streaming

로컬 개발에서 PostgreSQL을 선호한다면 다음을 실행합니다.

Terminal window
docker compose --profile with-db up -d postgres
# Set DATABASE_URL=postgresql://postgres:postgres@localhost:5432/remote_coding_agent in .env

참고: database schema는 첫 container startup 때 mounted migration file을 통해 자동으로 생성됩니다. fresh install에서는 수동 psql 단계가 필요 없습니다.

Terminal window
bun run build # Build the frontend
bun run start # Server serves both API and Web UI on port 3090
Terminal window
curl http://localhost:3090/health
# Expected: {"status":"ok"}

database가 외부에서 hosted되는 경우(Supabase, Neon, AWS RDS 등) 이 옵션을 사용합니다. app container만 시작합니다.

  • Docker 및 Docker Compose
  • .envDATABASE_URL이 설정된 remote PostgreSQL database
  • .env에 설정된 AI assistant token

external database를 사용할 때 app container는 profile 없이 실행됩니다. external-db profile은 없습니다. 기본 app service가 항상 시작됩니다.

Terminal window
# 1. Get the deployment files
mkdir archon && cd archon
curl -fsSL https://raw.githubusercontent.com/coleam00/Archon/main/deploy/docker-compose.yml -o docker-compose.yml
curl -fsSL https://raw.githubusercontent.com/coleam00/Archon/main/deploy/.env.example -o .env
# 2. Configure (edit .env with your tokens and DATABASE_URL)
nano .env
# 3. Start app container (no profile needed for external DB)
docker compose up -d
# 4. View logs
docker compose logs -f app
# 5. Verify
curl http://localhost:3000/api/health

fresh install에서는 combined migration을 실행합니다.

Terminal window
psql $DATABASE_URL < migrations/000_combined.sql
Terminal window
docker compose down

app과 PostgreSQL을 모두 Docker container에서 실행하려면 이 옵션을 사용합니다. database schema는 첫 startup 때 자동으로 생성됩니다.

5432/remote_coding_agent
# 1. Configure .env
# 2. Start both containers
docker compose --profile with-db up -d --build
# 3. Wait for startup (watch logs)
docker compose logs -f app
# 4. Verify
curl http://localhost:3000/api/health

참고: database table은 첫 startup 때 init script로 자동 생성됩니다. 수동 migration 단계는 필요하지 않습니다.

새 migration이 추가되면 수동으로 적용합니다.

Terminal window
# Connect to the running postgres container
docker compose exec postgres psql -U postgres -d remote_coding_agent
# For a fresh install, run the combined migration (idempotent, creates all 7 tables):
\i /migrations/000_combined.sql
# Or apply individual migrations you haven't applied yet.
# Check the migrations/ directory for the full list (currently 001 through 019).
\q
Terminal window
docker compose --profile with-db down

Caddy를 통한 자동 HTTPS와 함께 VPS(DigitalOcean, Linode, AWS EC2 등)에 배포하려면 Cloud 배포 가이드를 참고하세요.


옵션설정적합한 용도
SQLite(기본값)설정 없음, DATABASE_URL만 생략single-user, CLI 사용, 로컬 개발
Remote PostgreSQLhosted DB로 DATABASE_URL 설정cloud 배포, shared access
Local PostgreSQLDocker --profile with-dbself-hosted, Docker 기반 setup

SQLite는 데이터를 ~/.archon/archon.db(Docker에서는 /.archon/archon.db)에 저장합니다. 첫 실행 시 자동으로 초기화됩니다.


Context기본 port참고
Local dev(bun run dev)3090기본 server port
Docker3000.envPORT로 설정
Worktrees3190-4089path hash 기반 자동 할당
OverrideAnyPORT=4000 bun dev 설정

ContextEndpoint참고
Docker / production/api/healthDocker healthcheck에서 사용
Local dev/health편의 alias(/api/health도 지원)
Terminal window
# Docker
curl http://localhost:3000/api/health
# Local dev
curl http://localhost:3090/health
# Additional checks (both contexts)
curl http://localhost:3090/health/db # Database connectivity
curl http://localhost:3090/health/concurrency # Concurrency status

Terminal window
# Check logs
docker compose logs app # default (SQLite or external DB)
docker compose logs app # --profile with-db
# Verify environment
docker compose config
# Rebuild without cache
docker compose build --no-cache
docker compose up -d
Terminal window
# Check if port is in use
lsof -i :3090 # macOS/Linux
netstat -ano | findstr :3090 # Windows