Skip to content

Deployment Overview

Sibyl can be deployed in multiple configurations, from local development to production Kubernetes clusters.

Architecture

Sibyl consists of four components plus one unified storage backend:

ComponentPurposePort
BackendFastAPI + MCP server (sibyld serve)3334
Workerarq job queue processor-
FrontendNext.js 16 web UI3337
SurrealDBGraph + content + auth (default)8000*
PostgresExternal archive rehearsal only5433*

*Default internal ports. External mappings vary by deployment mode. PostgreSQL is not deployed by default; use an operator-managed instance only for explicit migration and archive-rehearsal flows.

Runtime Boundary

  • SurrealDB is the only required data service for new local, single-host, and supported production deployments.
  • Redis/Valkey coordination is explicit opt-in. Use it for multi-process or multi-replica deployments by setting SIBYL_COORDINATION_BACKEND=redis or Helm coordinationBackend: redis.
  • PostgreSQL and preserved FalkorDB installs are migration sources or archive-rehearsal inputs, not ambient sidecars for current deployments.
  • Rollback is bounded by the write-freeze window. Before SurrealDB accepts new production writes, traffic can return to the preserved source deployment. After writes reopen on SurrealDB, recovery uses Surreal backups, archive receipts, and deliberate replay, not an instant switch back to legacy services.
                                   +------------------+
                                   |    Frontend      |
                                   |   (Next.js 16)   |
                                   |     :3337        |
                                   +--------+---------+
                                            |
+------------------+               +--------+---------+
|    MCP Client    |               |      Kong /      |
| (Claude, etc.)   +-------------->+     Ingress      |
+------------------+     /mcp      +--------+---------+
                                            |
                         /api/*    +--------+---------+
                         +-------->+     Backend      |
                                   | (FastAPI + MCP)  |
                                   |     :3334        |
                                   +--------+---------+
                                            |
                                            | ws://:8000/rpc
                                            v
                                   +------------------+
                                   |     SurrealDB    |
                                   |  graph + content |
                                   |      + auth      |
                                   |      :8000       |
                                   +--------+---------+
                                            ^
                                            |
                                   +--------+---------+
                                   |     Worker       |
                                   |  (arq processor) |
                                   +------------------+

PostgreSQL is retained only as an external archive-rehearsal target. See storage-modes.md and migrating-from-falkor.md.

Deployment Modes

1. Local Development (Docker Compose)

Best for: Quick local development and testing.

2. Local Kubernetes (Tilt + Minikube)

Best for: Testing Kubernetes manifests locally, developing with full K8s stack.

  • Full Kubernetes environment locally
  • Kong Gateway for routing
  • SurrealDB with TiKV and Valkey coordination
  • Automatic image builds on code changes
  • Tilt/Minikube Guide

3. Production Kubernetes

Best for: Production deployments with HA and scaling.

4. Single Host (Ansible)

Best for: A personal instance on one small cloud VM.

  • One host, no Kubernetes
  • Docker Compose stack provisioned by the bundled Ansible role
  • Caddy TLS via the Cloudflare DNS-01 challenge
  • Pairs with Tailscale for a private, zero-public-port deployment
  • Single-Host Guide

Quick Comparison

FeatureDocker ComposeTilt/MinikubeProduction K8sSingle Host
Setup time1 minute5-10 minutesVaries~10 minutes
Hot reloadYesYesNoNo
Kong GatewayNoYesYesNo
TLSNoYes (Caddy)YesYes (Caddy)
AutoscalingNoNoYes (HPA)No
Multi-replicaNoYesYesNo
Resource requirementsLowMediumHighLow
Production-likeNoMostlyYesMostly

Port Mappings by Environment

Docker Compose (Local Dev)

ServiceHost PortContainer PortNotes
Backend33343334API + MCP
Frontend33373337Next.js UI
SurrealDB (default)80008000ws/http, RPC at /rpc
Redis/Valkey63816379Optional coordination

Tilt/Minikube

All services accessed via https://sibyl.local:

PathServiceNotes
/api/*BackendREST API
/mcpBackendMCP protocol
/FrontendNext.js UI

Next Steps

Released under the Apache-2.0 License.