How can I generate api_key and api_secret on self-...
# ask-ai
b
How can I generate api_key and api_secret on self-hosting livekit?
t
Thanks for reaching out, Carlos. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'd be happy to guide you through generating an
api_key
and
api_secret
for your self-hosted LiveKit server. Just follow these simple steps: 1. Make Sure LiveKit Server CLI is Ready: First, please check that the
livekit-server
binary is installed and accessible in your environment. This is essential for the next steps. 2. Run the Key Generation Command: Next, run the following command to create a new API key and secret: `livekit-server generate-keys`This will give you an output like: `API Key: <generated-api-key> API Secret: <generated-api-secret>`Feel free to save these safely! 3. Use or Store Your Credentials: You’ll want to use these credentials in your application environment variables, such as
LIVEKIT_API_KEY
and
LIVEKIT_API_SECRET
. These are important for token generation and working with the server SDK. 4. Optional - Keep Your Server Configured: For convenience, you can store the keys in a configuration file or environment variables to keep things consistent across your deployments. If you’d like to explore more or need additional help, the LiveKit deployment documentation is a great resource. Don’t hesitate to reach out if you have any questions—I’m here to help! Sources: Generating tokens | LiveKit Docs | README.md