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).
Required (API server)
Section titled “Required (API server)”| Variable | Description |
|---|---|
DATABASE_URL | PostgreSQL connection string — connect via PgBouncer, not Postgres directly (e.g. postgresql://unqueue:password@pgbouncer:5432/unqueue) |
BETTER_AUTH_SECRET | Random secret for session signing — generate with openssl rand -base64 32 (minimum 32 characters) |
BETTER_AUTH_URL | Public URL of the API server (e.g. https://api.your-domain.com) |
PLATFORM_URL | Public URL of the platform UI (e.g. https://app.your-domain.com) — used for CORS and email links |
ENCRYPTION_KEYS | JSON array of encryption keys for stored Redis credentials — see below |
REDIS_URL is optional on the server but recommended in production for discovery caching.
Required (platform build)
Section titled “Required (platform build)”These are baked into the platform Docker image at build time:
| Variable | Description |
|---|---|
VITE_API_URL | Public 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. |
Optional (API server)
Section titled “Optional (API server)”| Variable | Default | Description |
|---|---|---|
REDIS_URL | — | Redis URL for unqueue’s internal services (discovery cache). Separate from Redis instances you monitor in the dashboard |
PORT | 3001 | Port the API server listens on |
NODE_ENV | development | development, production, or test |
LOG_LEVEL | debug (dev) / info (prod) | Log verbosity — debug, info, warn, or error |
COOKIE_DOMAIN | — | Parent domain for auth cookies across subdomains (e.g. .your-domain.com) |
SMTP_HOST | — | SMTP server hostname for transactional email |
SMTP_PORT | 587 | SMTP port |
SMTP_USER | — | SMTP username |
SMTP_PASS | — | SMTP password |
SMTP_FROM | — | From address for outgoing email (e.g. [email protected]) |
Encryption keys
Section titled “Encryption keys”Redis connection credentials are encrypted at rest using ENCRYPTION_KEYS. Generate a key:
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.
Redis URL format
Section titled “Redis URL format”The REDIS_URL variable (for unqueue’s internal services) accepts standard Redis URL syntax:
This is separate from the Redis instances you add inside the unqueue dashboard for BullMQ monitoring. See Connecting Redis for monitored instance setup.
Local development defaults
Section titled “Local development defaults”When running pnpm dev locally:
| Service | URL |
|---|---|
| Platform | http://localhost:5174 |
| API | http://localhost:3001 |
Leave VITE_API_URL empty — the platform calls the API at http://localhost:3001 directly in dev mode.