plain-hamburger-12701
03/24/2026, 9:37 AMtall-airline-16756
03/24/2026, 9:37 AMtall-airline-16756
03/24/2026, 9:38 AMiceTransportPolicy: 'relay') so media flows over TURN/TCP instead of attempting UDP.
• If you plan to use LiveKit Cloud TURN, ensure your network allows connections to the TURN host(s) you’ll rely on.
If you’d like, tell me:
• Are you using your own TURN server or LiveKit Cloud TURN?
• Do you plan to force iceTransportPolicy: 'relay' on clients?
With that I can give exact config snippets or firewall rules to match your setup.
Sources: Running LiveKit on AWS | LiveKit | Running LiveKit on AWS | LiveKit | Why You Shouldn’t Build Real-Time Voice Agents Directly on Model APIs | Liv... | Firewall Tips, with interactive elementsplain-hamburger-12701
03/25/2026, 3:53 AMtall-airline-16756
03/25/2026, 3:53 AMiceTransportPolicy: 'relay') or server-side settings for TURN over TCP/TLS.
I can then provide exact config snippets or firewall rule suggestions.
Sources: Running LiveKit on AWS | LiveKit | Firewall Tips, with interactive elementsplain-hamburger-12701
03/25/2026, 3:56 AMtall-airline-16756
03/25/2026, 3:56 AMiceTransportPolicy: 'relay' in your RTC config so clients use TURN/TCP.
1. Test from inside a corporate‑restricted network to confirm signaling (WS to 7880) and media (TURN over TCP/TLS) work end‑to‑end.
If you’d like, I can:
• Provide the exact LiveKit config snippet for enabling TURN over TCP/TLS and binding/forwarding to 443.
• Give a short checklist for firewall rules and a quick client test plan.
Which would be most helpful next?
, with interactive elementsplain-hamburger-12701
03/25/2026, 3:56 AMiceTransportPolicy: 'relay') yes I want to force thistall-airline-16756
03/25/2026, 3:56 AMconst pc = new RTCPeerConnection({
iceServers: [
{ urls: ["turn:your-livekit-host:7881?transport=tcp"], username: "TURN_USERNAME", credential: "TURN_PASSWORD" }
],
iceTransportPolicy: "relay"
});
• If you expose TURN on 443 (recommended), update the TURN URL:
{ urls: ["turn:your-livekit-host:443?transport=tcp"], ... }
• In LiveKit SDKs, ensure connect options pass the iceServers (or rely on server-provided ICE credentials) and set iceTransportPolicy: "relay" where the SDK exposes RTC config options.
Server (built-in TURN + TCP/TLS)
• Ensure the built‑in TURN is enabled and configured for TCP/TLS. Two common approaches:
◦ Bind the TURN listener to 7881 and also configure TLS for TURN/TCP if supported.
◦ Or proxy/bind external port 443 to the TURN service (e.g., with an HTTPS/TCP proxy or iptables port forward) so corporate clients can reach TURN on 443.
• Make sure LiveKit is issuing TURN credentials (username/credential) to clients. The LiveKit server will normally provide ICE servers/credentials as part of signaling; confirm your client uses those credentials.
Firewall and proxy checklist
• Allow inbound TCP 7880 and 7881 to the LiveKit server.
• If you prefer TURN over 443, create a secure forward from 443 → 7881 (or configure TURN to listen on 443) and open TCP 443.
• If you use TLS termination (proxy), ensure the TURN signaling between proxy and LiveKit is secure/trusted.
• Confirm any corporate proxy doesn’t block the TURN payload on 443.
Quick test plan
1. From inside the corporate network, try connecting to signaling:
◦ WebSocket to ws/wss on port 7880 — confirm room join succeeds.
1. Verify client receives ICE servers/credentials from LiveKit.
2. Force iceTransportPolicy: 'relay' and connect:
◦ Confirm ICE candidates are TURN candidates (server reflexive vs relay).
◦ Confirm media flows (audio/video) via TURN — observe higher latency but a working stream.
1. If connection fails, test connectivity:
◦ TCP connect to your-livekit-host:7881 (and :443 if forwarded) from within the corporate network (e.g., telnet host 7881 or curl to a TLS endpoint) to verify port reachability.
If you want, I can:
• Provide the exact LiveKit config snippet for enabling TURN/TLS (showing relevant config keys).
• Give an example of how to let LiveKit return ICE servers automatically in the SDK you’re using (JS, iOS, or Android).
• Outline commands to test port reachability from a restricted environment.
Which of those would help you next?
, with interactive elementsplain-hamburger-12701
03/25/2026, 4:04 AMtall-airline-16756
03/25/2026, 4:04 AMplain-hamburger-12701
03/25/2026, 4:05 AMtall-airline-16756
03/25/2026, 4:05 AMiceTransportPolicy: 'relay' on the client side so they won’t attempt UDP even if available.
Quick question to help me advise further
• Do you want to remove TURN because of security/policy reasons, or because you want to rely on an external TURN provider or plain UDP?
Tell me that and I’ll give exact config snippets for removing built‑in TURN safely or for configuring LiveKit to use an external TURN service (including port/proxy suggestions).
, with interactive elementsplain-hamburger-12701
03/25/2026, 4:06 AMtall-airline-16756
03/25/2026, 4:06 AMiceTransportPolicy: 'relay' and to use the server-provided TURN credentials.
Which option would you like to pursue — keep default ports open, proxy to 443, or use an external TURN?
, with interactive elements