Skip to main content

LiveKit

WebRTC infrastructure for real-time audio/video.


Overview

LiveKit provides the WebRTC server for voice communication.

PropertyValue
Imagelivekit/livekit-server:latest
Containerlivekit
URLwss://livekit.ravenhelm.dev
Port7880 (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:

  1. Verify TLS certificate
  2. Check WebSocket upgrade in Traefik
  3. Verify TURN server if behind NAT