Skip to main content

Environment Variables

All FLUXAOS_* environment variables are documented here. Core services read them via FluxaosConfig (src/config/env.ts); adapters and the daemon script read some directly from process.env.

Set these in .env (committed, non-secret defaults) or .env.local (gitignored, secrets and local overrides).

Daemon — Required

VariableTypeDefaultPurpose
FLUXAOS_DAEMON_SHUTDOWN_GRACE_SECONDSintegernone (required)Seconds to wait for in-flight stage runs to drain after SIGTERM. Daemon refuses to start without it.

Pipeline execution

VariableTypeDefaultPurpose
FLUXAOS_TARGET_REPO_PATHpathnoneAbsolute path to a local clone of the target repo. Stage runner refuses to acquire an isolation env without it.
FLUXAOS_BUNDLED_PIPELINES_DIRpathsrc/core/pipeline/bundledPath to bundled YAML playbook files.
FLUXAOS_WORKSPACE_ROOTpath<repo>/.fluxaos-worktrees/Where worktrees are created. Auto-added to target repo .gitignore.
FLUXAOS_ARTIFACTS_ROOTpath<repo>/.fluxaos-artifacts/Where per-run artifact directories live. Auto-added to target repo .gitignore.

Cleanup scheduler

The cleanup scheduler only runs if all four vars are set. Missing any one disables it (logged warning; app still boots).

VariableTypeDefaultPurpose
FLUXAOS_CLEANUP_SWEEP_INTERVAL_MINintegernoneHow often (minutes) the cleanup sweep runs.
FLUXAOS_CLEANUP_STALE_DAYSintegernoneAge in days before a worktree is considered stale and removed.
FLUXAOS_CLEANUP_SESSION_RETENTION_DAYSintegernoneAge in days before terminal session data is purged.
FLUXAOS_CLEANUP_ARTIFACTS_RETENTION_DAYSintegernoneAge in days before terminal pipeline run artifact directories are reaped.

Daemon recovery

VariableTypeDefaultPurpose
FLUXAOS_DAEMON_RECOVERY_SWEEP_INTERVAL_MINintegernone (optional)If set, daemon runs crash recovery every N minutes. If unset, only the startup sweep runs.

Development / testing

VariableTypeDefaultPurpose
FLUXAOS_TEST_TARGET_REPOstringnoneowner/repo that deploy-touching e2e journey tests open PRs against. Specs skip cleanly when unset.
FLUXAOS_LAN_AUTH_BYPASS1noneSet to 1 to let Playwright skip /login on LAN access (homelab use).