I have deployed a self-hosted livekit integrated a...
# ask-ai
c
I have deployed a self-hosted livekit integrated application with a single agent in Azure. While everything works fine using docker compose, the browser throws this error when the stack is deployed to Azure. What should we be looking into to address this?
Copy code
ConnectionError: could not establish pc connection
    at db64a633-63ce6292ebb0a2e0.js:1:197568
t
Thanks for reaching out, Andrew. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! The error
ConnectionError: could not establish pc connection
in your self-hosted LiveKit app on Azure can pop up for a few reasons. Don’t worry, I’ve got some friendly steps to help you troubleshoot this: • Run Connection Test Utility: Give LiveKit's Connection Test Utility a try to check out WebRTC, WebSocket, and TURN server connections. If everything fails, it might be a firewall or VPN blocking things. • Check Server Logs: Hop into your server via SSH and peek at the logs with
sudo docker-compose logs
. Keep an eye out for messages about TLS certificates or any connection hiccups. • Verify DNS Configuration: Double-check that your DNS records are pointing to the right IP by running
host <yourdomain>
. • Confirm TLS Certificates: Make sure your TLS certificates were grabbed successfully. If they’re missing, it could mean your server isn’t reachable from the internet. • Open Required Ports: Check that the ports needed for WebRTC (STUN/TURN) and WebSocket are open in your Azure Network Security Group (NSG). Usually, this kind of issue comes down to network stuff like firewalls or VPNs blocking ports, server setup quirks, or DNS/SSL hiccups. If you’re still stuck after these steps, feel free to share more about your Azure setup—things like NSG rules, load balancer details, DNS settings, and any logs you’ve got. I’m here to help you get this sorted! Sources: Deploy to a VM | LiveKit Docs | Deploy to a VM | LiveKit Docs | src/connectionHelper/checks/webrtc.ts | Diagnosing Connection Errors with Connection Test Utility