Hey hi, have a quick question. I have deleted mult...
# ask-ai
n
Hey hi, have a quick question. I have deleted multiple api keys from the project. But when i read the LIVEKIT_API_KEY and LIVEKIT_API_SECRET on cloud, I'm still reading the deleted api keys. I now have only one API key - But it doesn't use that API KEY.
t
Thanks for reaching out, Hari. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m responding to your note about deleting API keys but still seeing the old values in
LIVEKIT_API_KEY
/
LIVEKIT_API_SECRET
. Quick explanation and what you can do now: • Environment variables are injected into running agent containers at deployment time. If an agent was deployed with an old key, it will keep using that value until you update/redeploy the agent. • Update the agent secrets so the containers get the new key and trigger a rolling restart: a. Put the new
LIVEKIT_API_KEY
and
LIVEKIT_API_SECRET
into your local secrets file (e.g.,
.env.local
). b. Run:
lk agent update-secrets --secrets-file .env.local --overwrite
• Verify you didn’t bake old credentials into images or code (check
.env
files in builds; use
.dockerignore
to avoid including them). • Use
lk project list
to confirm the CLI/project configuration is pointed at the correct project. If you want, tell me: • How you deploy agents (LiveKit Cloud agent, Docker, Kubernetes, etc.) • Whether you already ran
lk agent update-secrets
and saw a restart I’ll guide the exact next steps based on your deployment method. Sources: LiveKit CLI project management | LiveKit docs | Secrets management | LiveKit docs | examples/survey | livekit/livekit_composite | DeepWiki
n
I did the update-secrets, but this didn't work.
t
Thanks — sorry that
update-secrets
didn’t fix it. I want to narrow this down so we can find the cause. Quick questions: 1. Which deployment method are you using for the agent? (LiveKit Cloud agent, Docker image, Kubernetes, other) 2. Did
lk agent update-secrets
return any errors or show a successful restart? If you have the command output, please paste it. 3. Can you confirm the new
LIVEKIT_API_KEY
/
LIVEKIT_API_SECRET
values are present in the
.env
/
.env.local
file you passed to
update-secrets
? 4. Have you checked whether the old credentials might be embedded in a running container image, config map, or deployment manifest (e.g., Dockerfile, Kubernetes Secret)? 5. Are you seeing authentication failures or other errors in the agent or application logs when it tries to connect? Send answers and any relevant command output or log snippets and I’ll guide the next troubleshooting steps.