adventurous-appointment-82958
03/11/2026, 10:39 AMtall-airline-16756
03/11/2026, 10:39 AMtall-airline-16756
03/11/2026, 10:40 AMLIVEKIT_URL
◦ LIVEKIT_API_KEY
◦ LIVEKIT_API_SECRET
◦ Optional: AI provider keys (e.g., Deepgram, OpenAI) for transcription/AI features.
• Secrets management: Store/update secrets in your deployment platform (you can update agent secrets without redeploying via CLI tooling).
• Outbound connectivity: Agents connect outbound to your LiveKit server (no inbound ports required on agent hosts).
• Scaling: Run multiple agent replicas for capacity and HA; use a load balancer or Kubernetes to manage scale.
• Dispatch configuration: Ensure your LiveKit server is configured to dispatch jobs to agents (matching agent names and scoped tokens).
High-level steps to deploy recording agents
1. Build agent:
◦ Implement agent using LiveKit Agents SDK (Node or Python).
1. Containerize:
◦ Add a Dockerfile and build an image.
1. Configure environment:
◦ Inject LiveKit server URL, API key/secret, and any AI keys.
1. Deploy:
◦ Run containers on your chosen platform (Kubernetes recommended for production; VMs or PaaS also supported).
1. Register and validate:
◦ Confirm the agent connects to LiveKit and receives job dispatches.
1. Monitor & scale:
◦ Add logging/metrics, and scale replicas as needed.
What you need to self-host the full LiveKit stack
• LiveKit server (SFU/media server)
◦ Deployable via Docker, Kubernetes (Helm chart available), or cloud-init on a VM.
◦ Requires API key & secret to issue tokens and for agent/job dispatch.
• Networking & domain
◦ A domain name for the server (e.g., livekit.example.com).
◦ SSL certificate (Let’s Encrypt or other).
◦ Open required ports:
▪︎ TCP: 7880 (WebSocket), 7881 (HTTP/REST), 443 (if you proxy), SSH 22
▪︎ UDP: 7882 (WebRTC media) — ensure UDP allowed for WebRTC
• Egress/Recording service
◦ Egress runs as a separate service and uses Redis Pub/Sub to coordinate jobs.
◦ Needs GStreamer (and optionally Chrome) for compositing/transcoding.
◦ For hardware-accelerated encoding, install NVIDIA drivers/CUDA and configure GPU.
• Supporting components
◦ Redis (for pub/sub used by egress/agents)
◦ Storage for recordings (S3-compatible object store or local storage depending on your egress configuration)
◦ Optional DB or observability stack for metrics and logs
• High availability & region planning
◦ Deploy multiple LiveKit server instances or use k8s for HA.
◦ Co-locate agents and AI services with the LiveKit server to minimize latency for recording/real-time processing.
High-level steps to deploy the full stack
1. Provision infrastructure:
◦ Choose cloud provider or on-prem VMs/Kubernetes cluster.
1. Deploy LiveKit server:
◦ Docker run, use the Helm chart, or use cloud-init templates for VM provisioning.
1. Configure DNS and TLS:
◦ Point your domain to the server and install SSL certs.
1. Deploy Redis and egress:
◦ Start Redis; deploy the egress service (configure pub/sub and storage).
1. Deploy agents:
◦ Containerize and deploy agents; ensure they can reach the LiveKit server.
1. Test recordings:
◦ Create a test room, have an agent join and trigger a recording/egress job, verify output storage and transcoding.
1. Monitor and optimize:
◦ Add observability, scale workers, and optionally add GPUs for encoding.
Important operational notes
• Agents make outbound connections — you don’t need to open inbound ports on agent hosts.
• Egress/recording depends on Redis and can require GStreamer/Chrome. If you need GPU-accelerated encoding, install NVIDIA drivers and CUDA on the egress hosts.
• Match agent names and token permissions so LiveKit can dispatch jobs to your agents (scoped tokens with roomJoin, publish/subscribe as needed).
• For low latency, run agents and LiveKit server in the same region as clients and any AI services.
If you want, I can:
• Provide a sample Dockerfile and minimal agent example (Node or Python).
• Give exact docker run or Helm chart install commands for your chosen deployment option.
• Walk through how to configure egress with Redis and S3 storage.
Which deployment option should I prepare the detailed steps for?
Sources: Collect recording consent with tasks | LiveKit Documentation | Self-hosted deployments | LiveKit Documentation | examples/drive-thru | livekit/livekit_composite | DeepWiki | Introduction | LiveKit Documentation | server-sdk-js | livekit/livekit_composite | DeepWikiadventurous-appointment-82958
03/11/2026, 11:01 AMtall-airline-16756
03/11/2026, 11:01 AMapp.livekitKeys or env vars: API key:secret
◦ `ingress.hosts[0].host`: your domain
◦ Configure service type (LoadBalancer) and UDP port mapping for WebRTC (typically 7882)
• Post-deploy: verify pods are Running and service endpoints are reachable; test a client connecting to the domain.
6) Deploying Redis
• Deploy a managed Redis or a Kubernetes Redis (Helm chart like bitnami/redis).
• Ensure Redis is reachable by livekit-egress and by any component that needs pub/sub.
7) Deploying livekit-egress (recording)
• Deploy egress as its own Deployment/StatefulSet.
• Environment/config:
◦ Redis connection string
◦ Object storage credentials (S3_BUCKET, S3_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY) if using S3
◦ Any GStreamer/Chrome flags and temp storage path (PVC)
• If using GPU acceleration:
◦ Use node selector/taints for GPU nodes
◦ Add NVIDIA device plugin DaemonSet and set resources.requests/limits for GPUs
• Make egress autoscalable if you expect concurrent egress jobs
8) Build & deploy recording agents
• Build agents using the LiveKit Agents SDK (Node or Python) and create a Docker image.
• Provide env vars/secrets to agent pods:
◦ LIVEKIT_URL, LIVEKIT_API_KEY, LIVEKIT_API_SECRET
◦ Any AI provider keys (Deepgram, OpenAI, etc.)
• Deploy agents as a Deployment with HorizontalPodAutoscaler (HPA) for scale.
• Agents do not require inbound ports; they must be able to reach the LiveKit server URL.
9) Secrets & configuration
• Use Kubernetes Secrets for API keys and AI credentials.
• Use ConfigMaps for non-sensitive configuration (agent names, dispatch settings).
• If you want to rotate secrets without redeploying containers, implement a secret-sync or use tools like External Secrets.
10) Job dispatch & token scopes
• Ensure livekit-server is configured so it can dispatch jobs to agents/egress:
◦ Agent dispatch is matched by agent_name and permissions in your token.
◦ Tokens must include proper grants (roomJoin, canPublish, canSubscribe) for agents.
• Validate by issuing a job from server and watching agent logs for job receipt.
11) Storage for recordings
• Recommended: S3-compatible storage (AWS S3, MinIO).
• Configure egress with proper S3 credentials and bucket; ensure network access from egress pods to S3.
• Alternative: Use PVCs for temporary storage then move files to object storage.
12) Observability & monitoring
• Expose metrics via Prometheus (livekit exposes Prometheus metrics).
• Collect logs (ELK/Fluentd) from server, egress, and agents.
• Set alerts for pod restarts, high CPU/GPU usage, Redis latency, and egress failures.
13) Example next steps I can provide
• Helm values.yaml for livekit-server tailored to your cluster and domain.
• Deployment manifest examples for livekit-egress with Redis and S3 env config.
• Sample Deployment + HPA for an agent, plus a Dockerfile starter for Node/Python agents.
• GPU node YAML and instructions to enable NVIDIA drivers and device plugin.
If you tell me:
• Your Kubernetes provider (EKS/GKE/AKS/self-hosted),
• Whether you’ll use S3 or PVC for recordings,
• If you plan to use GPU nodes for egress,
I’ll provide the specific Helm values and sample manifests for those choices. Which details do you want first?