Docker Compose
RTCstack ships a single docker/docker-compose.yml that starts the entire stack.
Services
| Service | Image | Port | Purpose |
|---|---|---|---|
caddy | caddy:2.8-alpine | 80, 443 | TLS termination + reverse proxy |
livekit | livekit/livekit-server:v1.7.2 | 7880 (internal) | WebRTC SFU |
egress | livekit/egress:v1.8.3 | — | Recording to MinIO/S3 |
coturn | coturn/coturn:4.6.2-alpine | 3478, 5349, 49152-65535 | TURN relay |
api | Built from apps/api/Dockerfile | 3000 (internal) | RTCstack REST API |
redis | redis:7-alpine | 6379 (internal) | Webhooks, transcripts, replay protection |
minio | minio/minio:RELEASE.2024-04-06T05-26-02Z | 9000, 9001 | Object storage (recordings) |
minio-init | minio/mc | — | One-shot bucket creation |
Starting the Stack
bash
cd docker
cp .env.example .env
# Fill in required values (see Environment Variables)
# Start infrastructure only (no API — use for local SDK dev)
docker compose up livekit redis minio minio-init
# Start everything
docker compose up
# Start with speech-to-text add-on
docker compose --profile stt-live up
docker compose --profile stt-post upHealth Checks
All services have Docker healthchecks. Wait for healthy before starting the API:
bash
docker compose pslivekit and redis must show (healthy) before the API can connect to them.
Networking
All services communicate over a private bridge network rtcstack_internal. Only Caddy exposes ports 80 and 443 to the host. coturn additionally needs its UDP port range exposed for TURN media relay.
Persistent Volumes
| Volume | Purpose |
|---|---|
minio_data | Recording file storage |
redis_data | Webhook configs, transcription segments |
caddy_data | TLS certificates (auto-renewed by Caddy) |
caddy_config | Caddy config state |
Updating Services
Pull new images and restart:
bash
docker compose pull
docker compose up -d --remove-orphansFor major LiveKit upgrades, check the LiveKit changelog for breaking config changes before pulling.
Resource Recommendations
| Service | CPU | RAM | Notes |
|---|---|---|---|
livekit | 2 cores | 2 GB | Scale per concurrent room count |
egress | 4 cores | 4 GB | One egress container per ~4 concurrent recordings |
coturn | 1 core | 512 MB | Low CPU; network bandwidth is the constraint |
redis | 0.5 cores | 256 MB | Minimal — only light key-value use |
minio | 1 core | 512 MB | Disk throughput matters more than CPU |
api | 0.5 cores | 256 MB | Stateless — run multiple replicas |

