Skip to main content
BullMQ is available as an npm package. You can install it using your preferred package manager.

Prerequisites

Before installing BullMQ, ensure you have:
  • Node.js 16.x or higher
  • Redis 6.2.0 or higher (Redis 7+ recommended)
BullMQ requires a Redis instance to function. Make sure you have Redis installed and running before using BullMQ.

Install BullMQ

Choose your preferred package manager:
The package includes TypeScript type definitions, so no additional @types package is needed.

Install Redis

If you don’t have Redis installed yet, you have several options:

Using Docker

The easiest way to get Redis running locally:

Using Docker Compose

Create a docker-compose.yml file:
Then run:
The maxmemory-policy noeviction setting is important to prevent Redis from automatically removing keys, which would cause unexpected errors in BullMQ.

System Package Manager

Cloud Redis Providers

For production environments, consider managed Redis services:
  • AWS - ElastiCache or MemoryDB
  • Google Cloud - Memorystore
  • Azure - Azure Cache for Redis
  • Upstash - Serverless Redis
  • Redis Cloud - Official Redis hosting

Redis Configuration

For optimal BullMQ performance, configure your Redis instance with these settings:
Important: Always set maxmemory-policy noeviction to avoid automatic removal of keys, which would cause unexpected errors in BullMQ.

Verify Installation

Create a simple test file to verify your installation:
test.ts
Run it:
If everything is installed correctly, you should see the success messages.

Alternative Redis Implementations

BullMQ is compatible with Redis-compatible databases:

Dragonfly

Dragonfly is a drop-in Redis replacement that offers:
  • Massive performance improvements by utilizing all CPU cores
  • More efficient memory usage
  • Full BullMQ compatibility

Valkey

Valkey is an open-source Redis fork that is fully compatible with BullMQ.

IoRedis Dependency

BullMQ uses ioredis as its Redis client. This is installed automatically as a dependency. You can also install it explicitly if you want to manage Redis connections yourself:

TypeScript Support

BullMQ is written in TypeScript and includes type definitions. For the best development experience:
  1. Use TypeScript 4.5 or higher
  2. Enable strict mode in your tsconfig.json
  3. Consider enabling esModuleInterop for easier imports
tsconfig.json

Next Steps

Quick Start

Create your first queue and worker

Architecture

Learn how BullMQ works internally