Connection Management
Configure env-driven or DB-managed Redis connections and understand connection lifecycle operations.
Connection Sources
Durabull can source connections from two places.
Env-Driven Connections (DURABULL_ENV_CONNECTIONS=true)
Connections are defined through environment variables:
DURABULL_REDIS_URL_MAIN=redis://localhost:6379
DURABULL_ENV_CONNECTIONS=true
DURABULL_REDIS_URL_MAIN_ENVIRONMENT=development
DURABULL_REDIS_URL_MAIN_PREFIX=bull
DURABULL_REDIS_URL_MAIN_ALLOW_SELF_SIGNED_CERTS=false
DURABULL_REDIS_URL_WORKERS=redis://localhost:6380
DURABULL_REDIS_URL_WORKERS_ENVIRONMENT=staging
DURABULL_REDIS_URL_DEFAULT=MAINBehavior:
- Connections are synchronized into org scope.
- Connection create/edit/delete endpoints return
403. - Restart the API after changing environment variables; connection definitions are cached per process.
- Connection names use uppercase letters, digits, and underscores, beginning with a letter (for example
MAINorPROD_EAST). _PREFIXdefaults tobull; it must match theprefixoption used by your BullMQ queues and workers.
DB-Managed Connections (DURABULL_ENV_CONNECTIONS=false)
Connections are managed in UI/API:
- Create connection
- Test connection
- Edit name, URL, environment, default selection, BullMQ prefix, and TLS options
- Delete with guardrails
Connection Validation and Safety
When creating/testing a connection URL:
- URLs must use
redis://orrediss://. Private and internal hosts are allowed so Durabull can reach your infrastructure; URL validation is not a network isolation boundary. - Connection test endpoint is rate-limited.
- Production error messages are sanitized.
- Redis connection URLs are encrypted at rest in the
redis_connectiontable, including environment-managed connections. SetDURABULL_REDIS_URL_ENCRYPTION_KEYin either connection mode.
Default Connection Rules
- The selected default is used as the organization-level routing fallback.
- In environment mode,
DURABULL_REDIS_URL_DEFAULTselects the connection key. If it is unset or invalid, the first valid key in alphabetical order becomes the default. - In database-managed mode, deleting a default connection promotes another remaining connection.
- The API permits deleting the last connection. Add another connection to resume queue operations. Deleting a connection removes its Durabull configuration, not its Redis database.
UI Behavior
Connections are grouped and shown by environment:
- Development
- Staging
- Production
From connection selector:
- Switching connection updates route context to
/$orgSlug/c/$connectionId.
Need help adding a connection or resolving test failures? See Connection Troubleshooting.