Skip to main content

Configuration

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam. Flux reads configuration from three sources, in this order of precedence:

  1. Command-line flags (--workspace, --log-level, …)
  2. Environment variables prefixed with FLUX_
  3. A TOML file at ~/.flux/config.toml (or $FLUX_CONFIG)

Example config file

# ~/.flux/config.toml

workspace = "acme"
log_level = "info"

[backend]
driver = "postgres"
dsn = "postgres://flux:flux@localhost:5432/flux"

[telemetry]
otlp_endpoint = "http://localhost:4317"
sample_rate = 1.0

[limits]
max_concurrent_runs = 32
max_step_duration_ms = 600_000

Environment variables

VariableDefaultDescription
FLUX_WORKSPACELogical tenant (required)
FLUX_TOKENWorkspace API token (required)
FLUX_LOG_LEVELinfotrace, debug, info, warn, error
FLUX_BACKEND_DSNsqlite:./flux.dbPersistence DSN
FLUX_OTLP_ENDPOINTOpenTelemetry collector URL

Secrets

Reference secrets in pipelines via the secret:// URI scheme. The CLI resolves them lazily at runtime, never at parse time:

step('publish')
.to('kafka://orders.v1')
.with({
sasl: {
username: 'flux',
password: 'secret://kafka/password',
},
});

Supported secret backends: AWS Secrets Manager, HashiCorp Vault, Azure Key Vault, and a local .flux/secrets file for development.