I am trying to understand 1: how the livekit clien...
# ask-ai
t
I am trying to understand 1: how the livekit client (next js starter repo) connects to the server. Is it VIA environment variables? if so I have a seperate agent-starter repo but I need to somehow deploy it to livekit?
t
Thanks for reaching out, Ellis. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! Just wanted to walk you through how the LiveKit client in the Next.js starter repo connects to the server using environment variables. Here’s what you’ll need: • `LIVEKIT_API_KEY`: Your LiveKit API key • `LIVEKIT_API_SECRET`: Your LiveKit API secret • `NEXT_PUBLIC_LIVEKIT_URL`: The WebSocket URL for your LiveKit server, usually something like
wss://<project-subdomain>.livekit.cloud
You’ll find these variables set up in environment files (like
.env
). They help generate access tokens and establish that WebSocket connection to your LiveKit server smoothly. Now, if you’re looking to deploy your separate agent-starter repo to LiveKit, Render.com is a great option. Here’s a quick overview to get you started: 1. Create a
render.yaml
file right in your project root with all the deployment configurations you need. 2. Set up an environment group on Render.com, adding variables like
LIVEKIT_URL
,
LIVEKIT_API_KEY
, and
LIVEKIT_API_SECRET
. 3. Then, launch your service by creating a blueprint in Render.com that points to your repo. Render will spot the
render.yaml
file and handle the rest for you. If you want me to walk you through any of these steps or if you hit any bumps along the way, just give me a shout—I’m here to help! Sources: Transcription Applications | livekit/livekit_composite | DeepWiki | Next.js 12 quickstart | LiveKit Docs | .env.example