Skip to main content

Configuration

DaoFlow is configured through environment variables and a CLI config file.

Environment Variables

Local Development

VariableDescription
DATABASE_URLPostgreSQL connection string
BETTER_AUTH_URLPublic-facing URL of the DaoFlow instance
BETTER_AUTH_SECRETOptional locally, required in production
ENCRYPTION_KEYOptional locally, recommended for realistic secret testing

Production .env

The generated production .env file is intentionally smaller than the runtime environment inside the container. The compose stack derives DATABASE_URL, REDIS_URL, and most container-local defaults internally.

Most operators edit only these values:

VariableDefaultDescription
DAOFLOW_VERSIONlatestImage tag to run
BETTER_AUTH_URLPublic origin used for sign-in and callbacks
DAOFLOW_PORT3000Host port bound to the DaoFlow container
BETTER_AUTH_SECRETProduction session signing secret
ENCRYPTION_KEYProduction secret-encryption key
POSTGRES_PASSWORDPassword for the DaoFlow application database
TEMPORAL_POSTGRES_PASSWORDPassword for Temporal's Postgres database
DEPLOY_TIMEOUT_MS600000Timeout for a single deployment execution
DAOFLOW_ENABLE_TEMPORALfalseEnables durable Temporal-backed orchestration
TEMPORAL_NAMESPACEdaoflowTemporal namespace when Temporal mode is enabled
TEMPORAL_TASK_QUEUEdaoflow-deploymentsTemporal task queue name

Initial Owner Bootstrap

These variables are optional, but when both are set DaoFlow bootstraps the first owner account on first start:

VariableDescription
DAOFLOW_INITIAL_ADMIN_EMAILEmail for the first owner account
DAOFLOW_INITIAL_ADMIN_PASSWORDPassword for the first owner account

The CLI install flow also reads these same variables when --email and --password are omitted, then writes them into the generated server .env file.

For the full production variable reference, including SMTP and advanced worker settings, see Self-Hosting Environment Variables.

CLI Configuration

The CLI stores its configuration in ~/.daoflow/config.json:

{
"currentContext": "default",
"contexts": {
"default": {
"apiUrl": "http://localhost:3000",
"token": "your-api-token",
"authMethod": "api-token"
}
}
}

The CLI also supports DAOFLOW_URL and DAOFLOW_TOKEN as environment-based auth for CI and agent workflows. Set both together; if either one is missing, the CLI now fails closed instead of silently falling back to the saved config context.

Setting CLI Defaults

# Set the API URL
daoflow login --url https://your-instance.com --token YOUR_TOKEN

# For non-interactive automation
export DAOFLOW_URL=https://your-instance.com
export DAOFLOW_TOKEN=YOUR_TOKEN

# For fresh installs, preseed the first owner
export DAOFLOW_INITIAL_ADMIN_EMAIL=owner@your-instance.com
export DAOFLOW_INITIAL_ADMIN_PASSWORD=replace-this-secret

Server Configuration

Each registered deployment server has configurable settings in the dashboard or admin API:

SettingDefaultDescription
SSH HostIP address or hostname
SSH Port22SSH port
SSH Private KeyStored SSH private key material
Target Server NameStable name used by deploy plans
Docker Socket/var/run/docker.sockDocker socket on the managed host

Security Configuration

See the Security & RBAC guide for configuring:

  • User roles and permissions
  • API token scopes
  • Agent principal accounts
  • Audit log retention