Config files

Last updated

Config files let you provide file-shaped configuration to an app — for tools that insist on reading a path rather than an environment variable.

Use environment variables by default. Reach for a config file when a program genuinely requires one.

Adding one

On the app's Config Files panel, give the file a path inside the container and its contents. Saving restarts the app.

Typical uses:

  • A tool's own configuration file — server.yml, nginx.conf, config.toml
  • A CA bundle or certificate your app must read from disk
  • A small seed or lookup file that never changes

They're mounted read-only

Your app can read a config file but cannot write to it. That's deliberate — it keeps the panel the single source of truth, so the file can't drift from what you think you configured.

The consequence to plan for: a tool that expects to rewrite its own config at runtime won't work this way. Those need a volume instead, with the trade-off that you then own the contents rather than the panel.

Some paths are off-limits

You can't mount over system paths — /proc, /sys, /dev, and the platform's own tooling directory are rejected. Put your files somewhere ordinary like /etc/myapp/ or /config/.

Config file or volume?

You need Use
Configuration you edit in the panel Config file
Something the app writes to Volume
A secret Environment variable — or a config file if the tool demands a path
Anything large Volume, or bake it into the image

Config files are for small, hand-managed text. Anything the app manages itself belongs on a volume.

Secrets in config files

If a tool can only read credentials from a file, a config file is the right place — it's still part of the deployment rather than the image, so it isn't baked into a layer anyone who pulls the image can read.

Don't leave a copy in your repository as well. That's how the value ends up published.

Templates

Prefab templates can render parameters you supply into config files during deploy, which is how a ready-made app gets your settings without you editing anything by hand.