Skip to content

Environment variables

The Flowstate Agent reads its configuration from environment variables on Linux and Windows. The same names work whether they're set via shell env, /etc/flowstate.env (Linux), or the Windows registry under HKLM\SOFTWARE\Flowstate\Agent — the agent normalises them all.

macOS reads managed preferences, not env vars

The macOS NETransparentProxy agent reads its configuration from managed preferences (domain inc.flowstate.agent), delivered by an MDM configuration profile — not from the environment variables below. The key names differ (Tenant, ProxyUrl, UserEmail, UserToken, …). See macOS managed configuration for that table and the MDM deployment guide for delivery.

Precedence (highest wins):

  1. Local env varFLOWSTATE_LOG_LEVEL=debug set inline for a one-off flowstate proxy run invocation while debugging.
  2. Per-platform managed config/etc/flowstate.env (macOS / Linux), Windows registry. This is where flowstate install writes the values it received from the install flags / MDM.
  3. Built-in defaults.

flowstate install writes /etc/flowstate.env (or the Windows registry) based on the --key, --user, and --host flags you pass. You typically don't need to set any of these by hand — the installer does it for you.

Required

VariableDescription
FLOWSTATE_API_KEYThe organisation token the agent uses, together with the user email, to authenticate to Flowstate. Issue it in Settings → AI → Cloud Proxy. On a managed Mac it arrives as the UserToken preference. The agent waits for it rather than starting unconfigured.
FLOWSTATE_USER_EMAILThe email the agent authenticates as, and the attribution key in Flowstate. On macOS this is the managed-pref UserEmail.

Cloud proxy

VariableTypeDefaultDescription
FLOWSTATE_ENDPOINTURLhttps://proxy.flowstate.incThe cloud proxy origin the agent forwards captured exchanges to over HTTPS, authenticating as the device's user. Override for a regional EU endpoint, staging, or an on-prem mirror. Must be HTTPS. On macOS this is the managed-pref ProxyUrl.

Networking

VariableTypeDefaultDescription
FLOWSTATE_UPSTREAM_PROXYURLunsetCorporate proxy for the agent's own outbound traffic (the connection to the cloud proxy, update downloads). Format: http://user:pass@proxy.example.com:8080. See corporate proxies.
FLOWSTATE_PROXY_PORTint47813Local TCP port the agent's PAC daemon listens on for AI traffic. Change only if you have a conflict.
FLOWSTATE_PROXY_BINDstring127.0.0.1Bind address. Loopback by default; do not change unless you know exactly what you're doing.

Enforcement

VariableTypeDefaultDescription
FLOWSTATE_ENFORCEMENT_MODEenumobserveobserve (default — capture-only) or enforce (apply AI policy at request time). See enforcement. The same setting lives in Settings → AI → Agent Policy → Enforcement.

Diagnostics

VariableTypeDefaultDescription
FLOWSTATE_LOG_LEVELenuminfoOne of debug, info, warn, error.
FLOWSTATE_LOG_PATHpathOS-specificOverride the log file location. macOS: /var/log/flowstate.proxy.log. Linux: stdout (journald). Windows: C:\ProgramData\Flowstate\logs\agent.log.

macOS managed configuration

The macOS agent does not read the environment variables above. It reads managed preferences from its domain inc.flowstate.agent, delivered by an MDM configuration profile (see the MDM deployment guide). Every key defaults to today's behaviour, so an empty or partial profile reproduces the current behaviour exactly.

KeyTypeDefaultPurpose
TenantstringrequiredTenant host, e.g. acme.flowstate.inc. Base for the token and allowlist URLs.
ProxyUrlstringhttps://proxy.flowstate.incCloud proxy endpoint. Override only for a regional or dedicated endpoint.
UserEmailstringrequiredThe email the agent authenticates as — the attribution key. In production this is the MDM $EMAIL placeholder, expanded per device.
UserTokenstring (secret)requiredThe organisation token the agent authenticates with (together with UserEmail). Promoted into the Keychain on first read.
HiddenModeboolfalseHide the menubar icon.
UserCannotDisableboolfalseAlways-on lockdown: hidden UI, no disable/quit affordance, enforced keep-alive. Engages only when delivered as a forced MDM value.
AutoUpdatebooltrueEnable silent background auto-update. false opts the fleet out.
UpdateChannelstringbetaUpdate channel the agent pulls from.

Per-platform notes

macOS — Configuration is delivered as an MDM managed-preferences payload (domain inc.flowstate.agent), not an env file; see the table above and the MDM deployment guide. A forced profile value is required to engage UserCannotDisable; a value written locally by the installer stays overridable for debugging.

Linux — Same /etc/flowstate.env file, loaded by systemd via EnvironmentFile=. Standard KEY=value syntax, no quotes needed for simple strings. Reload with sudo systemctl restart flowstate-agent.

Windows — Values live under HKLM\SOFTWARE\Flowstate\Agent. The MSI

  • flowstate install write them; Settings Catalog / GPO can overwrite them. Names are identical to the env-var names on the other platforms (no CamelCasing). The service reads (in order): machine env → registry → defaults. Boolean values are REG_DWORD 1/0; everything else is REG_SZ.

Deprecated / removed

These were present in earlier builds and have been removed. The agent ignores them if it sees them — no error, no warning. Most have a direct replacement in the table above.

VariableStatusReplacement
FLOWSTATE_OTLP_KEYrenamedUse FLOWSTATE_API_KEY (still accepted as an alias — see telemetry keys).
FLOWSTATE_USERrenamedUse FLOWSTATE_USER_EMAIL (still accepted as an alias).
FLOWSTATE_MODEremovedThere is one forwarding path — the cloud proxy. No mode selector.
FLOWSTATE_CLOUD_PROXYrenamedUse FLOWSTATE_ENDPOINT.
FLOWSTATE_TELEMETRY_KEYreplacedUse FLOWSTATE_API_KEY (the organisation key — see telemetry keys).
FLOWSTATE_OTLP_ENDPOINTreplacedUse FLOWSTATE_ENDPOINT.
FLOWSTATE_CLOUD_PROXY_EMAILreplacedUse FLOWSTATE_USER_EMAIL.
FLOWSTATE_CLOUD_PROXY_KEYreplacedThe organisation key supplies both tenant routing and authentication, so a separate value is no longer needed. Set FLOWSTATE_API_KEY instead.
FLOWSTATE_CAPTURE_PROMPTSremovedPrompt capture is per-tool and configured by flowstate install's per-tool config writer. Pass --prompts at install time to opt in.
FLOWSTATE_UPDATE_*removedmacOS auto-updates silently; control it with the AutoUpdate / UpdateChannel managed-pref keys. See auto-updates.
FLOWSTATE_REDACT_BODIESremovedNot a posture under the current design.
FLOWSTATE_REDACT_HEADERSremovedHeaders are always forwarded — they're how the cloud proxy attributes calls to users.

Flowstate Documentation