Virtual avatar is displayed when using livekit cloud but not displayed in localhost

Virtual avatar is displayed when using livekit cloud but not displayed in localhost.

My server config in docker:

server:
  image: ubuntu:24.04
  tty: true
  ports:
    - 3478:3478
    - 7880-7882:7880-7882
    - 50080-50100:50080-50100

Server start command:

livekit-server --dev --bind 0.0.0.0 --node-ip 127.0.0.1 --udp-port 50080-50100 --turn.enabled --turn.domain localhost --turn.udp_port 3478 --turn.relay_range_start 51080 --turn.relay_range_end 51100

Are livekit rooms working outside the avatar test? It seems the turn ports are not exposed in docker?

It works when the turn argument is removed and no avatar session is attached

docker compose exec server livekit-server --dev --bind 0.0.0.0 --node-ip 127.0.0.1 --udp-port 50080-50100

I added turn ports to docker but it’s not worked

ports:
  - 3478:3478
  - 7880-7882:7880-7882
  - 50080-50100:50080-50100
  - 51080-51100:51080-51100

And the following error is showing in browser console

WebRTC: ICE failed, your TURN server appears to be broken, see about:webrtc for more details

Depending on your setup you might not need turn for webrtc to work. But can you share what you are trying to test? Which avatar service are you using? Typically the Avatar providers require your livekit service to be available publicly so the avatar can join the room - it won’t work locally.