Deployment
Four deployment paths, from simplest to most scalable. Pick the one that matches your needs.
1. Local (docker-compose)
Section titled “1. Local (docker-compose)”Best for: Development, testing, personal use.
git clone https://github.com/sverm-ai/sverm.git # repo coming sooncd svermdocker-compose up -dThis starts:
- The orchestrator (FastAPI)
- One worker (runs agents)
- Redis (message bus + memory)
# docker-compose.yml (included in the repo)services: redis: image: redis:7-alpine ports: ["6379:6379"]
orchestrator: build: ./orchestrator ports: ["8100:8100"] environment: - REDIS_URL=redis://redis:6379 - DEEPSEEK_API_KEY=${DEEPSEEK_API_KEY} depends_on: [redis]
worker: build: ./worker environment: - REDIS_URL=redis://redis:6379 - DEEPSEEK_API_KEY=${DEEPSEEK_API_KEY} depends_on: [redis] deploy: replicas: 2Limitations: No auto-scaling, no redundancy, one machine.
2. Single VPS
Section titled “2. Single VPS”Best for: A small team, moderate usage (~50 swarms/day).
Recommended hardware
Section titled “Recommended hardware”| Spec | Minimum | Recommended |
|---|---|---|
| vCPU | 2 | 4 |
| RAM | 4 GB | 8 GB |
| Disk | 20 GB | 40 GB |
| Cost | ~€4/mnd | ~€15/mnd |
Good providers: Hetzner, DigitalOcean, Vultr, Scaleway.
Setup (Ubuntu 24.04)
Section titled “Setup (Ubuntu 24.04)”# 1. SSH in and install Dockercurl -fsSL https://get.docker.com | sh
# 2. Clone and startgit clone https://github.com/sverm-ai/sverm.git # repo coming sooncd svermcp .env.example .env# Edit .env with your API keysnano .env
# 3. Launchdocker-compose up -d
# 4. Set up nginx + certbot for HTTPSsudo apt install nginx certbot python3-certbot-nginxsudo certbot --nginx -d your-domain.comYour swarm is now accessible at https://your-domain.com.
Place this behind sverm.dev or your own domain.
3. Cloud platforms
Section titled “3. Cloud platforms”Railway
Section titled “Railway”railway initrailway upRailway auto-detects the Dockerfile and provisions Redis.
Fly.io
Section titled “Fly.io”fly launchfly secrets set DEEPSEEK_API_KEY=sk-...fly deployfly redis create # Managed RedisBest for: Fast setup, no server management, good free tiers.
4. Kubernetes
Section titled “4. Kubernetes”Best for: Production, 100+ concurrent swarms, multi-region.
Helm charts will be available at:
helm repo add sverm https://charts.sverm.dev # coming soonhelm install sverm sverm/sverm \ --set apiKey.deepseek=sk-... \ --set apiKey.openai=sk-... \ --set worker.replicas=8 \ --set redis.mode=clusterScaling
Section titled “Scaling”The worker pods are stateless and scale horizontally based on queue depth:
worker: replicas: 4 autoscaling: enabled: true minReplicas: 4 maxReplicas: 40 targetQueueDepth: 10When the Redis Stream queue exceeds 10 pending messages, Kubernetes adds more workers. When the queue empties, it scales back down.
Monitoring
Section titled “Monitoring”The Helm chart includes Prometheus metrics and Grafana dashboards:
Worker metrics: - Agents active - Queue depth - Messages processed/sec - Average latency per agent
Cost metrics: - Spend per hour/day/month - Spend by model - Spend by swarm type - Cache hit rateArchitecture diagram
Section titled “Architecture diagram” ┌──────────────┐ │ Redis │ │ Streams │ ← Message bus └──────┬───────┘ │ ┌────────────────┼────────────────┐ │ │ │ ┌────▼─────┐ ┌────▼─────┐ ┌────▼─────┐ │ Worker 1 │ │ Worker 2 │ │ Worker N │ │ 4 agents │ │ 4 agents │ │ 4 agents │ └──────────┘ └──────────┘ └──────────┘
All workers are stateless. Scale by adding more.