### Run Express Auth Example Source: https://felixmosh.github.io/bull-board/recipes/basic-auth Commands to clone the repository, install dependencies, and start the Express authentication example server. ```sh git clone https://github.com/felixmosh/bull-board cd bull-board/examples/with-express-auth npm install && npm start # http://localhost:3000/ui (login: bull / board) ``` -------------------------------- ### Set up BullMQ with PostgreSQL backend and bull-board Source: https://felixmosh.github.io/bull-board/recipes/postgres-backend Install pg alongside BullMQ v6 and pass createPostgresBackend as the third argument to Queue. The rest of the bull-board setup is identical to Redis. ioredis is optional for Postgres-only apps. ```javascript const express = require('express'); const { Queue, createPostgresBackend } = require('bullmq'); const { createBullBoard } = require('@bull-board/api'); const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter'); const { ExpressAdapter } = require('@bull-board/express'); const connection = 'postgres://user:password@localhost:5432/bullmq'; const emails = new Queue('emails', { connection }, createPostgresBackend); const serverAdapter = new ExpressAdapter(); serverAdapter.setBasePath('/admin/queues'); createBullBoard({ queues: [new BullMQAdapter(emails)], serverAdapter, }); const app = express(); app.use('/admin/queues', serverAdapter.getRouter()); app.listen(3000); ``` -------------------------------- ### Install @bull-board/bun and @bull-board/api Source: https://felixmosh.github.io/bull-board/server-adapters/bun Run `bun add` to install the required Bull Board packages: `@bull-board/api`, `@bull-board/bun`, and the BullMQ adapter `@bull-board/api/bullMQAdapter`. ```shell bun add @bull-board/api @bull-board/bun ``` -------------------------------- ### Install Metrics Package Source: https://felixmosh.github.io/bull-board/recipes/historical-metrics Install the @bull-board/metrics package using yarn. ```bash yarn add @bull-board/metrics ``` -------------------------------- ### MetricsRecorder Cluster Configuration Examples Source: https://felixmosh.github.io/bull-board/recipes/historical-metrics Examples showing how to initialize MetricsRecorder with a cluster connection, demonstrating how different prefix configurations affect the resulting hash tag. ```ts new MetricsRecorder({ queues, connection: cluster }); // {bull-board:metrics} new MetricsRecorder({ queues, connection: cluster, prefix: 'staging' }); // {staging} new MetricsRecorder({ queues, connection: cluster, prefix: '{eu}:metrics' }); // {eu}:metrics ``` -------------------------------- ### Install @bull-board/api and @bull-board/hapi Source: https://felixmosh.github.io/bull-board/server-adapters/hapi Install the required Bull Board packages for Hapi integration. ```sh npm install @bull-board/api @bull-board/hapi ``` -------------------------------- ### Install @bull-board/elysia dependencies Source: https://felixmosh.github.io/bull-board/server-adapters/elysia Install the required Bull Board API and Elysia adapter packages using Bun. ```sh bun add @bull-board/api @bull-board/elysia ``` -------------------------------- ### Install @bull-board/api and @bull-board/fastify Source: https://felixmosh.github.io/bull-board/server-adapters/fastify Install the Bull Board API and Fastify adapter packages via npm. ```sh npm install @bull-board/api @bull-board/fastify ``` -------------------------------- ### Install bull-board dependencies Source: https://felixmosh.github.io/bull-board/server-adapters/nestjs Install the core API and NestJS module packages. ```sh npm install @bull-board/api @bull-board/nestjs ``` -------------------------------- ### Install Bull Board packages Source: https://felixmosh.github.io/bull-board/queue-adapters/bullmq-pro Install the necessary Bull Board API and Express adapter packages. ```sh npm install @bull-board/api @bull-board/express ``` -------------------------------- ### Install HTTP platform adapter Source: https://felixmosh.github.io/bull-board/server-adapters/nestjs Install the adapter corresponding to your NestJS HTTP platform (Express or Fastify). ```sh npm install @bull-board/express # or, for Fastify: npm install @bull-board/fastify ``` -------------------------------- ### Configure UIConfig with createBullBoard Source: https://felixmosh.github.io/bull-board/configuration/ui-config Example of initializing the dashboard with custom UI settings including a title, logo, and miscellaneous links. ```ts import { createBullBoard } from '@bull-board/api'; import { BullMQAdapter } from '@bull-board/api/bullMQAdapter'; import { ExpressAdapter } from '@bull-board/express'; const serverAdapter = new ExpressAdapter(); serverAdapter.setBasePath('/admin/queues'); createBullBoard({ queues: [new BullMQAdapter(emailQueue)], serverAdapter, options: { uiConfig: { boardTitle: 'My Queues', boardLogo: { path: 'https://cdn.example.com/logo.png', width: '120px', height: 32, }, miscLinks: [{ text: 'Logout', url: '/logout', icon: '/static/logout.svg' }], hideRedisDetails: true, showMetrics: true, hideDocsLink: false, }, }, }); ``` -------------------------------- ### bull-board.config.js example Source: https://felixmosh.github.io/bull-board/guide/cli Example config file showing redis connection URL, prefix, scanInterval, uiConfig, and per-queue readOnlyMode. The redis field can also be an ioredis options object. The queues object sets per-queue QueueAdapterOptions overrides, and a queue's own readOnlyMode always wins unless --read-only is set globally. ```javascript // bull-board.config.js module.exports = { redis: 'redis://localhost:6379', prefix: ['bull', 'tenant-a'], scanInterval: 15, uiConfig: { boardTitle: 'Ops Dashboard', hideDocsLink: true, }, queues: { 'payment-webhooks': { readOnlyMode: true }, }, }; ``` -------------------------------- ### Enable historical metrics via CLI and Docker Source: https://felixmosh.github.io/bull-board/recipes/historical-metrics Commands to start the Bull Board CLI or Docker container with the --history flag to register the provider and start the recorder. ```sh npx @bull-board/cli --redis redis://localhost:6379 --history docker run --rm -p 127.0.0.1:3000:3000 ghcr.io/felixmosh/bull-board \ --redis redis://redis:6379 --history ``` -------------------------------- ### Setup Bull Board with Koa Source: https://felixmosh.github.io/bull-board/server-adapters/koa Initialize a BullMQ queue, create a Koa application, and register the Bull Board plugin with the Koa adapter. ```ts import { createBullBoard } from '@bull-board/api'; import { BullMQAdapter } from '@bull-board/api/bullMQAdapter'; import { KoaAdapter } from '@bull-board/koa'; import { Queue } from 'bullmq'; import Koa from 'koa'; const queue = new Queue('my-queue', { connection: { host: 'localhost', port: 6379 }, }); const app = new Koa(); const serverAdapter = new KoaAdapter(); createBullBoard({ queues: [new BullMQAdapter(queue)], serverAdapter, }); serverAdapter.setBasePath('/ui'); app.use(serverAdapter.registerPlugin()); app.listen(3000); ``` -------------------------------- ### Install Bull Board Koa dependencies Source: https://felixmosh.github.io/bull-board/server-adapters/koa Install the required Bull Board API and Koa adapter packages via npm. ```sh npm install @bull-board/api @bull-board/koa ``` -------------------------------- ### Install Bull Board Hono dependencies Source: https://felixmosh.github.io/bull-board/server-adapters/hono Install the required packages for using Bull Board with Hono. The @hono/node-server package is only needed for Node.js; on Bun, Deno, or Workers, you bring your own serve function. ```sh npm install @bull-board/api @bull-board/hono @hono/node-server ``` -------------------------------- ### Run Bull Board with environment variables Source: https://felixmosh.github.io/bull-board/guide/docker Example of running the Bull Board container using CLI flags and environment variables for configuration. ```sh docker run --rm -p 127.0.0.1:3000:3000 \ -e BULL_BOARD_REDIS_URL=redis://redis:6379 \ -e BULL_BOARD_PREFIX=bull,tenant-a \ -e BULL_BOARD_READ_ONLY=true \ -e BULL_BOARD_BOARD_TITLE='Ops Dashboard' \ ghcr.io/felixmosh/bull-board ``` -------------------------------- ### Set up Bull Board with FastifyAdapter Source: https://felixmosh.github.io/bull-board/server-adapters/fastify Create a BullMQ queue, initialize the FastifyAdapter, register the plugin with a prefix, and start the Fastify server. The adapter takes the base path from setBasePath() or the prefix option; if both are set, they must match or asset URLs will 404. Top-level await is used, so wrap in an async function for CommonJS. ```ts import { createBullBoard } from '@bull-board/api'; import { BullMQAdapter } from '@bull-board/api/bullMQAdapter'; import { FastifyAdapter } from '@bull-board/fastify'; import { Queue } from 'bullmq'; import Fastify from 'fastify'; const queue = new Queue('my-queue', { connection: { host: 'localhost', port: 6379 }, }); const app = Fastify(); const serverAdapter = new FastifyAdapter(); createBullBoard({ queues: [new BullMQAdapter(queue)], serverAdapter, }); serverAdapter.setBasePath('/ui'); await app.register(serverAdapter.registerPlugin(), { prefix: '/ui' }); await app.listen({ host: '0.0.0.0', port: 3000 }); ``` -------------------------------- ### Set up Bull Board with HonoAdapter Source: https://felixmosh.github.io/bull-board/server-adapters/hono Create a Hono app, instantiate HonoAdapter with the runtime's serveStatic helper, register the Bull Board plugin at a base path, and serve the app. The serve and serveStatic functions depend on the runtime; this example uses Node.js. ```ts import { createBullBoard } from '@bull-board/api'; import { BullMQAdapter } from '@bull-board/api/bullMQAdapter'; import { HonoAdapter } from '@bull-board/hono'; import { Queue } from 'bullmq'; import { Hono } from 'hono'; import { serve } from '@hono/node-server'; import { serveStatic } from '@hono/node-server/serve-static'; const queue = new Queue('my-queue', { connection: { host: 'localhost', port: 6379 }, }); const app = new Hono(); const serverAdapter = new HonoAdapter(serveStatic); createBullBoard({ queues: [new BullMQAdapter(queue)], serverAdapter, }); const basePath = '/ui'; serverAdapter.setBasePath(basePath); app.route(basePath, serverAdapter.registerPlugin()); serve({ fetch: app.fetch, port: 3000 }); ``` -------------------------------- ### Set up Bull Board with HapiAdapter Source: https://felixmosh.github.io/bull-board/server-adapters/hapi Create a BullMQ queue, configure the HapiAdapter, and register it as a Hapi plugin. The routes.prefix must match the base path. ```ts import { createBullBoard } from '@bull-board/api'; import { BullMQAdapter } from '@bull-board/api/bullMQAdapter'; import { HapiAdapter } from '@bull-board/hapi'; import { Queue } from 'bullmq'; import Hapi from '@hapi/hapi'; const queue = new Queue('my-queue', { connection: { host: 'localhost', port: 6379 }, }); const app = Hapi.server({ port: 3000, host: 'localhost' }); const serverAdapter = new HapiAdapter(); createBullBoard({ queues: [new BullMQAdapter(queue)], serverAdapter, }); serverAdapter.setBasePath('/ui'); await app.register(serverAdapter.registerPlugin(), { routes: { prefix: '/ui' }, }); await app.start(); ``` -------------------------------- ### Install @bull-board/h3 dependencies Source: https://felixmosh.github.io/bull-board/server-adapters/h3 Install the required packages for using Bull Board with H3. ```sh npm install @bull-board/api @bull-board/h3 ``` -------------------------------- ### Set up Bull Board with H3Adapter Source: https://felixmosh.github.io/bull-board/server-adapters/h3 Create a BullMQ queue, configure the H3Adapter with a base path, register it with createBullBoard, and mount the adapter's handler on an H3 app. ```ts import { createApp, createRouter } from 'h3'; import { createBullBoard } from '@bull-board/api'; import { BullMQAdapter } from '@bull-board/api/bullMQAdapter'; import { H3Adapter } from '@bull-board/h3'; import { Queue } from 'bullmq'; const queue = new Queue('my-queue', { connection: { host: 'localhost', port: 6379 }, }); const serverAdapter = new H3Adapter(); serverAdapter.setBasePath('/ui'); createBullBoard({ queues: [new BullMQAdapter(queue)], serverAdapter, }); export const app = createApp(); const router = createRouter(); app.use(router); app.use(serverAdapter.registerHandlers()); ``` -------------------------------- ### Configure BunAdapter with BullMQ and Bun.serve Source: https://felixmosh.github.io/bull-board/server-adapters/bun Creates a BullMQ queue with a Redis connection, initializes a `BunAdapter` at `/ui`, registers the queue, and spreads `getRoutes()` into `Bun.serve` routes. The `BunAdapter` provides the Bull Board routes as an object for Bun's native server. ```ts import { createBullBoard } from '@bull-board/api'; import { BullMQAdapter } from '@bull-board/api/bullMQAdapter'; import { BunAdapter } from '@bull-board/bun'; import { Queue } from 'bullmq'; const queue = new Queue('my-queue', { connection: { host: 'localhost', port: 6379 }, }); const serverAdapter = new BunAdapter(); serverAdapter.setBasePath('/ui'); createBullBoard({ queues: [new BullMQAdapter(queue)], serverAdapter, }); const bullBoardRoutes = serverAdapter.getRoutes(); Bun.serve({ port: 3000, routes: { '/health': { GET: () => Response.json({ status: 'ok' }) }, ...bullBoardRoutes, }, }); ``` -------------------------------- ### Configure BullMQProAdapter Source: https://felixmosh.github.io/bull-board/queue-adapters/bullmq-pro Initialize the BullMQProAdapter and add it to the Bull Board configuration. ```js const { QueuePro } = require('@taskforcesh/bullmq-pro'); const { createBullBoard } = require('@bull-board/api'); const { BullMQProAdapter } = require('@bull-board/api/bullMQProAdapter'); const { ExpressAdapter } = require('@bull-board/express'); const queuePro = new QueuePro('queueProName'); const serverAdapter = new ExpressAdapter(); serverAdapter.setBasePath('/admin/queues'); createBullBoard({ queues: [new BullMQProAdapter(queuePro)], serverAdapter, }); ``` -------------------------------- ### Create multiple Bull Board instances with separate adapters Source: https://felixmosh.github.io/bull-board/recipes/multiple-dashboards Set up two dashboards at /instance1 and /instance2 by creating independent ExpressAdapter instances and createBullBoard instances for different queues. Use setBasePath on each adapter before mounting its router with app.use(). Each adapter can be configured separately with a different UIConfig, such as boardTitle, boardLogo, or environment badge. ```javascript const serverAdapter1 = new ExpressAdapter(); const serverAdapter2 = new ExpressAdapter(); createBullBoard({ queues: [new BullMQAdapter(queueA)], serverAdapter: serverAdapter1, }); createBullBoard({ queues: [new BullMQAdapter(queueB)], serverAdapter: serverAdapter2, }); serverAdapter1.setBasePath('/instance1'); serverAdapter2.setBasePath('/instance2'); app.use('/instance1', serverAdapter1.getRouter()); app.use('/instance2', serverAdapter2.getRouter()); ``` -------------------------------- ### GET /api/redis/stats Source: https://felixmosh.github.io/bull-board/api Reads the datastore statistics of the board's first queue. ```APIDOC ## GET /api/redis/stats ### Description Reads the datastore statistics of the board's first queue. ### Method GET ### Endpoint /api/redis/stats ### Response #### Success Response (200) - **stats** (object) - Datastore statistics. ``` -------------------------------- ### GET /redis/stats Source: https://felixmosh.github.io/bull-board/openapi.json Retrieves Redis statistics. The response can be a RedisStats object or an empty object. ```APIDOC ## GET /redis/stats ### Description Retrieves Redis statistics. ### Method GET ### Endpoint /redis/stats ### Response #### Success Response (200) - **RedisStats** (object) - The Redis statistics. #### Response Example { "redisVersion": "6.0.0", "usedMemory": 123456 } ``` -------------------------------- ### GET /api/queues Source: https://felixmosh.github.io/bull-board/reference/http-api Lists all visible queues with their job counts and the jobs of the active queue. ```APIDOC ## GET /api/queues ### Description List every visible queue with its job counts, and the jobs of the active queue. ### Method GET ### Endpoint /api/queues ### Parameters #### Query Parameters - **activeQueue** (string) - Optional - The name of the queue whose jobs should be included. - **status** (Status) - Optional - The job status to filter by. - **page** (string) - Optional - The page number for pagination. - **jobsPerPage** (string) - Optional - The number of jobs per page. ### Response #### Success Response (200) Returns a GetQueuesResponse object. ``` -------------------------------- ### GET /api/queues/{queueName}/workers Source: https://felixmosh.github.io/bull-board/api Per-queue operation that retrieves the workers for the specified queue. ```APIDOC ## GET /api/queues/{queueName}/workers ### Description Per-queue operation that retrieves the workers for the specified queue. ### Method GET ### Endpoint /api/queues/{queueName}/workers ### Parameters #### Path Parameters - **queueName** (string) - Required - The name of the queue. ### Response #### Success Response (200) - **workers** (array) - List of workers for the queue. ``` -------------------------------- ### GET /api/queues/{queueName}/metrics Source: https://felixmosh.github.io/bull-board/api Per-queue operation that retrieves metrics for the specified queue. ```APIDOC ## GET /api/queues/{queueName}/metrics ### Description Per-queue operation that retrieves metrics for the specified queue. ### Method GET ### Endpoint /api/queues/{queueName}/metrics ### Parameters #### Path Parameters - **queueName** (string) - Required - The name of the queue. ### Response #### Success Response (200) - **metrics** (object) - Metrics data for the queue. ``` -------------------------------- ### Set up Express adapter with BullMQ Source: https://felixmosh.github.io/bull-board/server-adapters/express Create a BullMQ queue, configure the ExpressAdapter with a base path, and mount the router in an Express app. The path in setBasePath() must match the mount point in app.use(). ```ts import { createBullBoard } from '@bull-board/api'; import { BullMQAdapter } from '@bull-board/api/bullMQAdapter'; import { ExpressAdapter } from '@bull-board/express'; import { Queue } from 'bullmq'; import express from 'express'; const queue = new Queue('my-queue', { connection: { host: 'localhost', port: 6379 }, }); const serverAdapter = new ExpressAdapter(); serverAdapter.setBasePath('/admin/queues'); createBullBoard({ queues: [new BullMQAdapter(queue)], serverAdapter, }); const app = express(); app.use('/admin/queues', serverAdapter.getRouter()); app.listen(3000); ``` -------------------------------- ### GET /queues/:queueName/jobs/:jobId/logs Source: https://felixmosh.github.io/bull-board/openapi.json Retrieves the logs for a specific job. The response is an array of log strings. ```APIDOC ## GET /queues/:queueName/jobs/:jobId/logs ### Description Retrieves the logs for a specific job. ### Method GET ### Endpoint /queues/:queueName/jobs/:jobId/logs ### Parameters #### Path Parameters - **queueName** (string) - Required - The name of the queue. - **jobId** (string) - Required - The ID of the job. ### Response #### Success Response (200) - **items** (array of string) - The log entries. #### Response Example [ "log entry 1", "log entry 2" ] ``` -------------------------------- ### Usage with ExpressAdapter Source: https://felixmosh.github.io/bull-board/queue-adapters/bull Set up Bull Board with a Bull queue and the Express adapter. Creates a queue, configures the server adapter base path, and registers the queue with BullAdapter. ```ts import { createBullBoard } from '@bull-board/api'; import { BullAdapter } from '@bull-board/api/bullAdapter'; import { ExpressAdapter } from '@bull-board/express'; import Queue from 'bull'; const myQueue = new Queue('my-queue', { redis: { host: 'localhost', port: 6379 }, }); const serverAdapter = new ExpressAdapter(); serverAdapter.setBasePath('/admin/queues'); createBullBoard({ queues: [new BullAdapter(myQueue)], serverAdapter, }); ``` -------------------------------- ### Run Bull-Board standalone with CLI Source: https://felixmosh.github.io/bull-board/guide/introduction Use this command to start Bull-Board standalone against a Redis URL without an existing app. This is quicker for just looking at a queue and is the only option when workers are in a repo you are not editing or in a non-Node language. ```sh npx @bull-board/cli -r redis://localhost:6379 ``` -------------------------------- ### GET /api/queues/{queueName}/metrics Source: https://felixmosh.github.io/bull-board/openapi.json Reads the BullMQ completed and failed counter metrics for a specific queue. ```APIDOC ## GET /api/queues/{queueName}/metrics ### Description Read the BullMQ completed and failed counter metrics of one queue. ### Method GET ### Endpoint /api/queues/{queueName}/metrics ### Parameters #### Path Parameters - **queueName** (string) - Required - The name of the queue. ### Response #### Success Response (200) Returns the queue metrics. #### Error Response (default) Returns an error response body. ``` -------------------------------- ### GET /api/queues/{queueName}/job-data-schema Source: https://felixmosh.github.io/bull-board/api Per-queue operation that retrieves the job data schema for the specified queue. ```APIDOC ## GET /api/queues/{queueName}/job-data-schema ### Description Per-queue operation that retrieves the job data schema for the specified queue. ### Method GET ### Endpoint /api/queues/{queueName}/job-data-schema ### Parameters #### Path Parameters - **queueName** (string) - Required - The name of the queue. ### Response #### Success Response (200) - **jobDataSchema** (object) - The job data schema. ``` -------------------------------- ### GET /api/queues/{queueName}/rate-limit Source: https://felixmosh.github.io/bull-board/api Per-queue operation that retrieves the rate limit configuration for the specified queue. ```APIDOC ## GET /api/queues/{queueName}/rate-limit ### Description Per-queue operation that retrieves the rate limit configuration for the specified queue. ### Method GET ### Endpoint /api/queues/{queueName}/rate-limit ### Parameters #### Path Parameters - **queueName** (string) - Required - The name of the queue. ### Response #### Success Response (200) - **rateLimit** (object) - Rate limit configuration. ``` -------------------------------- ### GET /api/queues/{queueName}/default-job-options Source: https://felixmosh.github.io/bull-board/api Per-queue operation that retrieves the default job options for the specified queue. ```APIDOC ## GET /api/queues/{queueName}/default-job-options ### Description Per-queue operation that retrieves the default job options for the specified queue. ### Method GET ### Endpoint /api/queues/{queueName}/default-job-options ### Parameters #### Path Parameters - **queueName** (string) - Required - The name of the queue. ### Response #### Success Response (200) - **defaultJobOptions** (object) - Default job options for the queue. ``` -------------------------------- ### Bull Board CLI Usage and Options Source: https://felixmosh.github.io/bull-board/guide/cli Shows the CLI usage and all available options for the bull-board command. Includes Redis connection settings, server configuration, queue discovery, authentication, and dashboard features. ```text Usage: bull-board [options] npx @bull-board/cli [options] Options: -r, --redis Redis connection URL [redis://localhost:6379] --sentinel Comma separated sentinel host:port list, port [26379] --sentinel-name Redis master group name, required with --sentinel --sentinel-password Password for the sentinel nodes themselves --cluster Comma separated cluster host:port list, port [6379] --redis-username Username for the Redis nodes behind the sentinels or in the cluster --redis-password Password for the Redis nodes behind the sentinels --redis-db Database to select behind the sentinels -p, --port Port to listen on [3000] --host
Interface to bind [127.0.0.1] --prefix Comma separated key prefixes [bull] --queues Use these queue names instead of discovering --scan-interval Seconds between rescans, 0 to scan once [10] --base-path Serve the dashboard under a path prefix --read-only Disable every destructive action --user Basic auth user (requires --password) --password Basic auth password (requires --user) --board-title Dashboard title --history Record and serve long-retention metrics history --history-retention-days Days of history to keep [90] --config Path to a config file --browser Command to open the browser with [$BROWSER] --no-open Do not open a browser --no-retry Exit if Redis is unreachable instead of retrying -h, --help Show this help -v, --version Show the version ```