ReferenceEnvironment Variables

Environment Variables

All Datafly Signal services are configured via environment variables. This page lists the variables you need to configure for your deployment.

Security

These variables must be set for all services in your deployment.

VariableRequiredDescription
JWT_SECRETYesSecret key for signing and verifying authentication tokens. Must be cryptographically random. All services must share the same value.
ENCRYPTION_KEYYesEncryption key for securing stored credentials and identity tokens. Must be cryptographically random.
LOG_LEVELNoLog level: debug, info, warn, error. Default: info
⚠️

JWT_SECRET and ENCRYPTION_KEY have no defaults and must be explicitly set. Use cryptographically random values and store them in a secrets manager.

Ingestion Gateway

VariableDefaultRequiredDescription
COOKIE_DOMAINNoDomain for the _dfid and _dfdid cookies (e.g., .example.com). If unset, uses the request host
CORS_ORIGINS*NoComma-separated list of allowed origins for CORS. Use * for development only
MAX_BATCH_SIZE500NoMaximum number of events in a single batch request
MAX_PAYLOAD_SIZE524288NoMaximum request body size in bytes (default 512 KB)
RATE_LIMIT_RPS1000NoMaximum requests per second per pipeline key

In production, always set CORS_ORIGINS to the specific domains that should be allowed to send events. Using * disables CORS protection.

Event Processor

VariableDefaultRequiredDescription
PROCESSING_WORKERS4NoNumber of concurrent event processing workers

Delivery Workers

VariableDefaultRequiredDescription
RETRY_MAX_ATTEMPTS5NoMaximum number of retry attempts for failed deliveries
RETRY_BACKOFF_BASE4NoBase for exponential backoff in seconds
RATE_LIMIT_PER_SECOND100NoDefault rate limit for vendor API requests (per integration)

Management API

VariableDefaultRequiredDescription
ACCESS_TOKEN_TTL900NoAccess token time-to-live in seconds (default 15 minutes)
REFRESH_TOKEN_TTL604800NoRefresh token time-to-live in seconds (default 7 days)
RATE_LIMIT_PER_MINUTE100NoAPI rate limit per authenticated user per minute
LOGIN_MAX_ATTEMPTS5NoMaximum consecutive failed login attempts before account lockout
LOGIN_LOCKOUT_DURATION900NoAccount lockout duration in seconds after max failed attempts

Management UI

The Management UI is a Next.js application with its own environment variables:

VariableDefaultRequiredDescription
NEXT_PUBLIC_API_URLhttp://localhost:8084YesManagement API URL (used by the browser)
NEXT_PUBLIC_WS_URLws://localhost:8084NoWebSocket URL for real-time event debugger
⚠️

Never commit .env files containing secrets to version control. Store all sensitive configuration in a secrets manager.