Strait Docs
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.

Core Configuration

VariableTypeDefaultDescription
DATABASE_URLString(Required)PostgreSQL connection string.
REDIS_URLString-Redis connection string for pub/sub and CDC.
MODEStringallOperation mode: all, api, or worker.
PORTInteger8080Port 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_LEVELStringinfoLogging 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.

Worker Configuration

VariableTypeDefaultDescription
WORKER_CONCURRENCYInteger10Number of concurrent jobs a worker can execute.
WEBHOOK_TIMEOUTDuration10sTimeout for webhook requests.
WEBHOOK_IDLE_CONN_TIMEOUTDuration60sIdle connection timeout for webhook client.
EXECUTOR_HTTP_TIMEOUTDuration5mTimeout for executor HTTP requests.
EXECUTOR_IDLE_CONN_TIMEOUTDuration90sIdle connection timeout for executor client.
WEBHOOK_MAX_ATTEMPTSInteger3Maximum number of attempts for webhook delivery.
DEFAULT_JOB_MAX_ATTEMPTSInteger3Default maximum retry attempts for jobs.
DEFAULT_JOB_TIMEOUT_SECSInteger300Default timeout for jobs in seconds.
WORKER_QUEUE_SIZEInteger0Bounded 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_TIMEOUTDuration15sTimeout for webhook dispatch requests.

Scheduler Configuration

VariableTypeDefaultDescription
HEARTBEAT_INTERVALDuration10sInterval for worker heartbeats.
REAPER_INTERVALDuration30sInterval for the stale run reaper process.
STALE_THRESHOLDDuration60sThreshold after which a run is considered stale.
POLLER_INTERVALDuration5sInterval for the job poller to check for new work.
INDEX_MAINTENANCE_INTERVALDuration24hInterval for partial index maintenance (REINDEX INDEX CONCURRENTLY). Set to 0 or negative to disable.
REAPER_DELETE_BATCH_SIZEInteger100Number of records to delete in a single reaper batch.
LOG_DRAIN_WORKER_INTERVALDuration60sInterval for the log drain delivery worker.

Database Pool

VariableTypeDefaultDescription
DB_MAX_CONNSInteger25Maximum number of open connections to the database.
DB_MIN_CONNSInteger5Minimum number of idle connections in the pool.
DB_MAX_CONN_LIFETIMEDuration30mMaximum amount of time a connection may be reused.
DB_MAX_CONN_IDLE_TIMEDuration5mMaximum amount of time a connection may be idle.
DB_PGBOUNCER_MODEBooleanfalseEnable PgBouncer-compatible connection handling. Disables features incompatible with connection poolers.

Rate Limiting

VariableTypeDefaultDescription
RATE_LIMIT_REQUESTSInteger100Number of requests allowed per window.
RATE_LIMIT_WINDOWDuration1mTime window for rate limiting.
TRIGGER_RATE_LIMIT_REQUESTSInteger10Number of trigger requests allowed per window.
TRIGGER_RATE_LIMIT_WINDOWDuration1mTime window for trigger rate limiting.

Request Configuration

VariableTypeDefaultDescription
REQUEST_TIMEOUTDuration30sTimeout for incoming HTTP requests.
MAX_REQUEST_BODY_SIZEInteger1MBMaximum size of the request body in bytes.
MAX_BULK_TRIGGER_ITEMSInteger500Maximum number of items in a single bulk trigger request.

Sequin CDC

VariableTypeDefaultDescription
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_SIZEInteger10Number of events to fetch from Sequin in one batch.
SEQUIN_WAIT_TIME_MSInteger5000Wait time in milliseconds for Sequin long polling.

CORS Configuration

VariableTypeDefaultDescription
CORS_ALLOWED_ORIGINSString List*Comma-separated list of allowed origins.
CORS_ALLOW_CREDENTIALSBooleanfalseWhether to allow credentials in CORS requests.

OIDC Configuration

VariableTypeDefaultDescription
OIDC_ENABLEDBooleanfalseEnable 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.

RBAC Configuration

VariableTypeDefaultDescription
PERMISSION_CACHE_TTLDuration5mTTL for the RBAC permission cache.

CDC Configuration

VariableTypeDefaultDescription
CDC_BATCH_SIZEInteger10Number of change events to process in a single batch.
CDC_WAIT_TIME_MSInteger5000Wait time in milliseconds for CDC long polling.

Retention Configuration

VariableTypeDefaultDescription
RUN_RETENTION_SHORTDuration30dShort-term retention period for job runs.
RUN_RETENTION_LONGDuration90dLong-term retention period for job runs.
WORKFLOW_RUN_RETENTION_DAYSInteger30Number of days to retain workflow run data.
WORKFLOW_RETENTIONDuration30dRetention period for workflow definitions.
EVENT_TRIGGER_RETENTIONDuration168h (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.

Redis Sentinel

VariableTypeDefaultDescription
REDIS_SENTINEL_MASTERString-Name of the Redis Sentinel master.
REDIS_SENTINEL_ADDRSString List-Comma-separated list of Redis Sentinel addresses.

Workflow Configuration

VariableTypeDefaultDescription
MAX_WORKFLOW_NESTING_DEPTHInteger10Maximum allowed depth for nested workflows.
WF_STALL_THRESHOLDDuration15mMax time without workflow progression before run is considered stalled by reaper.
WF_STALL_ACTIONStringlog_onlyAction when stalled run is detected: log_only, reconcile, or fail_workflow.
WF_MAX_STEP_CAPInteger0Maximum number of steps allowed in a single workflow. 0 means unlimited.
WF_STEP_CONCURRENCY_LIMITInteger0Maximum concurrent step executions per workflow run. 0 means unlimited.
DEPENDENCY_STATUS_CACHE_TTLDuration5sTTL for the job dependency status cache.

SSE Configuration

VariableTypeDefaultDescription
SSE_KEEPALIVE_INTERVALDuration15sInterval for sending keepalive events over SSE.

Worker Partitions

VariableTypeDefaultDescription
WORKER_PARTITIONSString List-List of partitions this worker should handle.
WORKER_PARTITION_WEIGHTSString-Weights for the configured partitions.

Encryption

VariableTypeDefaultDescription
ENCRYPTION_KEYString-Primary key used for data encryption.
ENCRYPTION_KEY_OLDString List-List of previous encryption keys used for rotation.

Managed Execution (Fly Machines)

VariableTypeDefaultDescription
COMPUTE_RUNTIMEStringnoneContainer 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_REGIONStringiadDefault 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_MACHINESInteger10Maximum number of parallel managed containers across all jobs.
WARM_POOL_ENABLEDBooleanfalseEnable warm machine pool for faster cold starts.
WARM_POOL_MAX_PER_JOBInteger3Maximum warm machines per job/region combination.
WARM_POOL_TTLDuration5mTTL for idle warm machines before they are destroyed.

Shutdown

VariableTypeDefaultDescription
WORKER_DRAIN_TIMEOUTDuration30sMaximum time to wait for workers to finish in-flight jobs during shutdown.

Webhook Delivery

VariableTypeDefaultDescription
WEBHOOK_MAX_PAYLOAD_BYTESInteger1MBMaximum size of webhook payloads in bytes.

Adaptive Concurrency

VariableTypeDefaultDescription
ADAPTIVE_CONCURRENCY_MINInteger5Minimum concurrency level for adaptive scaling.
ADAPTIVE_CONCURRENCY_MAXInteger100Maximum concurrency level for adaptive scaling.
Was this page helpful?

On this page