Guides
Complete reference of environment variables used to configure Strait.
This page documents all environment variables available for configuring Strait.
Required fields: DATABASE_URL, INTERNAL_SECRET, JWT_SIGNING_KEY, ENCRYPTION_KEY, and SECRET_ENCRYPTION_KEY.
All environment variables are managed via Doppler (project: strait, configs: dev / stg / prd). Use doppler run -- <cmd> to inject secrets locally, or see the Deployment Guide for production setup.
Variable Type Default Description DATABASE_URLString (Required) PostgreSQL connection string. REDIS_URLString - Redis connection string for pub/sub and CDC. MODEString allOperation mode: all, api, or worker. PORTInteger 8080Port the HTTP server listens on. INTERNAL_SECRETString (Required) Secret used for internal authentication between components. JWT_SIGNING_KEYString (Required) Key used to sign JWT run tokens. Must be at least 32 characters. LOG_LEVELString infoLogging verbosity: debug, info, warn, error. SECRET_ENCRYPTION_KEYString - Key used to encrypt job secrets. Required when using secret injection. ENCRYPTION_KEYString - Key used for data encryption at rest. Should be unique per environment. OTEL_EXPORTER_OTLP_ENDPOINTString - OpenTelemetry collector endpoint. UPSTASH_REDIS_REST_URLString - Upstash Redis REST API URL. UPSTASH_REDIS_REST_TOKENString - Upstash Redis REST API token.
Variable Type Default Description WORKER_CONCURRENCYInteger 10Number of concurrent jobs a worker can execute. WEBHOOK_TIMEOUTDuration 10sTimeout for webhook requests. WEBHOOK_IDLE_CONN_TIMEOUTDuration 60sIdle connection timeout for webhook client. EXECUTOR_HTTP_TIMEOUTDuration 5mTimeout for executor HTTP requests. EXECUTOR_IDLE_CONN_TIMEOUTDuration 90sIdle connection timeout for executor client. WEBHOOK_MAX_ATTEMPTSInteger 3Maximum number of attempts for webhook delivery. DEFAULT_JOB_MAX_ATTEMPTSInteger 3Default maximum retry attempts for jobs. DEFAULT_JOB_TIMEOUT_SECSInteger 300Default timeout for jobs in seconds. WORKER_QUEUE_SIZEInteger 0Bounded task queue size for the worker pool. When the queue is full, task submission blocks until a slot opens, providing backpressure. 0 means unbounded. WEBHOOK_DISPATCH_TIMEOUTDuration 15sTimeout for webhook dispatch requests.
Variable Type Default Description HEARTBEAT_INTERVALDuration 10sInterval for worker heartbeats. REAPER_INTERVALDuration 30sInterval for the stale run reaper process. STALE_THRESHOLDDuration 60sThreshold after which a run is considered stale. POLLER_INTERVALDuration 5sInterval for the job poller to check for new work. INDEX_MAINTENANCE_INTERVALDuration 24hInterval for partial index maintenance (REINDEX INDEX CONCURRENTLY). Set to 0 or negative to disable. REAPER_DELETE_BATCH_SIZEInteger 100Number of records to delete in a single reaper batch. LOG_DRAIN_WORKER_INTERVALDuration 60sInterval for the log drain delivery worker.
Variable Type Default Description DB_MAX_CONNSInteger 25Maximum number of open connections to the database. DB_MIN_CONNSInteger 5Minimum number of idle connections in the pool. DB_MAX_CONN_LIFETIMEDuration 30mMaximum amount of time a connection may be reused. DB_MAX_CONN_IDLE_TIMEDuration 5mMaximum amount of time a connection may be idle. DB_PGBOUNCER_MODEBoolean falseEnable PgBouncer-compatible connection handling. Disables features incompatible with connection poolers.
Variable Type Default Description RATE_LIMIT_REQUESTSInteger 100Number of requests allowed per window. RATE_LIMIT_WINDOWDuration 1mTime window for rate limiting. TRIGGER_RATE_LIMIT_REQUESTSInteger 10Number of trigger requests allowed per window. TRIGGER_RATE_LIMIT_WINDOWDuration 1mTime window for trigger rate limiting.
Variable Type Default Description REQUEST_TIMEOUTDuration 30sTimeout for incoming HTTP requests. MAX_REQUEST_BODY_SIZEInteger 1MBMaximum size of the request body in bytes. MAX_BULK_TRIGGER_ITEMSInteger 500Maximum number of items in a single bulk trigger request.
Variable Type Default Description SEQUIN_BASE_URLString - Base URL for the Sequin CDC service. SEQUIN_CONSUMER_NAMEString - Name of the Sequin consumer. SEQUIN_API_TOKENString - API token for Sequin authentication. SEQUIN_BATCH_SIZEInteger 10Number of events to fetch from Sequin in one batch. SEQUIN_WAIT_TIME_MSInteger 5000Wait time in milliseconds for Sequin long polling.
Variable Type Default Description CORS_ALLOWED_ORIGINSString List *Comma-separated list of allowed origins. CORS_ALLOW_CREDENTIALSBoolean falseWhether to allow credentials in CORS requests.
Variable Type Default Description OIDC_ENABLEDBoolean falseEnable OpenID Connect authentication. OIDC_ISSUERString - OIDC token issuer URL. OIDC_AUDIENCEString - Expected OIDC audience claim. OIDC_PUBLIC_KEY_PEMString - PEM-encoded public key for OIDC token verification.
Variable Type Default Description PERMISSION_CACHE_TTLDuration 5mTTL for the RBAC permission cache.
Variable Type Default Description CDC_BATCH_SIZEInteger 10Number of change events to process in a single batch. CDC_WAIT_TIME_MSInteger 5000Wait time in milliseconds for CDC long polling.
Variable Type Default Description RUN_RETENTION_SHORTDuration 30dShort-term retention period for job runs. RUN_RETENTION_LONGDuration 90dLong-term retention period for job runs. WORKFLOW_RUN_RETENTION_DAYSInteger 30Number of days to retain workflow run data. WORKFLOW_RETENTIONDuration 30dRetention period for workflow definitions. EVENT_TRIGGER_RETENTIONDuration 168h (7d)Retention period for terminal event triggers. Terminal triggers older than this are purged by the reaper. Set to 0 to disable automatic cleanup. EVENT_TRIGGER_RETENTION_DAYSInteger - Legacy alternative: retention in days (e.g., 90). Only used when EVENT_TRIGGER_RETENTION is not set.
Variable Type Default Description REDIS_SENTINEL_MASTERString - Name of the Redis Sentinel master. REDIS_SENTINEL_ADDRSString List - Comma-separated list of Redis Sentinel addresses.
Variable Type Default Description MAX_WORKFLOW_NESTING_DEPTHInteger 10Maximum allowed depth for nested workflows. WF_STALL_THRESHOLDDuration 15mMax time without workflow progression before run is considered stalled by reaper. WF_STALL_ACTIONString log_onlyAction when stalled run is detected: log_only, reconcile, or fail_workflow. WF_MAX_STEP_CAPInteger 0Maximum number of steps allowed in a single workflow. 0 means unlimited. WF_STEP_CONCURRENCY_LIMITInteger 0Maximum concurrent step executions per workflow run. 0 means unlimited. DEPENDENCY_STATUS_CACHE_TTLDuration 5sTTL for the job dependency status cache.
Variable Type Default Description SSE_KEEPALIVE_INTERVALDuration 15sInterval for sending keepalive events over SSE.
Variable Type Default Description WORKER_PARTITIONSString List - List of partitions this worker should handle. WORKER_PARTITION_WEIGHTSString - Weights for the configured partitions.
Variable Type Default Description ENCRYPTION_KEYString - Primary key used for data encryption. ENCRYPTION_KEY_OLDString List - List of previous encryption keys used for rotation.
Variable Type Default Description COMPUTE_RUNTIMEString noneContainer runtime for managed execution: none, fly, or docker. FLY_API_TOKENString - Fly Machines API token. Required when COMPUTE_RUNTIME=fly. FLY_APP_NAMEString - Fly app name for machine provisioning. Required when COMPUTE_RUNTIME=fly. FLY_REGIONString iadDefault Fly region for new machines. Overridden by job-level or run-level region hints. EXTERNAL_API_URLString - Public API URL injected into containers as STRAIT_API_URL for SDK callbacks. MAX_CONCURRENT_MACHINESInteger 10Maximum number of parallel managed containers across all jobs. WARM_POOL_ENABLEDBoolean falseEnable warm machine pool for faster cold starts. WARM_POOL_MAX_PER_JOBInteger 3Maximum warm machines per job/region combination. WARM_POOL_TTLDuration 5mTTL for idle warm machines before they are destroyed.
Variable Type Default Description WORKER_DRAIN_TIMEOUTDuration 30sMaximum time to wait for workers to finish in-flight jobs during shutdown.
Variable Type Default Description WEBHOOK_MAX_PAYLOAD_BYTESInteger 1MBMaximum size of webhook payloads in bytes.
Variable Type Default Description ADAPTIVE_CONCURRENCY_MINInteger 5Minimum concurrency level for adaptive scaling. ADAPTIVE_CONCURRENCY_MAXInteger 100Maximum concurrency level for adaptive scaling.
Was this page helpful? Yes No