wooden-beard-26644
09/09/2025, 7:25 PMtall-airline-16756
09/09/2025, 7:25 PMtall-airline-16756
09/09/2025, 7:27 PMhttp://localhost:7880 is meant for local development with a self-hosted LiveKit server, and it doesn’t quite match the format expected for LiveKit Cloud deployments. No worries—we can get this sorted out together!
Here’s how you can fix it:
1. First, run lk cloud auth to authenticate with LiveKit Cloud and bring in your project settings. This step will automatically set up the CLI with the correct wss:// URL, API key, and secret.
2. Next, double-check your configuration by listing your projects with lk project list. You should see a valid LiveKit Cloud project URL that looks like wss://your-subdomain.livekit.cloud.
3. If you need to, you can set the right project as your default by running lk project set-default <project-name>.
If you prefer, you can also add a LiveKit Cloud project manually using this command:
lk project add <project_name> --url <livekit_url> --api-key <api_key> --api-secret <api_secret> [--default]
Just make sure the URL starts with wss:// and includes the correct subdomain. Once you have the right project set up, go ahead and try deploying the agent again. If you run into any more bumps, I’m here to help!
Sources: cmd/lk/agent.go | Docs::Home | Connecting to LiveKit | LiveKit Docs | Docs::Home | LiveKit CLI project management | LiveKit Docswooden-beard-26644
09/09/2025, 7:55 PMtall-airline-16756
09/09/2025, 7:55 PM--config flag to point to a .toml file, any API key or secret set in your environment (like LIVEKIT_API_KEY and LIVEKIT_API_SECRET) will override what’s in that config file. This is by design, to make sure sensitive credentials are always prioritized safely.
If you’d prefer the CLI not to use those environment variables, just make sure LIVEKIT_API_KEY and LIVEKIT_API_SECRET aren’t set in your environment. You can easily check by running env | grep LIVEKIT on Unix-based systems, or by looking at your environment variables in your system settings.
Once those are cleared, the CLI will happily use the credentials from your .toml file instead. I hope this helps clarify things! If you have any more questions, feel free to ask—I’m here for you.
Sources: LiveKit CLI | livekit/livekit_composite | DeepWiki | Accepting incoming calls | LiveKit Docs | Accepting incoming calls | LiveKit Docs | Worker options | LiveKit Docs | Secrets management | LiveKit Docs