refined-machine-33517
07/31/2025, 7:29 AMtall-airline-16756
07/31/2025, 7:29 AMtall-airline-16756
07/31/2025, 7:29 AMlocalhost inside a Docker container refers to the container itself, not the host machine where your LiveKit server is running.
To resolve this, you need to use the correct IP address to connect to the host machine:
• For MacOS and Windows: Use host.docker.internal instead of localhost. Example: <ws://host.docker.internal:7880>
• For Linux: Use 172.17.0.1 instead of localhost. Example: <ws://172.17.0.1:7880>
Ensure your configuration files are updated accordingly. For example:
Sources: test/integration/livekit_test.go | README.md | Self-hosting the Egress Service | LiveKit Docs | Ports and firewall | LiveKit Docsrefined-machine-33517
08/26/2025, 9:22 AMtall-airline-16756
08/26/2025, 9:22 AMhost.docker.internal or 172.17.0.1. Here are some ideas you might find helpful:
• Use Host Networking: You can set up the LiveKit service to use the host network by adding network_mode: host to the LiveKit service in your docker-compose.yml. This way, the container shares the host's network stack, making localhost directly accessible.
• Expose Specific Hostnames: If you'd prefer a custom hostname, you can add the extra_hosts directive to your docker-compose.yml to map a hostname to the host's IP address. For example:
extra_hosts:
- "livekit.local:127.0.0.1"
• Ensure Proper Port Binding: Looks like your current setup already exposes the needed ports. Just double-check that the LiveKit server is running and reachable on those ports from inside the container.
• Verify Network Connectivity: Since you’re using multiple networks (live-network and app-network), make sure the containers can talk to each other across these networks. You might want to check the network settings or consider using Docker’s bridge network mode for smoother inter-container communication.
Hopefully, these tweaks help clear up the connectivity hiccup while keeping your multi-network setup intact. If you want me to walk you through any of these or have more questions, just let me know—I’m here to help!
Sources: tests/docker-compose.yml | Self-hosting the Ingress Service | LiveKit Docs | Self-hosting the Ingress Service | LiveKit Docs | docker-compose.yaml | Deploy to a VM | LiveKit Docstall-airline-16756
08/28/2025, 1:41 PMUpdateParticipant method in LiveKit is usually accessed through HTTP protocols like Twirp, rather than WebSocket. Just to make sure I’m on the right track—are you trying to:
• Send real-time updates from the server to clients using WebSockets?
• Call UpdateParticipant via WebSocket instead of HTTP?
If you can share a bit more about what you’re aiming for, I’d be happy to help figure out the best way to make it happen or suggest some alternatives.
Sources: packages/livekit-server-sdk/src/RoomServiceClient.ts | livekit-api/src/services/room.rs | Participant attributes and metadata | LiveKit Docs | Participant attributes and metadata | LiveKit Docs | livekit-api/livekit/api/room_service.pytall-airline-16756
08/28/2025, 1:43 PMUpdateParticipant API works over regular HTTP/HTTPS, not WebSocket Secure (wss). No worries though, here’s how you can fix it:
1. Make sure your request URL starts with http:// or https://, not wss://. The right endpoint looks like this: <YOUR_SERVER_URL>/twirp/livekit.RoomService/UpdateParticipant.
2. Set the correct Content-Type header—use application/json if you’re sending JSON, or application/protobuf if you’re using Protobuf.
3. Don’t forget to include the Authorization header with a JWT token that has roomAdmin permissions for the room you’re targeting.
If you want to make things even smoother, try one of LiveKit’s official server SDKs—they handle all the tricky HTTP stuff, headers, and authentication for you:
• Node.js: Use roomService.updateParticipant() from livekit-server-sdk.
• Python: Use room_service.update_participant() from livekit-api.
• Kotlin: Use roomServiceClient.updateParticipant() from livekit-server-sdk-kotlin.
These SDKs really help cut down on errors and make your life easier. If you hit any snags or want a hand, just give me a shout—I’m here to help!
Sources: packages/livekit-server-sdk/src/RoomServiceClient.ts | livekit-api/livekit/api/room_service.py | livekit/livekit_room.twirp.go | src/main/kotlin/io/livekit/server/RoomServiceClient.kt | pkg/service/roomservice.go