Pi Durable Platformdocs

Configuration

Every Pi Durable Platform setting: its environment variable, default and meaning, the YAML file, secrets from files, and the production safety checks.

Pi Durable Platform reads its configuration at start-up: built-in defaults, then an optional YAML file named by PDP_CONFIG_FILE, then environment variables (later sources win). Settings marked secret can also be read from a file named by <NAME>_FILE, which is how Kubernetes Secrets are usually mounted; surrounding whitespace is trimmed.

The YAML file is flat: its keys are the variable names in lower case. Lists can be YAML lists or comma-separated strings. Unknown keys are refused.

app_url: https://agents.example.com
agents_launcher: kubernetes
oidc_allowed_groups: [agents-users, agents-admins]
oidc_client_secret_file: /run/secrets/oidc-client-secret

pi-durable-platform doctor checks the configuration without starting anything; see Doctor and health.

Server

VariableDefault
APP_URLnone, requiredThe public origin, such as https://agents.example.com. Used for cookies, OIDC redirects, origin checks and as the OAuth issuer. https unless loopback.
LISTEN_ADDR:8098Where the web app and API listen
DATABASE_URLnone, required (secret)The platform database
MIGRATE_ON_STARTfalseApply migrations at start-up
LOG_LEVELinfodebug, info, warn or error
LOG_FORMATjsonjson or text
TRUSTED_PROXIESnoneComma-separated CIDRs of your ingress, allowed to set X-Forwarded-For
SHUTDOWN_DELAY5sAfter SIGTERM, how long readiness fails before the server stops taking requests (0 to 5m)
SHUTDOWN_TIMEOUT60sHow long in-flight requests get to finish (1s to 30m)

Instance identity

VariableDefault
INSTANCE_NAMEPi Durable PlatformThe product name in the web app and page titles (1 to 100 characters)
ORG_NAMEnoneYour organisation's name, such as "Example Corp"
UI_THEMEneutralThe only theme
UI_LOGO_URLnoneYour logo: an https URL or a same-origin path such as /logo.svg. Without it the sidebar, sign-in page and session-unavailable page show Pi Durable Platform's own mark (since v0.1.1)
SUPPORT_URLnoneThe Help link: an http(s) URL or a mailto: address
TEAM_REQUEST_URLnoneWhere people request a team, such as a service desk form; Home links to it

Sign-in and sessions

VariableDefault
OIDC_ISSUERnoneYour identity provider's issuer URL. Empty disables single sign-on.
OIDC_CLIENT_IDnoneRequired with OIDC_ISSUER
OIDC_CLIENT_SECRETnone (secret)Required with OIDC_ISSUER
OIDC_SCOPESopenid,profile,emailMust include openid
OIDC_EMAIL_CLAIMemailThe claim holding the email address
OIDC_GROUPS_CLAIMgroupsThe claim holding the person's groups; empty stores none
OIDC_REQUIRE_VERIFIED_EMAILtrueRefuse sign-in unless email_verified is true
OIDC_ALLOWED_EMAIL_DOMAINSnone (anyone)Comma-separated email domains allowed to sign in
OIDC_ALLOWED_GROUPSnone (anyone)Only people in one of these groups may sign in; needs OIDC_GROUPS_CLAIM
BOOTSTRAP_ADMIN_SUBJECTnoneThe OIDC subject made platform admin on its first sign-in, once
DEV_AUTHfalseDevelopment personas; refused unless APP_URL is loopback
SESSION_TTL12hHow long a browser session lasts (5m to 30 days)
REQUESTS_PER_MINUTE600Requests per person (or service account) per minute
LOGIN_ATTEMPTS_PER_MINUTE20Sign-in attempts per client address per minute

See OIDC sign-in.

Keys

VariableDefault
ENCRYPTION_KEYnone, required (secret)32 bytes, base64 (openssl rand -base64 32). Encrypts stored secrets: provider keys, MCP headers, apps' MCP headers.
ENCRYPTION_KEY_PREVIOUSnone (secret)The key being rotated away from; still accepted for reads
API_KEY_PEPPERnone, required (secret)32 bytes, base64. The HMAC key under which API keys, service account keys and OAuth tokens are stored as digests.
API_KEY_PEPPER_PREVIOUSnone (secret)The pepper being rotated away from. Keys made with it keep working and are re-digested on use. Remove it after 2 to 4 weeks.

See Security model.

Agents

VariableDefault
AGENTS_DATABASE_URLnone, required (secret)The agents database, with a role that has CREATEROLE and CREATE on it. Separate from DATABASE_URL's database.
AGENTS_CREATE_DATABASEfalseCreate the agents database at start-up; development only
AGENTS_RUNTIME_DATABASE_HOSTnonehost:port agent runtimes use for PostgreSQL, when they reach it differently from the platform
AGENTS_LAUNCHERlocallocal (development only), kubernetes or agent-sandbox
AGENTS_RUNTIME_DIRruntimeThe runtime package, for the local launcher
AGENTS_NAMESPACEthe platform's namespaceWhere agent pods, Sandboxes and claims go
AGENTS_IMAGEnoneThe runtime image. Required for kubernetes, and for agent-sandbox without a warm pool.
AGENTS_RUNTIME_CLASSnoneA RuntimeClass for agent pods, such as gVisor
AGENTS_IMAGE_PULL_SECRETnoneA registry Secret in the agents' namespace
AGENTS_SANDBOX_WARM_POOLnoneA SandboxWarmPool to claim runtimes from (agent-sandbox)
AGENTS_SANDBOX_ACTIVATION_SECRETnoneThe Secret holding the pool's RUNTIME_ACTIVATION_TOKEN; created if missing
AGENTS_SANDBOX_ACTIVATION_TOKENnone (secret)The pool's token given directly (at least 32 characters); not with the Secret
AGENTS_IDLE_TIMEOUT10mIdle agents hibernate after this long (10s to 7 days)
AGENTS_GATEWAY_ADDR127.0.0.1:8099Where the platform listens for agents (model and MCP proxy). Use :8099 on Kubernetes.
AGENTS_GATEWAY_URLhttp://127.0.0.1:8099How agents reach that listener: an http(s) origin
AGENTS_CLIENT_MCP_HOSTSnoneHosts apps may give agents MCP servers on, comma-separated [scheme://]host[:port], *. for subdomains, https by default. Empty: none.
AGENTS_CLIENT_MCP_MODEproxyproxy (through the gateway) or direct for apps' MCP servers
AGENTS_MODEL_PROVIDERdemoThe platform's default model: demo (scripted, no key) or openai-compatible
AGENTS_MODEL_BASE_URLnoneWith openai-compatible, such as https://models.example.com/v1
AGENTS_MODEL_API_KEYnone (secret)With openai-compatible
AGENTS_MODEL_IDnoneWith openai-compatible
AGENTS_MODEL_REASONINGfalseWhether the default model reasons

The default model is for templates and agents that don't choose one from the model catalog. Its key is given to the agents that use it.

Production safety checks

Unless APP_URL is a loopback address, the platform refuses to start (and doctor fails) when:

  • ENCRYPTION_KEY, API_KEY_PEPPER or API_KEY_PEPPER_PREVIOUS is the public example value from .env.example;
  • DEV_AUTH is on;
  • AGENTS_LAUNCHER is local, which runs agents as unisolated processes on the platform's host;
  • AGENTS_CREATE_DATABASE is on;
  • APP_URL is http.

pi-durable-platform migrate needs only DATABASE_URL.

On this page