i hve a locally hosted developer livekit and i wan...
# ask-ai
r
i hve a locally hosted developer livekit and i want my agent to be hosted elsewhere. lets say right now i have both the agent and the sever on hte same device - my agent's .env has this :LIVEKIT_API_KEY=devkey LIVEKIT_API_SECRET=secret LIVEKIT_URL=ws://localhost:7880 now lets say i want to put the agent.py code on a separate vm how do i make the url point to teh right one
t
Thanks for reaching out, Rhythm. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
To get your LiveKit agent chatting with a server hosted on a different VM, all you need to do is update the
LIVEKIT_URL
in the agent's environment to point to the server’s public domain or IP address. Here’s a quick example:
Copy code
LIVEKIT_URL=wss://your-livekit-domain.com
Just make sure of a few things: • The server’s firewall is open for the necessary ports (like 443, 7881, 3478/UDP, 50000-60000/UDP). • Your DNS records for the server’s domain are pointing to its public IP address. • The
LIVEKIT_API_KEY
and
LIVEKIT_API_SECRET
are set up correctly in the agent’s environment. If your server isn’t publicly accessible, you might need to tweak internal DNS and firewall settings or use self-signed certificates for internal setups. Feel free to reach out if you want a hand with any of this—I’m here to help! Sources: Deploy to a VM | LiveKit Docs | complex-agents/nova-sonic/nova-sonic-form-agent/.env.example | web/.env.sample | Example Applications | livekit/livekit_composite | DeepWiki | examples/.env.example