LiveKit
WebRTC infrastructure for real-time audio/video.
Overview
LiveKit provides the WebRTC server for voice communication.
| Property | Value |
|---|---|
| Image | livekit/livekit-server:latest |
| Container | livekit |
| URL | wss://livekit.ravenhelm.dev |
| Port | 7880 (HTTP), 7881 (RTC) |
| Config | ~/ravenhelm/services/livekit/ |
Quick Commands
# View logs
docker logs -f livekit
# Restart
docker restart livekit
# Check health
curl https://livekit.ravenhelm.dev/health
Configuration
port: 7880
rtc:
port_range_start: 50000
port_range_end: 60000
tcp_port: 7881
use_external_ip: true
keys:
${LIVEKIT_API_KEY}: ${LIVEKIT_API_SECRET}
Token Generation
The Voice API generates tokens for room access:
from livekit import api
token = api.AccessToken(api_key, api_secret)
token.with_identity("user-123")
token.with_grants(api.VideoGrants(room_join=True, room="my-room"))
jwt = token.to_jwt()
Troubleshooting
Issue: Connection Failed
Symptoms: WebSocket connection fails
Solutions:
- Verify TLS certificate
- Check WebSocket upgrade in Traefik
- Verify TURN server if behind NAT