shy-article-62777
09/02/2025, 10:13 PMtall-airline-16756
09/02/2025, 10:13 PMtall-airline-16756
09/02/2025, 10:14 PM.env secret on a LiveKit agent in the cloud, you can easily do this using the lk agent update-secrets command through the LiveKit CLI. Here’s a quick guide to help you out:
1. Using a secrets file:
• First, get a file ready (like .env) with your secrets in KEY=value format.
• Then, run this command: lk agent update-secrets --secrets-file=./.env --id=CA_yourAgentId.
2. Using the --secrets flag:
• You can update secrets directly by running: lk agent update-secrets --secrets "KEY=new_value" --id=CA_yourAgentId.
• If you have multiple secrets, just add more flags like this: lk agent update-secrets --secrets "KEY1=value1" --secrets "KEY2=value2".
A few extra tips:
• If you want to replace all existing secrets, use the --overwrite flag.
• When you update secrets, the agent will do a rolling restart but don’t worry—it won’t interrupt any active sessions.
• To see what secrets you currently have, just run: lk agent secrets --id=CA_yourAgentId.
If you have any questions or need a hand with this, just let me know—I’m here to help!
Sources: Agent deployment CLI reference | LiveKit Docs | Secrets management | LiveKit Docs