Skip to content

TURN URL invalid hostname format when domain resolves to IP (v1.10.0) #4384

Closed

Description

@Nuuvik

Describe the bug
When turn.domain is set to a hostname, LiveKit 1.10.0 resolves it to an IP and wraps it in curly braces, producing an invalid TURN URL: turn:{93.110.232.77 }:3478?transport=udp. This causes RTCPeerConnection to fail immediately on the client side and the call never connects.
Server

Version: 1.10.0
Environment: self-hosted, Docker, behind nginx reverse proxy
TURN enabled with domain set to a hostname (e.g. livekit.example.com)

Client

SDK: js
Version: 2.15.13 / 2.16.0
Tested on: Element/Electron (Windows, Linux), Android WebView, iOS Safari

To Reproduce

Set turn.domain to a hostname (not a bare IP) in livekit.yaml
Start LiveKit 1.10.0
Client attempts to join a room
WebSocket opens but closes immediately with SIGNAL_SOURCE_CLOSE, sessionDuration: 0s
Browser console shows: ICE server parsing failed: Invalid hostname format

Expected behavior
TURN URL should be turn:93.110.232.77:3478?transport=udp or turn:livekit.example.com:3478?transport=udp — a valid format accepted by browsers.
Additional context

Downgrading to v1.9.12 fixes the issue immediately without any config changes
Workaround on 1.10.0: set turn.domain to a bare IP instead of a hostname
The malformed URL is visible in LiveKit WebSocket signal frames sent to the client

Activity

  1. added a commit that references this issue on Mar 24, 2026
  2. boks1971 commented on Mar 24, 2026

    @boks1971
    Contributor

    Thank you for reporting. This was caused by added support for IPv6. Fixing in #4389

  3. added a commit that references this issue on Mar 24, 2026
  4. Bilal-io commented on Mar 24, 2026

    @Bilal-io

    @boks1971 I deployed the :master version and we're still having issues.

  5. biglittlebigben commented on Mar 24, 2026

    @biglittlebigben
    Contributor

    What TURN URL are you seeing on master?

  6. added a commit that references this issue on Mar 25, 2026
  7. strausfuenf commented on Mar 31, 2026

    @strausfuenf

    For me it suddenly wants to use the wrong port even with 1.10.1 turn suddenly wants port 443 for TLS and ignores my config.

  8. boks1971 commented on Apr 1, 2026

    @boks1971
    Contributor
  9. added a commit that references this issue on Apr 10, 2026
  10. added a commit that references this issue on Jul 26, 2026
  11. added a commit that references this issue on Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions