-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Feat: Configurable External IP #3979
Description
Livekit version: v1.9.1
Self-hosted using Docker and init script.
Ports are open on proxy and vm
Ports are properly streamed.
Successfully getting TLS certs.
Is it possible to hardcode the bind IP address for livekit? I'm running my server behind a persistent vpn to a proxy. I've got the correct proxying networking all setup, but it appears to be searching for a "public ip" on startup. I need to be able to set the bind ip to the ip address of my proxy instead of the one it defaults to in it's lookup.
Oct 03 12:57:08 livekit docker[3533]: ingress-1 | 2025-10-03T12:57:08.200Z INFO ingress rtcconfig/webrtc_config.go:262 failed to get external ip {"nodeID": "NE_kv49YqQNBkhT", "local": "local-ip-redacted", "err": "context canceled"}
Oct 03 12:57:08 livekit docker[3533]: ingress-1 | 2025-10-03T12:57:08.200Z INFO ingress rtcconfig/webrtc_config.go:262 failed to get external ip {"nodeID": "NE_kv49YqQNBkhT", "local": "local-ip-redacted", "err": "context canceled"}
Oct 03 12:57:08 livekit docker[3533]: ingress-1 | 2025-10-03T12:57:08.214Z INFO ingress rtcconfig/webrtc_config.go:262 failed to get external ip {"nodeID": "NE_kv49YqQNBkhT", "local": "local-ip-redacted", "err": "context canceled"}
Oct 03 12:57:08 livekit docker[3533]: livekit-1 | 2025-10-03T12:57:08.236Z WARN livekit rtcconfig/ip.go:272 could not validate external IP {"ip": "public-ip-redacted", "error": "context canceled"}
After this it binds to a public ip (I think), which is not the IP i want it bound to. So I would like to tell it to bind to an IP of my choosing.
Output from Livekit Tester
Connecting to signal connection via WebSocket
Connected to server, version 1.9.1.
Establishing WebRTC connection
udp public-ip-redacted:50124 host
tcp public-ip-redacted:7881 host (passive)
udp public-ip-redacted:50041 host
udp public-ip-redacted:50044 host
udp public-ip-redacted:50132 host
tcp public-ip-redacted:7881 host (passive)
udp public-ip-redacted:50057 host
udp public-ip-redacted:50065 host
Warning: ports need to be open on firewall in order to connect.
Error: could not establish pc connection
Can connect via TURN
Error: could not establish pc connection
Can publish audio
Error: could not establish pc connection
Can publish video
Error: could not establish pc connection
Resuming connection after interruption
Error: could not establish pc connection
Fail
Here the IP it attempts to hit is the wrong public IP bc it's not the public ip of the proxy. I want to be able to add the public IP of the proxy manually
Request:
- I would like to be able to configure the External IP address that LiveKit broadcasts.
Reasons:
- Security: This would allow putting Livekit behind a proxy to further remove it from direct attacks.
- Mobility: This would allow deploying Livekit in more environments.
I'm not sure if the change is in the Livekit repo or if it is in the Protocol repo. With a quick search I didn't immediately find where the logic is to set the broadcast IP address. I would also welcome a point in the right direction, and I could possibly work on the PR for this change.
If there already is a way to configure this, then please direct me to the documentation or code repo to look it up.
Love the project and thanks for all you do!