protolabs42

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.

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

VariableDefaultDescription
SURREAL_ENDPOINThttp://localhost:8000SurrealDB connection URL
SURREAL_NSchorusSurrealDB namespace
SURREAL_DBprotocolSurrealDB database name
SURREAL_USERrootSurrealDB username
SURREAL_PASSrootSurrealDB password
PORT3000HTTP server port

Optional

VariableDefaultDescription
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_MINUTES60How 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_MINUTES based on your memory retention needs
  • Set up monitoring for the /health endpoint
  • 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.

On this page