Skip to content

Configuration

All server configuration is done via environment variables. Copy .env.example to .env for local Docker Compose, or manage secrets through Doppler for development and production deploys.

Infrastructure variables for Postgres, PgBouncer, and Redis are in .env.infra.example (used by docker-compose.infra.yml).

VariableDescription
DATABASE_URLPostgreSQL connection string — connect via PgBouncer, not Postgres directly (e.g. postgresql://unqueue:password@pgbouncer:5432/unqueue)
BETTER_AUTH_SECRETRandom secret for session signing — generate with openssl rand -base64 32 (minimum 32 characters)
BETTER_AUTH_URLPublic URL of the API server (e.g. https://api.your-domain.com)
PLATFORM_URLPublic URL of the platform UI (e.g. https://app.your-domain.com) — used for CORS and email links
ENCRYPTION_KEYSJSON array of encryption keys for stored Redis credentials — see below

REDIS_URL is optional on the server but recommended in production for discovery caching.

These are baked into the platform Docker image at build time:

VariableDescription
VITE_API_URLPublic URL of the API server (e.g. https://api.your-domain.com). Required for production builds. Leave empty for local dev — the platform defaults to http://localhost:3001.
VariableDefaultDescription
REDIS_URLRedis URL for unqueue’s internal services (discovery cache). Separate from Redis instances you monitor in the dashboard
PORT3001Port the API server listens on
NODE_ENVdevelopmentdevelopment, production, or test
LOG_LEVELdebug (dev) / info (prod)Log verbosity — debug, info, warn, or error
COOKIE_DOMAINParent domain for auth cookies across subdomains (e.g. .your-domain.com)
SMTP_HOSTSMTP server hostname for transactional email
SMTP_PORT587SMTP port
SMTP_USERSMTP username
SMTP_PASSSMTP password
SMTP_FROMFrom address for outgoing email (e.g. [email protected])

Redis connection credentials are encrypted at rest using ENCRYPTION_KEYS. Generate a key:

node -e "console.log(JSON.stringify([{keyId:1,key:require('crypto').randomBytes(32).toString('base64')}]))"

Set the output as the ENCRYPTION_KEYS environment variable. The highest keyId is used for new encryptions; older keys remain valid for decryption during rotation.

Email is used for sign-up verification and password reset. If SMTP is not configured, unqueue logs email content to the console instead — useful for local development.

SMTP_HOST=smtp.postmarkapp.com
SMTP_PORT=587
SMTP_USER=your-api-token
SMTP_PASS=your-api-token
SMTP_FROM=[email protected]

The REDIS_URL variable (for unqueue’s internal services) accepts standard Redis URL syntax:

# Plain
REDIS_URL=redis://localhost:6379

# With password
REDIS_URL=redis://:password@localhost:6379

# With TLS
REDIS_URL=rediss://user:[email protected]:6380/0

This is separate from the Redis instances you add inside the unqueue dashboard for BullMQ monitoring. See Connecting Redis for monitored instance setup.

When running pnpm dev locally:

ServiceURL
Platformhttp://localhost:5174
APIhttp://localhost:3001

Leave VITE_API_URL empty — the platform calls the API at http://localhost:3001 directly in dev mode.