Doppler
Read secrets from a Doppler project and config through the doppler CLI. fnox.toml holds secret names; values stay in Doppler. The provider is read-only: manage values in Doppler.
| Config type | doppler |
| Storage | Remote service |
Writes (fnox set) | No (read-only) |
| Requires | Doppler CLI on PATH |
Quick start
Sign in with doppler login, then add a provider scoped to a project and config:
[providers.doppler]
type = "doppler"
project = "my-app"
config = "dev"
[secrets]
DATABASE_URL = { provider = "doppler", value = "DATABASE_URL" }fnox provider test doppler
fnox exec -- npm startAuthentication
fnox uses the first token it finds and passes it to the CLI as DOPPLER_TOKEN:
- The provider's
tokenfield. FNOX_DOPPLER_TOKEN.DOPPLER_TOKEN.- Otherwise, the CLI's own login session from
doppler login.
When authentication fails in an interactive terminal, fnox offers to run doppler login. Change that command with auth_command.
CI
Create a service token scoped to the project and config the job needs, and supply it from the CI secret store:
- name: Deploy
env:
DOPPLER_TOKEN: ${{ secrets.DOPPLER_TOKEN }}
run: fnox exec -- ./deploy.shStore the token with fnox
Keep a service token encrypted with another provider, such as age, and reference it from token:
[providers.doppler]
type = "doppler"
project = "my-app"
config = "prd"
token = { secret = "DOPPLER_TOKEN" }
[secrets]
DOPPLER_TOKEN = { provider = "age", value = "YWdl...", env = false } # ciphertext, abbreviatedStore the token through the hidden prompt with fnox set DOPPLER_TOKEN --provider age, then add env = false to the entry. That keeps the token out of fnox exec commands and shell integration; fnox still resolves it whenever a Doppler secret needs it. Don't export DOPPLER_TOKEN="$(fnox get DOPPLER_TOKEN)": that puts the token in every process you start.
To keep the token in a gitignored file, encrypted to a PIN-protected hardware key, see protect the vault credential.
Configuration
| Field | Required | Default | Description |
|---|---|---|---|
project | No | CLI setting (doppler setup or the token) | Doppler project, passed as --project. |
config | No | CLI setting (doppler setup or the token) | Doppler config (environment), passed as --config. |
token | No | FNOX_DOPPLER_TOKEN, then DOPPLER_TOKEN | Service token. |
Every field accepts { secret = "NAME" } to take its value from another fnox secret. The options shared by all providers, auth_command and daemon_cache, are in the configuration reference.
Reference formats
A secret's value is the secret name in the provider's project and config.
value | What fnox reads |
|---|---|
DATABASE_URL | DATABASE_URL in the configured project and config |
fnox reads the computed value, with Doppler secret references already expanded. A value that holds JSON can be narrowed with json_path.
When fnox resolves several secrets from one provider, it fetches them with a single doppler secrets get call.
Several projects or configs
Each provider instance reads one project and config. Define one instance per scope:
[providers]
app = { type = "doppler", project = "my-app", config = "prd" }
infra = { type = "doppler", project = "infra", config = "prd" }
[secrets]
DATABASE_URL = { provider = "app", value = "DATABASE_URL" }
AWS_ACCESS_KEY_ID = { provider = "infra", value = "AWS_ACCESS_KEY_ID" }To switch configs per environment, override the provider in a profile instead.
Troubleshooting
Unauthorized or invalid service token
Run doppler login, or check which token fnox picked up: the provider's token, FNOX_DOPPLER_TOKEN and DOPPLER_TOKEN take precedence over the CLI login.
Could not find project or config
Check the names, and that the token or login can access them:
doppler configs --project my-appSecret not found
Check that the secret exists in the selected config:
doppler secrets --project my-app --config prd --only-names