is it possible to have named config files per env ...
# ask-ai
r
is it possible to have named config files per env for lk deployments? staging.toml and prod.toml etc
t
Thanks for reaching out, Saurabh. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — great question. You can absolutely manage environment-specific configs (like
staging.toml
and
prod.toml
) for LiveKit deployments, but the
lk
CLI expects a single
livekit.toml
file by name. Here are practical patterns you can use to keep separate config files per environment. • Use separate LiveKit Cloud projects for each environment (staging, prod). Each project has its own configuration and secrets. • Keep distinct files locally (for example,
staging.toml
and
prod.toml
) and copy or rename the one you need to
livekit.toml
before running the
lk
CLI: a.
cp staging.toml livekit.toml
(deploy staging) b.
cp prod.toml livekit.toml
(deploy prod) • Automate the swap in CI/CD (recommended): ◦ In GitHub Actions or your pipeline, choose the correct TOML based on branch, environment, or GitHub environment and copy it to
livekit.toml
before the deploy step. ◦ Store secrets/API keys in environment variables or use a secrets file (the CLI supports providing secrets separately) so you don’t embed sensitive values in the TOML. • If you prefer strict separation, maintain separate projects and pipeline credentials so deployments can run independently without manual renaming. If you’d like, I can: • Show an example GitHub Actions snippet that copies the right file and runs the
lk
deploy step. • Recommend a secrets-handling pattern for your pipeline. Which would be most helpful for you? Sources: Self-hosted deployments | LiveKit Documentation | Deploy LiveKit Agents with GitHub Actions | LiveKit | Google AI and LiveKit | LiveKit Documentation