I am using avatar integration, but it not working ...
# ask-ai
c
I am using avatar integration, but it not working in self hosted livekit server, where has it workng in livekit cloud server
t
Thanks for reaching out, N. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hi there! I understand that avatar integration issues on a self-hosted LiveKit server can be a bit tricky, especially since it’s different from LiveKit Cloud. Let’s work through this together. Please double-check the following: • Make sure your self-hosted server is publicly accessible with a valid
<wss://your-domain.com>
URL. • Verify that the environment variables
LIVEKIT_URL
,
LIVEKIT_API_KEY
, and
LIVEKIT_API_SECRET
are correctly set for the avatar agent. • Ensure proper TLS (HTTPS/WSS) termination is in place, and that your firewall allows inbound connections. • Confirm that the avatar agent can connect both to your LiveKit server and the external avatar provider API. It’s also a good idea to check the agent logs for any authentication or connection errors. If things still aren’t working, try comparing your self-hosted setup with the LiveKit Cloud configuration to spot any differences. I’m here to help if you need any more guidance! Sources: livekit-plugins/livekit-plugins-tavus/livekit/plugins/tavus/avatar.py | LiveKit Cloud | LiveKit Docs | delay-handling/raw_data.txt
c
iam using ws://localhost:7880 url
t
It looks like the URL
<ws://localhost:7880>
isn’t publicly accessible, which might be why you’re running into this issue. For the avatar integration to work smoothly, your self-hosted LiveKit server needs to be reachable over the internet using a public URL with a secure WebSocket (WSS) protocol, like
<wss://your-domain.com>
. Here’s a friendly checklist to help you get there: • Set up a public domain for your server. • Configure TLS so you can enable those secure WebSocket (WSS) connections. • Make sure your server is accessible from outside your local network. After you’ve made these updates, just update the
LIVEKIT_URL
in your avatar agent configuration to point to your new public WSS URL, and you should be good to go!
c
for testing can i use ngrok
t
Absolutely, you can use ngrok for testing purposes! It’s a great tool that lets you expose your local server to the internet with a public URL. Here’s a simple way to get it set up: 1. First, install ngrok if you haven’t done so yet. 2. Then, run the command
ngrok http 7880
to expose your local server. 3. Ngrok will give you a public URL (something like
<NGROK_PUBLIC_URL>
). 4. Next, update the
LIVEKIT_URL
in your avatar agent configuration to use this ngrok URL with the WSS protocol (for example,
wss://<NGROK_PUBLIC_URL>
). Just a little heads-up: ngrok works wonderfully for testing, but it’s not really meant for production environments because there might be some performance and security considerations. If you have any questions or need further help, feel free to ask—I’m here to support you!