Deployment
Deploy Chorus Protocol with Docker Compose, configure environment variables, and prepare for production
Deployment Guide
Chorus runs as a Bun HTTP server backed by SurrealDB. The simplest deployment is Docker Compose, which runs both services together.
Docker Compose (Recommended)
git clone https://github.com/anthropics/chorus-protocol
cd chorus-protocol
docker compose up -d
This starts:
- SurrealDB on port 8000 (internal) -- the database
- Chorus server on port 3000 -- the API
Verify the deployment:
curl http://localhost:3000/health
# {"status":"healthy"}
Environment Variables
Configure Chorus through environment variables. See .env.example in the repository for defaults.
Required
| Variable | Default | Description |
|---|---|---|
SURREAL_ENDPOINT | http://localhost:8000 | SurrealDB connection URL |
SURREAL_NS | chorus | SurrealDB namespace |
SURREAL_DB | protocol | SurrealDB database name |
SURREAL_USER | root | SurrealDB username |
SURREAL_PASS | root | SurrealDB password |
PORT | 3000 | HTTP server port |
Optional
| Variable | Default | Description |
|---|---|---|
CHORUS_BOOTSTRAP | -- | Path to bootstrap YAML file for seeding data |
EMBEDDING_PROVIDER | -- | Embedding provider for semantic memory search |
EXTRACTION_ENABLED_TYPES | -- | Signal types that trigger memory extraction |
MEMORY_GC_INTERVAL_MINUTES | 60 | How often the memory garbage collector runs |
MCP_IDENTITY_ID | -- | Identity ID for the embedded MCP server |
SurrealDB Setup
Chorus uses SurrealDB v3.0.0. The server automatically applies schema files on startup (11 tables: signal, identity, role, fills, ring, api_key, invite, nonce, auth_request, memory, relates_to).
For production, use a managed SurrealDB instance or a dedicated server:
# Example: remote SurrealDB
SURREAL_ENDPOINT=https://db.example.com
SURREAL_NS=production
SURREAL_DB=chorus
SURREAL_USER=chorus_admin
SURREAL_PASS=secure_password_here
Production Checklist
Before deploying to production:
- Change default SurrealDB credentials (
SURREAL_USER,SURREAL_PASS) - Set up TLS/HTTPS termination (reverse proxy with nginx or Caddy)
- Configure rate limiting appropriate for your load
- Set up the bootstrap YAML with your initial identities and roles
- Configure an embedding provider if using semantic memory search
- Set
MEMORY_GC_INTERVAL_MINUTESbased on your memory retention needs - Set up monitoring for the
/healthendpoint - Back up SurrealDB data regularly
Running Without Docker
If you prefer to run Chorus directly:
# Install dependencies
bun install
# Start the server
bun run start
# Or for development with hot reload
bun run dev
Requires Bun runtime and a running SurrealDB instance.