average-account-59618
07/25/2025, 7:55 AMtall-airline-16756
07/25/2025, 7:55 AMtall-airline-16756
07/25/2025, 7:57 AMaverage-account-59618
07/25/2025, 8:01 AM# This docker-compose requires host networking, which is only available on Linux
# This compose will not function correctly on Mac or Windows
services:
caddy:
image: livekit/caddyl4
command: run --config /etc/caddy.yaml --adapter yaml
restart: unless-stopped
network_mode: "host"
volumes:
- ./caddy.yaml:/etc/caddy.yaml
- ./caddy_data:/data
livekit:
image: livekit/livekit-server:latest
command: --config /etc/livekit.yaml
restart: unless-stopped
network_mode: "host"
volumes:
- ./livekit.yaml:/etc/livekit.yaml
redis:
image: redis:7-alpine
command: redis-server /etc/redis.conf
restart: unless-stopped
network_mode: "host"
volumes:
- ./redis.conf:/etc/redis.conf
egress:
image: livekit/egress:latest
restart: unless-stopped
environment:
- EGRESS_CONFIG_FILE=/etc/egress.yaml
network_mode: "host"
volumes:
- ./egress.yaml:/etc/egress.yaml
cap_add:
- CAP_SYS_ADMIN
ingress:
image: livekit/ingress:latest
restart: unless-stopped
environment:
- INGRESS_CONFIG_FILE=/etc/ingress.yaml
network_mode: "host"
volumes:
- ./ingress.yaml:/etc/ingress.yaml
sip:
image: livekit/sip
network_mode: host
environment:
SIP_CONFIG_BODY: |
api_key: ''
api_secret: ''
ws_url: '<ws://localhost:7880>'
redis:
address: 'localhost:6379'
sip_port: 5060
rtp_port: 10000-20000
use_external_ip: true
logging:
level: debugtall-airline-16756
07/25/2025, 8:03 AMnetwork_mode: host to make sure everything runs lightning-fast and connects perfectly. It's basically giving LiveKit its own dedicated lane!
• AI Agents: These guys are more low-key. They don't need a special network pass - they'll just communicate with LiveKit Server through standard WebSocket connections. Bridge networking works great here, keeping things simple and secure.
• TTS and STT Services: These are a bit more flexible. Depending on how you've set them up, they might need host networking for real-time media, or they might be totally happy with bridge networking. It really depends on your specific setup.
The goal here is to give LiveKit Server the network access it needs while keeping everything else neat and tidy. Got any specific details about your setup? I'd be happy to help you fine-tune things even more! Sources: docker-compose.yaml | Deploy to Kubernetes | LiveKit Docs | Self-hosting the Ingress Service | LiveKit Docs | Deployment and scaling | LiveKit Docs | tests/docker-compose.yml