When using livekit cli with option —secret-mount t...
# ask-ai
b
When using livekit cli with option —secret-mount then it seems to fail when trying to store the secret, what can it be? And would it be considered save if I simply embed the file within the docker image? Are there other users or anyone that can access these files in livekit cloud?
t
Thanks for reaching out, Jannik. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Regarding the CLI failure with `--secret-mount`: common causes are • the local file path you passed does not exist or is not accessible (wrong relative/absolute path, permissions) • the file contains invalid characters or exceeds size limits • the CLI cannot read the file due to host filesystem permissions Can you share the exact CLI command you ran, the file path you passed, and any error output you see? That will help me pinpoint which of the above is happening. About embedding secrets in the Docker image: do not embed secrets in the image. It is not considered secure. Images can be inspected, cached, or leaked; secrets baked into images can be exposed. Use LiveKit’s runtime secret injection (
--secret-mount
or
--secrets-file
) so secrets are mounted at runtime and not stored inside the image. Access in LiveKit Cloud: secrets mounted via
--secret-mount
are provided to the agent container at runtime and are not visible to other users or agents. They are mounted inside the container (e.g., under
/etc/secret/<filename>
) and are not baked into the image or build context. If you’d like, paste your command and error output and I’ll suggest the exact fix or required permissions/format for the secret file. Sources: Agent deployment CLI reference | LiveKit docs | Secrets management | LiveKit docs | Builds and Dockerfiles | LiveKit Docs