Technical Assistance Requested — Migrating SpadesRoom from LiveKit Cloud to Self-Hosted LiveKit

Hello LiveKit Support Team,

I am developing SpadesRoom, a multiplayer Spades application designed to allow four players in different geographic locations to play together using live audio and video.

Our application uses React Native/Expo Web, Supabase Cloud for authentication and table management, and LiveKit for real-time audio/video communication.

We previously established successful audio/video connections between devices using LiveKit Cloud. However, after exceeding our free-tier allowance, we decided to investigate self-hosting LiveKit using Docker Desktop on a Windows computer.

Our current configuration:

  • SpadesRoom web application running locally on port 8083.

  • Supabase Cloud handling player authentication and table management.

  • Supabase Edge Function (livekit-table-token) generating authenticated LiveKit access tokens.

  • Self-hosted LiveKit Docker container running successfully.

  • LiveKit server responding locally on port 7880.

  • Current local LiveKit address: ws://127.0.0.1:7880.

The problem:

Our deployed Supabase Edge Function still returns the original LiveKit Cloud address. Consequently, the application attempts to connect to LiveKit Cloud and receives HTTP 429 errors and WebSocket connection failures.

We understand that simply changing the LiveKit URL to 127.0.0.1 will not work for players connecting from different locations.

We would appreciate your guidance on the following questions:

  1. What is the simplest recommended configuration for making a self-hosted LiveKit Docker server accessible to four players connecting from different networks?

  2. Can Cloudflare Tunnel or ngrok support both LiveKit signaling and WebRTC audio/video, or would additional UDP/TCP media configuration be required?

  3. What networking, TLS, firewall, and STUN/TURN configuration would you recommend for our initial four-player alpha test?

  4. Can we retain our existing Supabase Cloud Edge Function for token generation and simply update the LiveKit URL, API key, and API secret?

  5. Would you recommend continuing to self-host LiveKit on a Windows computer during development, or moving to a small VPS?

  6. Is there a development-friendly or cost-effective LiveKit Cloud option available for early-stage applications like SpadesRoom?

Our immediate objective is to establish a reliable four-player audio/video session before proceeding with additional gameplay development.

We would appreciate any documentation, configuration examples, or technical assistance your team can provide.

Thank you for your time and support.

Curtis Cheeks, Jr.
Founder, SpadesRoom Technologies

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.