Environment reference
Everything a self-hosted install reads from its environment. Unset means the default in the right-hand column; a blank default means the feature is off.
Core
| variable | |
|---|---|
FOLDRUN_SECRET_KEY |
the root key that wraps every account’s keys. Generate once, keep out of every backup that holds the data |
FOLDRUN_DATA / FOLDRUN_DATA_DIR |
the data directory — every workspace, run and user |
FOLDRUN_PUBLIC_URL |
the origin the outside world reaches this install on; needed for approve links and shares |
FOLDRUN_TRUST_PROXY |
1 behind a proxy, tunnel or load balancer — the rate limiter reads the forwarded address |
FOLDRUN_OPEN_SIGNUP |
1 lets strangers create accounts. Last switch on |
FOLDRUN_MULTI_TENANT |
1 on any install that will serve more than one account — refuses to run without step isolation |
Models
| variable | |
|---|---|
ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN |
the platform’s default model credential |
ANTHROPIC_DEFAULT_HAIKU_MODEL, …_SONNET_MODEL, …_OPUS_MODEL |
which model each tier (fast, default, max) resolves to |
ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN |
point the default credential at a compatible endpoint |
FOLDRUN_FALLBACK_BASE_URL, FOLDRUN_FALLBACK_TOKEN, FOLDRUN_FALLBACK_{HAIKU,SONNET,OPUS}_MODEL |
a second endpoint a step retries on when the primary refuses |
Isolation and the runner
| variable | |
|---|---|
FOLDRUN_RUN_ISOLATION |
container (one box) or k8s (a cluster). Unset runs steps in-process — one account only |
FOLDRUN_RUNNER_RUNTIME |
the RuntimeClass for run pods, e.g. gvisor |
FOLDRUN_RUNNER_IMAGE |
the image every step executes in |
FOLDRUN_RUNNER_NETWORK |
the network run containers join |
FOLDRUN_CONCURRENCY |
steps executing in parallel across the install — hardware, in practice |
FOLDRUN_RUNNER_CPUS, FOLDRUN_RUNNER_MEMORY |
the reservation for a step of default size: |
FOLDRUN_RUNNER_CPUS_SMALL, …_MEMORY_SMALL, …_CPUS_HEAVY, …_MEMORY_HEAVY |
for size: small and size: heavy |
Files and storage
| variable | |
|---|---|
FOLDRUN_STORAGE_DRIVER |
s3 for an S3-compatible bucket; unset keeps blobs on the data volume |
FOLDRUN_S3_ENDPOINT, FOLDRUN_S3_BUCKET, FOLDRUN_S3_REGION, FOLDRUN_S3_ACCESS_KEY_ID, FOLDRUN_S3_SECRET_ACCESS_KEY, FOLDRUN_S3_PATH_STYLE |
the bucket |
FOLDRUN_STORAGE_MAX_MB |
one object, default 512 |
FOLDRUN_STORAGE_QUOTA_MB |
one workspace, default 5120 |
Data services (optional)
| variable | |
|---|---|
FOLDRUN_DATABASE_URL |
Postgres — sessions, audit log, ledger, run queue. Unset: files |
FOLDRUN_REDIS_URL |
Redis — rate limits, leases, caches. Unset: in-process |
FOLDRUN_SEARCH_URL |
a SearXNG instance for the websearch tool |
Billing
| variable | |
|---|---|
FOLDRUN_BILLING |
1 meters usage and refuses new runs on an empty balance |
FOLDRUN_BASE_FEE_MONTHLY |
flat fee per account, accrued daily |
FOLDRUN_MARGIN |
tokens billed at cost × margin; BYOK exempt |
FOLDRUN_COMPUTE_USD_PER_CORE_SEC, FOLDRUN_COMPUTE_USD_PER_GIB_SEC |
what a step’s reservation costs while it holds it |
FOLDRUN_CPU_USD_PER_BUSY_SEC |
what a CPU-second actually burned costs |
FOLDRUN_COMPUTE_USD_PER_SEC |
a flat fallback for steps recorded before reservations existed |
FOLDRUN_STORAGE_USD_PER_GB_MONTH, FOLDRUN_NET_USD_PER_GB |
storage and network meters |
FOLDRUN_MIN_RUN_FEE, FOLDRUN_MAX_RUN_EXPOSURE |
the least a billable run charges; the balance held per unsettled run |
FOLDRUN_PLAN_WORKSPACES, FOLDRUN_PLAN_CONCURRENCY |
plan gates — beyond them, creation refuses (402) and runs wait |
FOLDRUN_RETENTION_DAYS |
finished runs older than this are pruned |
STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET |
the card |
Operations
| variable | |
|---|---|
FOLDRUN_METRICS_TOKEN |
the bearer a scraper presents to /api/metrics |
FOLDRUN_BACKUP_RECIPIENT |
an age public key the nightly backup seals the configuration to |
RESEND_API_KEY |
the email connection notifications and invites go through (an account secret) |