Skip to main content
boat injects two types of secret when a sandbox starts.
A sandbox gets no variables and no secret files when one of these is true:
  • Its environment is safe for third parties. boat onboard can turn this on.
  • You created it with --no-env.
  • The Secrets toggle of the environment is off.
  • It started before you saved the secret. Run boat env upgrade base, or read Versions and upgrades.
Run boat env info base to see the switch and the toggles.
Use secrets for app credentials, API keys, .env files, deployment tokens and private registry logins. Do not put secrets in these places:
  • Prompts.
  • URLs.
  • CLI arguments that can go into logs.
  • Docker build args.
  • Committed files.

Set variables and secret files

Each call changes one item and makes a new environment version. The other items stay.
The older POST /secrets call (updateSecrets in the SDKs) changes only the default environment. It replaces all variables and secret files. Use the per-environment calls above instead.

.env files

A secret file is the way to put a .env file in each sandbox. The path is relative to /home/user. There is no repository picker. To put a file inside a clone, start the path with the repository folder name. This path:
writes to:
boat skips absolute paths and paths that go outside /home/user.

Variables for one sandbox

The variables of an environment apply to every sandbox that uses it. To give one sandbox its own values, pass env when you create it. boat merges the per-sandbox values over the environment’s values. If the two have the same key, the per-sandbox value wins. Per-sandbox values also reach a sandbox made with --no-env.
A fork gets the per-sandbox variables of its source sandbox. If the fork passes its own env, it does not get them.