Skip to main content
Bull requires Node.js and Redis to function. Follow these steps to get started.

Prerequisites

Before installing Bull, ensure you have:
  • Node.js version 12 or higher
  • Redis version 2.8.18 or higher
Bull requires Redis version 2.8.18 or higher. Earlier versions are not supported and may cause unexpected behavior.

Install Bull

1

Install the Bull package

Choose your preferred package manager to install Bull:
npm install bull --save
2

Install TypeScript definitions (optional)

If you’re using TypeScript, install the type definitions:
npm install @types/bull --save-dev
Type definitions are maintained in the DefinitelyTyped repository.
3

Set up Redis

Bull uses Redis as its datastore. Make sure Redis is installed and running:Install Redis:
  • macOS: brew install redis
  • Ubuntu/Debian: sudo apt-get install redis-server
  • Windows: Use WSL or Redis for Windows
Start Redis:
redis-server
Verify Redis is running:
redis-cli ping
# Should return: PONG
4

Verify installation

Create a simple test file to verify Bull is installed correctly:
test.js
const Queue = require('bull');

const testQueue = new Queue('test');

console.log('Bull is installed correctly!');
Run the test:
node test.js

Redis Connection Options

Bull supports multiple ways to connect to Redis:

Using a Redis URL

const Queue = require('bull');

const queue = new Queue('my-queue', 'redis://127.0.0.1:6379');

Using a configuration object

const Queue = require('bull');

const queue = new Queue('my-queue', {
  redis: {
    port: 6379,
    host: '127.0.0.1',
    password: 'foobared',
    db: 0
  }
});

Using default localhost connection

const Queue = require('bull');

// Connects to Redis at 127.0.0.1:6379 by default
const queue = new Queue('my-queue');
Bull uses ioredis under the hood, so you can pass any ioredis-compatible configuration options.

Next Steps

Quick Start Guide

Now that Bull is installed, create your first queue and start processing jobs

Build docs developers (and LLMs) love