b
Hi
t
Thanks for reaching out, MOHAN. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hi — glad you reached out. What can I help you with today? If it’s about a LiveKit project, please share any relevant details (project/room IDs, SDK/platform, error messages, or steps to reproduce).
b
I want the helm template for livekit using AWS NLB.
t
Thanks — I’ll help with a Helm values.yaml you can use to deploy LiveKit behind an AWS Network Load Balancer (NLB), plus the install steps and a few notes. Below is a minimal example values.yaml configured for NLB (adjust names, ports, and secrets to fit your environment):
Copy code
# values.yaml - LiveKit Helm with AWS NLB
service:
  type: LoadBalancer
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
    service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
    service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "tcp"
    service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "3600"
  ports:
    - name: http
      port: 80
      targetPort: 7880
      protocol: TCP
    - name: https
      port: 443
      targetPort: 7880
      protocol: TCP
    - name: rtc-tcp
      port: 7881
      targetPort: 7881
      protocol: TCP
    - name: turn-tls
      port: 5349
      targetPort: 5349
      protocol: TCP

replicaCount: 2

livekit:
  apiKey: "<YOUR_API_KEY>"
  apiSecret: "<YOUR_API_SECRET>"
  rtc:
    udp:
      enabled: true
      port: 7882
    tcp:
      enabled: true
      port: 7881

ingress:
  enabled: false

resources:
  requests:
    cpu: 250m
    memory: 512Mi
  limits:
    cpu: 1000m
    memory: 2Gi
Install steps: 1. Add the LiveKit chart and update: helm repo add livekit https://helm.livekit.io helm repo update 1. Install with your values: helm install <release> livekit/livekit-server --namespace <ns> --create-namespace -f values.yaml Notes and tips: • Ensure AWS security groups allow the NLB target ports (80, 443, 7880–7882, 5349 as needed). • NLB preserves client IPs and works well for TCP-based WebRTC fallbacks; the chart exposes both HTTP(S) signaling and TCP ports required by LiveKit. • If you want TLS at the load balancer, annotate additional ssl settings and configure certificates in AWS, or let LiveKit handle TURN/TLS on 5349. • If you need an ALB or Ingress-based setup instead, I can provide that values.yaml as well. Would you like this adjusted for internal TLS termination (LB handles TLS) or for LiveKit to terminate TLS (TURN/TLS enabled)? Sources: Deploy to Kubernetes | LiveKit docs
b
Where do we need to add the domain. e.g. livekit.<domain>.com & turn.<domain>.com
t
You're asking where to add the domains
livekit.<domain>.com
and
turn.<domain>.com
for a Helm deployment with an AWS NLB. Here’s exactly where to set each: 1) LiveKit server config (passed via Helm values) • For TURN, add the TURN domain in the LiveKit config section so the server advertises the correct hostname:
Copy code
config: |
  ...
  turn:
    enabled: true
    domain: turn.<domain>.com
    tls_port: 443
    udp_port: 443
• You do not need to set
livekit.<domain>.com
inside the LiveKit config for normal signaling; clients will connect to the domain you expose via DNS/TLS. 2) Helm service / annotations (NLB) • Keep service type LoadBalancer and annotate for NLB in your values.yaml so the NLB is created:
Copy code
service:
  type: LoadBalancer
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
    ...
3) DNS (Route 53 or your DNS provider) • Point both hostnames to the NLB DNS name (use Alias/A record in Route 53): ◦
livekit.<domain>.com
→ NLB ◦
turn.<domain>.com
→ NLB 4) TLS certificates • Request/attach certificates in ACM for both
livekit.<domain>.com
and
turn.<domain>.com
and use them on the NLB listener (port 443). The
turn.domain
in the LiveKit config must match the cert used for TURN/TLS. Notes • If you terminate TLS at the LB, ensure the NLB listener forwards TCP 443 to the LiveKit service target port (7880/7881 as configured). • Ensure security groups allow required ports (80/443, 7880–7882, TURN ports). Would you like a ready-to-use values.yaml that includes the
config:
block with
turn.domain
plus the NLB annotations and example ACM listener notes? Sources: Deploying LiveKit | LiveKit docs | Deploy to a VM | LiveKit docs | Deploy to Kubernetes | LiveKit docs
Below is a complete example
values.yaml
you can use with the LiveKit Helm chart to deploy behind an AWS NLB and publish DNS records for both
livekit.<domain>.com
and
turn.<domain>.com
via ExternalDNS. Replace placeholders (
<...>
) with your values. Important notes: • ExternalDNS will create DNS records pointing to the NLB once the service is created; ensure ExternalDNS is running in your cluster with permissions to manage your DNS provider (Route 53). • Request ACM certificates for both domains and attach them to the NLB listener (or configure TLS termination as desired). • Ensure AWS security groups allow the needed ports (443, 80, 7880–7882, TURN ports). values.yaml
Copy code
# values.yaml - LiveKit with AWS NLB + ExternalDNS
replicaCount: 2

service:
  type: LoadBalancer
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
    service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
    service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "tcp"
    service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "3600"
    # ExternalDNS annotations to create two records. ExternalDNS supports comma-separated hosts.
    external-dns.alpha.kubernetes.io/hostname: "livekit.<domain>.com,turn.<domain>.com"
    # If using Route53 and you want alias records for the NLB, ExternalDNS will create Alias if supported.
  ports:
    - name: http
      port: 80
      targetPort: 7880
      protocol: TCP
    - name: https
      port: 443
      targetPort: 7880
      protocol: TCP
    - name: rtc-tcp
      port: 7881
      targetPort: 7881
      protocol: TCP
    - name: turn-tls
      port: 5349
      targetPort: 5349
      protocol: TCP

# LiveKit server configuration passed into the container
config: |
  bind_address: ""
  port: 7880
  rtc:
    tcp_port: 7881
    port_range_start: 50000
    port_range_end: 60000
    use_external_ip: true
  turn:
    enabled: true
    domain: turn.<domain>.com
    tls_port: 443
    udp_port: 443

livekit:
  apiKey: "<YOUR_API_KEY>"
  apiSecret: "<YOUR_API_SECRET>"

# If you want LiveKit to advertise an external URL, you can set advertise_host
# Uncomment and set if needed:
#  advertise_host: "livekit.<domain>.com"

ingress:
  enabled: false

resources:
  requests:
    cpu: 250m
    memory: 512Mi
  limits:
    cpu: 1000m
    memory: 2Gi

nodeSelector: {}
tolerations: []
affinity: {}
Next steps checklist: • Replace
livekit.<domain>.com
and
turn.<domain>.com
with your real domains. • Ensure ExternalDNS is installed and configured to manage your DNS provider (Route 53). • Create ACM certificates for both domains and attach them to the NLB listener (TCP/443). If you prefer LiveKit to terminate TURN TLS, ensure the cert is available to the pod (not covered in this values file). • Install the chart: helm repo add livekit https://helm.livekit.io helm repo update helm install my-livekit livekit/livekit-server -n livekit --create-namespace -f values.yaml Would you like a variant where TLS is terminated at the NLB (ACM cert attached) with example NLB listener annotations, or one that mounts TLS certificates into the LiveKit pods so the app terminates TURN/TLS?
Thanks — noted. Below is an updated complete
values.yaml
that sets TURN
tls_port: 443
and
udp_port: 443
, includes AWS NLB annotations, and configures ExternalDNS to create records for
livekit.<domain>.com
and
turn.<domain>.com
. Replace the placeholders with your values.
Copy code
# values.yaml - LiveKit with AWS NLB + ExternalDNS
replicaCount: 2

service:
  type: LoadBalancer
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
    service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
    service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "tcp"
    service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "3600"
    # ExternalDNS will create DNS records for both hostnames
    external-dns.alpha.kubernetes.io/hostname: "livekit.<domain>.com,turn.<domain>.com"
  ports:
    - name: http
      port: 80
      targetPort: 7880
      protocol: TCP
    - name: https
      port: 443
      targetPort: 7880
      protocol: TCP
    - name: rtc-tcp
      port: 7881
      targetPort: 7881
      protocol: TCP
    - name: turn-tls
      port: 5349
      targetPort: 5349
      protocol: TCP

# LiveKit server configuration passed into the container
config: |
  bind_address: ""
  port: 7880
  rtc:
    tcp_port: 7881
    port_range_start: 50000
    port_range_end: 60000
    use_external_ip: true
  turn:
    enabled: true
    domain: turn.<domain>.com
    tls_port: 443   # TLS port for TURN/TLS
    udp_port: 443   # UDP port for TURN (set to 443 as requested)

livekit:
  apiKey: "<YOUR_API_KEY>"
  apiSecret: "<YOUR_API_SECRET>"
  # advertise_host: "livekit.<domain>.com"  # uncomment if you want LiveKit to advertise this host

ingress:
  enabled: false

resources:
  requests:
    cpu: 250m
    memory: 512Mi
  limits:
    cpu: 1000m
    memory: 2Gi

nodeSelector: {}
tolerations: []
affinity: {}
Checklist after applying: • Replace
livekit.<domain>.com
,
turn.<domain>.com
, and API credentials. • Ensure ExternalDNS is installed and has permission to manage your DNS (Route 53). • Request ACM certificates for both domains and attach them to the NLB listener on port 443 (or provide certs to the pods if terminating TLS in-app). • Open required ports in security groups (443, 80, 7880–7882, and the UDP range 50000–60000 if using UDP media). • Install the chart: helm repo add livekit https://helm.livekit.io helm repo update helm install my-livekit livekit/livekit-server -n livekit --create-namespace -f values.yaml Would you like a variant that mounts TLS certificates into the pod (LiveKit terminates TLS) instead of terminating at the NLB?
b
Question: Dont' we need 3478 for UDP.
t
Good question — both are valid but have different trade-offs. • Default TURN UDP port: 3478 is the standard port for TURN/UDP. Many TURN clients and tools expect 3478, so using 3478 is the conventional choice. • Using UDP on 443: Setting
udp_port: 443
is a common workaround to bypass restrictive firewalls that only allow traffic on port 443. It works if your NLB/security groups forward UDP 443 to your TURN server and your TURN certificate/domain/advertised host match. Recommendations: • If you expect restrictive networks (corporate Wi‑Fi, mobile carriers) then use UDP 443 for better connectivity. • If you want maximum compatibility and follow standards, expose UDP 3478 (and also 5349 for TURN/TLS if needed). • You can expose both: keep
udp_port: 3478
(primary) and also enable a UDP listener on 443 (clients will use whichever they can reach). To do that with the Helm chart, expose both ports on the service and configure LiveKit/turn to listen on the matching ports. If you want, I can produce an updated values.yaml that: • exposes UDP 3478 and UDP 443 on the NLB, • configures
turn.domain
and certs, and • includes ExternalDNS annotations. Which option do you prefer: 3478 only, 443 only, or both?