Skip to content

Configuration

This page highlights the key environment variables and deployment-mode differences for self-hosting.

FeatureSaaSEnterprise
Org modelPersonal org per userShared org for all users
Credits/BillingEnabled (Stripe)Disabled
URL pattern/{username}/main/{org_key}/{username}

Client applications can read public config from GET /api/v1/config, including deployment_mode and website_url.

Terminal window
# SaaS mode (default)
DEPLOYMENT_MODE=saas
# Enterprise mode
DEPLOYMENT_MODE=enterprise
ENTERPRISE_ORG_NAME="Acme Corp"
ENTERPRISE_ORG_KEY="acme"

Use platform/envs/local.example.env as the reference for the full list. The table below highlights the most important values for self-hosting.

VariableDescriptionExample
ENVIRONMENTRuntime environment namelocal
DEPLOYMENT_MODESaaS or enterprise modesaas
WEBSITE_URLMarketing website URL used for install script linkshttps://dreadnode.io
DATABASE_HOSTPostgres hostlocalhost
DATABASE_PORTPostgres port5432
DATABASE_NAMEPostgres database namedreadnode
DATABASE_USERPostgres userpostgres
DATABASE_PASSWORDPostgres passwordpostgres
CLICKHOUSE_USERClickHouse userdefault
CLICKHOUSE_DATABASEClickHouse databaseapp
S3_AWS_ENDPOINT_URLS3/MinIO endpointhttp://localhost:9000
S3_AWS_EXTERNAL_ENDPOINT_URLPublic S3/MinIO endpointhttp://localhost:9000
S3_AWS_ACCESS_KEY_IDS3 access keyminioadmin
S3_AWS_SECRET_ACCESS_KEYS3 secret keyminioadmin
S3_AWS_DEFAULT_REGIONS3 regionus-east-1
PYTHON_PACKAGE_BUCKET_NAMEBucket for packagespython-packages
ORG_DATA_BUCKET_NAMEBucket for org dataorg-data
USER_DATA_LOGS_BUCKET_NAMEBucket for user logsuser-data-logs
USER_DATA_ROLE_ARNIAM role for user data uploadsarn:aws:iam::...:role/mock-role
SECRET_KEYApp secret keyhex-32-bytes
JWT_SECRET_KEYJWT signing keyhex-32-bytes
REFRESH_SECRET_KEYRefresh token keyhex-32-bytes
SECRETS_ENCRYPTION_KEYFernet key for secretsbase64-key
SANDBOX_PROVIDERSandbox provider (docker or e2b)docker
SANDBOX_CUSTOM_DOMAINCustom sandbox URL domainsandbox.dreadnode.io
MAX_CONCURRENT_SANDBOXES_PER_ORGMax concurrent running sandboxes per org3
MIN_SANDBOX_RUNTIME_SECONDSMinimum per-sandbox runtime allowance (seconds)60
E2B_WORLDS_TEMPLATE_ALIASE2B alias for Worlds backendsdn-worlds-dev
E2B_TRAINING_TEMPLATE_ALIASE2B alias for hosted training sandboxesdn-training-dev
E2B_OPTIMIZATION_TEMPLATE_ALIASE2B alias for hosted optimization sandboxesdn-optimization-dev
DOCKER_WORLDS_IMAGEDocker image for Worlds backendsworlds:latest
DOCKER_TRAINING_IMAGEDocker image for hosted training sandboxesdreadnode-training:latest
DOCKER_OPTIMIZATION_IMAGEDocker image for hosted optimization sandboxesdreadnode-optimization:latest
SANDBOX_SERVER_URLSandbox callback URLhttp://host.docker.internal:3000
WORLDS_IN_PROCESS_WORKER_ENABLEDRun queued Worlds jobs inside the API processtrue
TRAINING_IN_PROCESS_WORKER_ENABLEDRun queued Tinker training jobs inside the API processtrue
TRAINING_IN_PROCESS_WORKER_CONCURRENCYMax concurrent in-process training jobs1
TRAINING_IN_PROCESS_WORKER_POLL_INTERVAL_SECPoll interval for the in-process training worker2.0
TRAINING_IN_PROCESS_WORKER_LEASE_SECONDSLease duration for claimed training jobs3600
OPTIMIZATION_IN_PROCESS_WORKER_ENABLEDRun queued optimization jobs inside the API processtrue
OPTIMIZATION_IN_PROCESS_WORKER_CONCURRENCYMax concurrent in-process optimization jobs1
OPTIMIZATION_IN_PROCESS_WORKER_POLL_INTERVAL_SECPoll interval for the in-process optimization worker2.0
OPTIMIZATION_IN_PROCESS_WORKER_LEASE_SECONDSLease duration for claimed optimization jobs3600
TINKER_BASE_URLOverride hosted training Tinker URLhttps://tinker.example.com
TINKER_API_KEYAPI key injected into hosted training sandboxestml_...
TINKER_OPENAI_BASE_URLOpenAI-compatible Tinker URL for Worlds agent checkpointshttps://tinker.example.com/oai/api/v1
LITELLM_ENABLEDEnable LiteLLM proxytrue
LITELLM_INTERNAL_URLInternal LiteLLM URLhttp://localhost:4000
LITELLM_PUBLIC_URLPublic LiteLLM URLhttp://host.docker.internal:4000/v1
LITELLM_MASTER_KEYLiteLLM master API keysk-dev-master-key
LITELLM_TUI_KEY_DURATION_SECONDSTTL for TUI-provisioned LiteLLM keys (seconds)86400
LITELLM_CALLBACK_ENDPOINTLiteLLM usage callback URLhttp://api:8000/api/v1/internal/litellm/usage
LITELLM_CALLBACK_SECRETShared secret for LiteLLM callbackslocal-callback-secret
LITELLM_RECONCILIATION_INTERVAL_SECONDSPoll interval for spend logs (seconds)300
LITELLM_RECONCILIATION_LOOKBACK_SECONDSLookback window for spend logs (seconds)600
CORS_ORIGINSAllowed browser origins[...]
USE_DUCKDBUse DuckDB for tracesfalse
DUCKDB_PATHDuckDB file path./data/otel_traces.duckdb
RECAPTCHA_ENABLEDEnable reCAPTCHA for signupfalse
REQUIRE_EMAIL_VERIFICATIONRequire email verificationfalse
INFERENCE_CREDITS_PER_DOLLARCredits per $1 of inference cost1000
STRIPE_PRICE_IDStripe price ID (credits)price_...
STRIPE_SECRET_KEYStripe API secretsk_...
STRIPE_WEBHOOK_SECRETStripe webhook secretwhsec_...

Environment files live under platform/envs/. For local development, copy platform/envs/local.example.env to platform/envs/local.env, or run just setup to generate secrets automatically. Production secrets should be managed with the platform/bin/env tooling rather than editing encrypted files directly.

Terminal window
# Run pending migrations
just migrate
# Create a new migration (always autogenerate)
just migrate-new "add-field"

Never hand-write migration files — always use --autogenerate to keep the revision chain consistent.