Skip to main content
Flux is configured entirely through environment variables. For local development, copy .env.example to .env (or export variables in your shell) and edit as needed. For production on Azure App Service, set variables as Application Settings — values are injected as environment variables at startup and never need to be committed to source control.
Sections below group every variable by concern. Each table lists the variable name, its compiled-in default (from api/config.py), and its purpose.
In production, set FLUX_DEEPSEEK_API_KEY, FLUX_OPENROUTER_API_KEY, FLUX_FOUNDRY_API_KEY, and LM_BEARER_TOKEN as Key Vault references in App Service Application Settings rather than plain-text values. Credentials stored as Key Vault references are resolved at runtime and never appear in logs or the App Service portal.

Server

Core process and filesystem settings. These rarely need to change for local development.

Azure Connection

Controls how Flux authenticates to Azure for Resource Graph, Advisor, and Cost Management queries.

Cost Management

Controls the independently scheduled actual and amortized cost collectors, including retry behavior and QPU-aware pacing.

FOCUS Cost Export

Controls ingestion of FOCUS v1.0 cost exports from Azure Blob Storage, used for CSP subscriptions and governed charge-level investigation.

Cost Anomaly Detection

Tunable parameters for the matching-weekday median/MAD seasonal anomaly model. Increase history and baseline thresholds for more conservative detection.

Synchronization Worker

Controls the durable sync queue consumer that serializes all DuckDB writes.

Inventory Drift

Parameters for the consecutive-snapshot diff engine and its scope-level change-volume anomaly baselines.

Right-Sizing

Thresholds that govern how Flux classifies VM candidates as idle or review-eligible. All CPU, memory, and network thresholds are applied to governed telemetry evidence.

Telemetry / LogicMonitor

Settings for the LogicMonitor incremental metric collector and Azure Monitor bootstrap integration. LogicMonitor collection runs in rotating, checkpointed 30-minute batches.

Flux Intelligence / AI

Settings for the Ask Flux conversational assistant. The assistant is disabled by default and requires an external AI provider credential.

Authentication

Controls how Flux validates user identity and maps claims to internal roles.
FLUX_AUTH_MODE=mock grants every request full administrator access with no token validation. Never deploy with mock mode to a publicly reachable endpoint. Use mock only for local development on a loopback address. Set FLUX_AUTH_MODE=entra only behind correctly configured App Service Authentication (Easy Auth); Flux trusts the X-MS-CLIENT-PRINCIPAL header injected by App Service and will accept forged headers if Easy Auth is not enforcing authentication upstream.

Backup

Optional DuckDB backup to Azure Blob Storage. When a storage account URL is set, each successful sync uploads a checkpointed DuckDB file. Prefix-scoped retention pruning runs automatically.