Im trying to setup a multi tenant architecture wit...
# ask-ai
c
Im trying to setup a multi tenant architecture with livekit. I couldnt find any way to create project programmatically.
t
Thanks for reaching out, Jithu. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm happy to help you understand how LiveKit supports multi-tenant architectures! Each project in LiveKit represents an isolated deployment with its own URL, API key, and API secret, which is great for keeping things organized. At the moment, creating new projects programmatically isn’t available, so you’ll need to create them manually through the LiveKit Cloud web interface. Once you have your project set up, you can easily manage configurations programmatically using the LiveKit CLI. For example, to add a project configuration, you can use this command:
Copy code
lk project add --url <livekit-server-url> --api-key <key> --api-secret <secret> <project_name>
And if you’re a LiveKit Cloud user, authenticating and linking your project is simple with:
Copy code
lk cloud auth
If you have any questions or need a hand with setting up your multi-tenant architecture, please don’t hesitate to reach out—I’m here to help! Sources: LiveKit CLI project management | LiveKit docs | cmd/lk/cloud.go | Community & Support | livekit/livekit_composite | DeepWiki | Mini tutorial: setting up a LiveKit Cloud project
c
what we need is to create project programattically
t
I wanted to let you know that, at the moment, LiveKit doesn’t support creating projects programmatically. You’ll need to create projects manually through the LiveKit Cloud web interface. But once your project is set up, you can easily manage configurations and resources programmatically using the LiveKit CLI or SDKs. If you have a particular use case in mind or need help exploring other options, please don’t hesitate to share more details. I’m here to help and guide you through it!
c
usecase is : our application creates projects programttically we need to link each projects to livekit and want to know each project usage and all other things from livekit can you help us to achieve this
t
I'm glad you're looking to link your application projects to LiveKit and keep track of usage! Here's a simple way to get started: 1. Create Projects in LiveKit: Although you can't create projects programmatically just yet, you can easily set them up manually through the LiveKit Cloud web interface. Each project you create will come with its own unique API key and secret. 2. Link Projects to Your Application: To connect your projects programmatically, you can use the LiveKit CLI. For example:
lk project add --url <livekit-server-url> --api-key <key> --api-secret <secret> <project_name>
3. Track Usage: LiveKit Cloud helps you monitor resource consumption like media usage for each project. You can check out detailed usage and billing info anytime in the billing section of the LiveKit Cloud dashboard. By giving each project its own API credentials, you’ll be able to keep everything organized and track usage smoothly. If you have any questions or want a hand with setting this up, just let me know—I’m here to help! Sources: LiveKit CLI project management | LiveKit docs | cmd/lk/app.go | LiveKit Cloud billing | LiveKit docs
c
can we sync projects that created using cli to cloud
t
Absolutely! Projects created or managed with the LiveKit CLI can definitely be synced with LiveKit Cloud. To get started, just use this command:
Copy code
lk cloud auth
When you run this, it will open a browser window where you can sign in to LiveKit Cloud and choose a project to import. The CLI will then take care of generating an API key and adding the project configuration right on your local setup. If you have multiple projects, no worries—you can simply run
lk cloud auth
again and pick different projects each time. Once everything’s synced, managing your projects is easy with commands like
lk project list
or
lk project set-default
. If you have any questions or need a hand with anything else, just let me know—I’m here to help! Sources: LiveKit CLI project management | LiveKit docs | LiveKit CLI Setup | LiveKit Docs