Configuration
This page highlights the key environment variables and deployment-mode differences for self-hosting.
Deployment Modes
Section titled “Deployment Modes”| Feature | SaaS | Enterprise |
|---|---|---|
| Org model | Personal org per user | Shared org for all users |
| Credits/Billing | Enabled (Stripe) | Disabled |
| URL pattern | /{username}/main | /{org_key}/{username} |
Mode settings
Section titled “Mode settings”# SaaS mode (default)DEPLOYMENT_MODE=saas
# Enterprise modeDEPLOYMENT_MODE=enterpriseENTERPRISE_ORG_NAME="Acme Corp"ENTERPRISE_ORG_KEY="acme"Environment Variables
Section titled “Environment Variables”Use platform/envs/local.example.env as the reference for the full list. The table below highlights the most important values for self-hosting.
| Variable | Description | Example |
|---|---|---|
ENVIRONMENT | Runtime environment name | local |
DEPLOYMENT_MODE | SaaS or enterprise mode | saas |
DATABASE_HOST | Postgres host | localhost |
DATABASE_PORT | Postgres port | 5432 |
DATABASE_NAME | Postgres database name | dreadnode |
DATABASE_USER | Postgres user | postgres |
DATABASE_PASSWORD | Postgres password | postgres |
CLICKHOUSE_USER | ClickHouse user | default |
CLICKHOUSE_DATABASE | ClickHouse database | app |
S3_AWS_ENDPOINT_URL | S3/MinIO endpoint | http://localhost:9000 |
S3_AWS_EXTERNAL_ENDPOINT_URL | Public S3/MinIO endpoint | http://localhost:9000 |
S3_AWS_ACCESS_KEY_ID | S3 access key | minioadmin |
S3_AWS_SECRET_ACCESS_KEY | S3 secret key | minioadmin |
PYTHON_PACKAGE_BUCKET_NAME | Bucket for packages | python-packages |
ORG_DATA_BUCKET_NAME | Bucket for org data | org-data |
USER_DATA_LOGS_BUCKET_NAME | Bucket for user logs | user-data-logs |
SECRET_KEY | App secret key | hex-32-bytes |
JWT_SECRET_KEY | JWT signing key | hex-32-bytes |
REFRESH_SECRET_KEY | Refresh token key | hex-32-bytes |
SECRETS_ENCRYPTION_KEY | Fernet key for secrets | base64-key |
SANDBOX_PROVIDER | Sandbox provider (docker or e2b) | docker |
LITELLM_ENABLED | Enable LiteLLM proxy | true |
LITELLM_INTERNAL_URL | Internal LiteLLM URL | http://localhost:4000 |
LITELLM_PUBLIC_URL | Public LiteLLM URL | http://host.docker.internal:4000/v1 |
STRIPE_PRICE_ID | Stripe price ID | price_... |
STRIPE_SECRET_KEY | Stripe API secret | sk_... |
STRIPE_WEBHOOK_SECRET | Stripe webhook secret | whsec_... |
Secrets management
Section titled “Secrets management”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.
Database migrations
Section titled “Database migrations”# Run pending migrationsjust 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.