For AI agents: the complete documentation index is available at /bull-board/llms.txt, the full documentation bundle is available at /bull-board/llms-full.txt, and this page is available as Markdown at /bull-board/server-adapters/fastify.md.

Fastify

Fastify. @bull-board/fastify registers as a plugin.

Install

npm install @bull-board/api @bull-board/fastify
Fastify 5 only

The adapter bundles @fastify/static and @fastify/view, both of which target fastify@5. Registering it on fastify@4 throws a version mismatch from fastify-plugin before the dashboard ever serves a request. Upgrade Fastify, or mount the dashboard on a separate Express instance instead.

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 });

FastifyAdapter takes the base path from setBasePath() or the prefix option on app.register(). If you set both, they must match, otherwise asset URLs will 404.

Tip

Top-level await in the example. Wrap the body in async function main() { ... }; main() if you're on plain CommonJS.

Full runnable examples

Next steps