Skip to main content

Plugins

  • There are 60 core plugins and 236 community plugins
  • A core plugin is a plugin maintained by the Fastify team, and we do our best to maintain them according to the Fastify Long Term Support policy
  • We guarantee that every community plugin respects Fastify best practices (tests, etc) at the time they have been added to the list. We offer no guarantee on their maintenance
  • Can't find the plugin you're looking for? No problem, you can learn how to do it!

Core Plugins

Name
Description

To have accepts in your request object.

To serialize to output according to the Accept header.

Run multiple auth functions in Fastify.

Require all plugins in a directory.

Dependency injection support for Fastify, based on awilix.

Allows you to easily build serverless web applications/services and RESTful APIs using Fastify on top of AWS Lambda and Amazon API Gateway.

Basic auth plugin for Fastify.

Bearer auth plugin for Fastify.

General server-side cache and ETag support.

A low overhead circuit breaker for your routes.

Fastify compression utils.

Parse and set cookie headers.

Enables the use of CORS in a Fastify application.

A plugin for adding CSRF protection to Fastify.

Plugin to deal with diagnostics_channel on Fastify.

Plugin to share the same ES client.

Load and check configuration.

Automatically generate ETags for HTTP responses.

Express compatibility layer for Fastify.

Set and get flash messages using the session.

Plugin to parse x-www-form-urlencoded bodies.

Makes functional programming in Fastify more convenient. Adds support for Fastify routes returning functional structures, such as Either, Task or plain parameterless function.

Important security headers for Fastify.

Use the Hotwire pattern with Fastify.

Proxy your HTTP requests to another server, with hooks.

JWT utils for Fastify, internally uses fast-jwt.

Plugin to interact with Apache Kafka.

Plugin to share a common LevelDB connection across Fastify.

Middleware engine for Fastify.

Fastify MongoDB connection plugin, with which you can share the same MongoDB connection pool across every part of your server.

Multipart support for Fastify.

Fastify MySQL connection plugin.

React server-side rendering support for Fastify with Next.

Wrap around simple-oauth2.

Formats Fastify's logs into a nice one-line message.

Use Passport strategies to authenticate requests and protect route.

Fastify PostgreSQL connection plugin, with this you can share the same PostgreSQL connection pool in every part of your server.

A low overhead rate limiter for your routes.

Fastify Redis connection plugin, with which you can share the same Redis connection across every part of your server.

Plugin to forward the current HTTP request to another server.

Request-scoped storage, based on AsyncLocalStorage (with fallback to cls-hooked), providing functionality similar to thread-local storages.

A simple plugin that enables response validation for Fastify.

Plugin that provides a Map of routes.

Provide stats for routes using node:perf_hooks.

Plugin for scheduling periodic jobs, based on toad-scheduler.

Create a secure stateless cookie session for Fastify.

Defaults for Fastify that everyone can agree on. It adds some useful decorators such as HTTP errors and assertions, but also more request and reply methods.

A session plugin for Fastify.

Plugin for serving static files as fast as possible.

Plugin for serving Swagger/OpenAPI documentation for Fastify, supporting dynamic generation.

Plugin for serving Swagger UI.

Plugin for throttling the download speed of a request.

Fastify type provider for Typebox.

Measure process load with automatic handling of "Service Unavailable" plugin for Fastify.

Decorate the Request object with a method to access raw URL components.

Templates rendering (ejs, pug, handlebars, marko) plugin support for Fastify.

Integration with Vite, allows for serving SPA/MPA/SSR Vite applications.

WebSocket support for Fastify. Built upon ws.

Plugin for Zipkin distributed tracing system.

Community Plugins

Name
Description

A simple way to add a crud in your fastify project.

Alternate Fastify and Next.js integration.

A plugin to help with caching API responses using AWS DynamoDB.

Add authentication and user management to your Fastify application with Clerk.

Strongly typed routes with a runtime validation using JSON schema generated from types.

A plugin for sampling process metrics.

A plugin to close the server gracefully on SIGINT and SIGTERM signals.

Provides easy, developer-friendly OpenAPI 3.1 specs + doc explorer based on your routes.

A plugin lets you use session and decide only where to load/save from/to. Has great TypeScript support + built-in adapters for common ORMs/databases (Firebase, Prisma Client, Postgres (wip), InMemory) and you can easily make your own adapter!

A plugin to easily create git server and make one/many Git repositories available for clone/fetch/push through the standard git (over http) commands.

Fastify Request ID Plugin

Fastify typeorm QueryRunner plugin

Tiny (~5k), Fast, KISS, and dependency-free Node.js library to make your Fastify API graceful.

Run REST APIs and other web applications using your existing Node.js application framework (Express, Koa, Hapi and Fastify), on top of AWS Lambda, Huawei and many other clouds.

Minimalistic and opinionated plugin that collects usage/process metrics and dispatches to statsd.

Sentry errors handler that just works! Install, add your DSN and you're good to go! A plugin to implement Lyra search engine on Fastify

A plugin for accessing an instantiated PrismaClient on your server.

A plugin to close the server gracefully

A plugin to enable compact request logging for Fastify

Session plugin for Fastify that supports both stateless and stateful sessions

Redis store for @mgcrea/fastify-session using ioredis

Fast sodium-based crypto for @mgcrea/fastify-session

A custom compact pino-base prettifier

Plugin to generate routes automatically with valid json content

Beautiful OpenAPI/Swagger API references for Fastify

SeaweedFS for Fastify

Fastify plugin to integrate with Apitally, a simple API monitoring & API key management solution.

Fastify ping responder for Kubernetes Liveness and Readiness Probes.

A Fastify plugin to log requests and subsegments through AWSXray.

Fastify middleware for CLS-based request ID generation. An out-of-the-box solution for adding request IDs into your logs.

A plugin for using Fastify without the need of consuming a port on Electron apps.

A Fastify plugin for waterline. Decorates Fastify with waterline models.

Fastify plugin that return 204 status on empty response.

Fastify plugin that adds 405 HTTP status to your routes

Fastify plugin that automatically adds an Allow header to responses with routes. Also sends 405 responses for routes that have a handler but not for the request's method.

Fastify AMQP connection plugin, to use with RabbitMQ or another connector. Just a wrapper to amqplib.

Fastify AMQP plugin with a Promise-based API provided by amqplib-as-promised.

Angular server-side rendering support using @angular/platform-server for Fastify

Fastify plugin to authenticate HTTP requests based on API key and signature

Fastify Plugin for interacting with Appwrite server.

Plugin to access Fastify instance, logger, request and reply from Node.js Async Local Storage.

Fastify MySQL plugin with auto SQL injection attack prevention.

Fastify Postgres plugin with auto SQL injection attack prevention.

: Auth0 verification plugin for Fastify, internally uses fastify-jwt and jsonwebtoken.

Plugin to auto-generate CRUD routes as fast as possible.

Plugin to scan and load routes based on filesystem path from a custom directory.

Fastify plugin for AWS Simple Notification Service (AWS SNS) that coordinates and manages the delivery or sending of messages to subscribing endpoints or clients.

Fastify plugin for managing databases, tables, and querying and creating scheduled queries with AWS Timestream.

Plugin to send HTTP requests via axios.

Fastify plugin for development servers that require Babel transformations of JavaScript sources.

A Bcrypt hash generator & checker.

Plugin for better-sqlite3.

Prints your routes to the console, so you definitely know which endpoints are available.

Fastify plugin to add bookshelf.js ORM support.

Fastify plugin to add boom support.

Fastify plugin to add bree support.

Fastify plugin to add support for Bugsnag error reporting.

Small and efficient cache provider for Node.js with In-memory, File, Redis and MongoDB engines for Fastify

Casbin support for Fastify.

Casbin support for Fastify based on a RESTful model.

Fastify CASL plugin that supports ACL-like protection of endpoints via either a preSerialization & preHandler hook, sanitizing the inputs and outputs of your application based on user rights.

Fastify plugin to generate and forward Fastify events in the Cloudevents format.

Fastify plugin for CloudFlare Turnstile.

Plugin to share a common Cloudinary connection across Fastify.

Fastify plugin to connect to a CockroachDB PostgreSQL instance via the Sequelize ORM.

Fastify plugin to add constraints to multiple routes

Fastify plugin to add CouchDB support via nano.

A plugin to rapidly generate CRUD routes for any entity.

Fastify plugin to add health route in your server that asserts custom functions.

Fastify plugin that provides the set of TypeScript decorators.

Fastify plugin that allows requests to be delayed whilst a task the response is dependent on is run, such as a resource intensive process.

Fastify plugin to disable client-side caching, inspired by nocache.

AWS DynamoDB plugin for Fastify. It exposes AWS.DynamoDB.DocumentClient() object.

Dynamic plugin register for Fastify.

Fastify plugin to integrate envalid in your Fastify project.

Fastify plugin to print errors in structured HTML to the browser.

The easiest authentication plugin for Fastify, with built-in support for Single sign-on (and great documentation).

Event bus support for Fastify. Built upon js-event-bus.

Fastify plugin for instantiating and encapsulating the Evervault client.

Get control of your decorators across all the encapsulated contexts.

Fastify plugin to serve default favicon.

Fastify feature flags plugin with multiple providers support (e.g. env, config, unleash).

Get Next.js based file system routing into fastify.

Fastify plugin for uploading files.

Fastify plugin for Firebase Admin SDK to Fastify so you can easily use Firebase Auth, Firestore, Cloud Storage, Cloud Messaging, and more.

Firebase Authentication for Fastify supporting all of the methods relating to the authentication API.

Handy plugin to provide multipart support and fastify-swagger integration.

Google Cloud Trace API Connector for Fastify.

Small plugin to set a new HEAD route handler for each GET route previously registered in Fastify.

Small plugin used to make fastify accept only GET requests

A good Fastify sessions plugin focused on speed.

Fastify plugin that exposes a GCP Cloud Storage client instance.

Shutdown Fastify gracefully and asynchronously.

Authentication/Authorization plugin for Fastify that supports 200+ OAuth Providers.

A Fastify plugin that protects endpoints by checking authenticated user roles and/or scopes.

Connects your application to SAP-HANA.

A Fastify plugin to encode/decode IDs using hashids.

A Fastify plugin to have fun with Hasura.

Fastify plugin to serve a health check route and a probe script.

Fastify Hemera plugin, for writing reliable & fault-tolerant microservices with nats.io.

A Fastify Plugin to create a server, build, and send HL7 formatted Hl7 messages. Using node-hl7-client and node-hl7-server as the underlining technology to do this.

Plugin to send HTTP(s) requests. Built upon urllib.

Fastify plugin for "simulating" a thread of execution to allow for true HTTP context to take place per API call within the Fastify lifecycle of calls.

An error handling plugin for Fastify that uses enhanced HTTP errors.

Redirect HTTP requests to HTTPS, both using the same port number, or different response on HTTP and HTTPS.

Lightweight, proxy-aware redirect plugin from HTTP to HTTPS.

Fastify plugin for auto-redirect from HTTP to HTTPS.

Internationalization plugin for Fastify. Built upon node-polyglot.

Fastify plugin to track impressions of all the routes.

Fastify InfluxDB plugin connecting to an InfluxDB instance via the Influx default package.

A plugin for Fastify that allows you to infer a request ID by a given set of custom Request headers.

Fastify plugin to serialize JSON responses into XML.

JWT user scope verifier.

JWT authentication for Fastify-based web apps.

Fastify plugin that adds support for KafkaJS - a modern Apache Kafka client library.

A keycloak adapter for a Fastify app.

Fastify plugin for supporting KnexJS Query Builder.

Fastify Mock KnexJS for testing support.

Convert Koa middlewares into Fastify plugins

Fastify Kubernetes client plugin.

Fastify plugin for supporting Kysely type-safe query builder.

Fastify plugin to parse request language.

Lightweight cache plugin

A simple plugin for Fastify to list all available routes.

Load routes from a directory and inject the Fastify instance in each file.

Changes the log level of your Fastify server at runtime.

Plugin to load lua scripts with fastify-redis and lured. A plugin to implement Lyra search engine on Fastify.

Plugin to initialize and encapsulate Nodemailer's transporters instances in Fastify.

Plugin to markdown support.

Plugin for Fastify, which allows the use of HTTP verbs, such as DELETE, PATCH, HEAD, PUT, OPTIONS in case the client doesn't support them.

Plugin for exporting Prometheus metrics.

Plugin for minification and transformation of responses.

Fastify MongoDB in Memory Plugin for testing support.

Fastify plugin that sanitizes client input to prevent potential MongoDB query injection attacks.

Fastify plugin to create REST API methods based on Mongoose MongoDB models.

Fastify Mongoose plugin that connects to a MongoDB via the Mongoose plugin with support for Models.

Plugin to share mqtt client across Fastify.

Fastify and MessagePack, together at last. Uses @msgpack/msgpack by default.

Multer is a plugin for handling multipart/form-data, which is primarily used for uploading files.

Plugin to share NATS client across Fastify.

NextAuth.js plugin for Fastify.

Add additionalProperties: false by default to your JSON Schemas.

Plugin to eliminate thrown errors for /favicon.ico requests.

Plugin to normalize the request and reply to the Express version 4.x request and response, which allows use of middleware, like swagger-stats, that was originally written for Express.

Structure your endpoints in a folder and load them dynamically with Fastify.

Vue server-side rendering support for Fastify with Nuxt.js Framework.

Generates OpenAPI 3.0+ documentation from routes schemas for Fastify.

Plugin for the Fastify framework that provides integration with objectionjs ORM.

Plugin to cherry-pick classes from objectionjs ORM.

A Fastify plugin to implement the OPAQUE aPAKE protocol. Uses @squirrelchat/opaque-wasm-server.

A Fastify plugin that generates OpenAPI spec automatically.

Glue for OpenAPI specifications in Fastify, autogenerates routes based on an OpenAPI Specification.

A Fastify plugin that uses the OpenTelemetry API to provide request tracing.

Attaches an oracledb connection pool to a Fastify server instance.

Fastify OrientDB connection plugin, with which you can share the OrientDB connection across every part of your server.

Fastify OSM plugin to run overpass queries by OpenStreetMap.

Fastify plugin to override decorators, plugins and hooks for testing purposes

Fastify plugin for memoize responses by expressive settings.

A worker thread pool plugin using Piscina.

A plugin to handle i18n using node-polyglot.

Plugin to integrate PostGraphile in a Fastify project.

Fastify PostgreSQL connection plugin that uses Postgres.js.

A Fastify plugin that uses prettier under the hood to beautify outgoing responses and/or other things in the Fastify server.

A Fastify plugin that prints all available routes.

Fastify and protobufjs, together at last. Uses protobufjs by default.

This plugin utilizes qrcode to generate QR Code.

A plugin for Fastify that adds support for parsing URL query parameters with qs.

Fastify RabbitMQ plugin that uses node-rabbitmq-client plugin as a wrapper.

Fastify's plugin that adds support to handle an aborted request asynchronous.

RavenDB connection plugin. It exposes the same DocumentStore (or multiple ones) across the whole Fastify application.

Add the request.rawBody field.

Fastify role-based access control plugin.

Fastify plugin for reCAPTCHA verification.

A plugin for fast, reliable, and scalable channels implementation based on Redis streams.

Redis Session plugin for fastify.

Plugin to automatically load routes from a specified path and optionally limit loaded file names by a regular expression.

A Fastify plugin for caching the response.

Add X-Response-Time header at each request for Fastify, in milliseconds.

Fastify-based web framework with REST API routes auto-generation for TypeORM entities using DI and decorators.

Fastify reverse routes plugin, allows to defined named routes and build path using name and parameters.

Fastify Rob-Config integration.

Convenient grouping and inheritance of routes.

Ensure the existence of defined S3 buckets on the application startup.

Choose the JSON schema to use based on request parameters.

Generate typescript types based on your JSON/YAML validation schemas so they are always in sync.

Fastify plugin to add the Sentry SDK error handler to requests.

Fastify plugin work with Sequelize (adapter for Node.js -> Sqlite, Mysql, Mssql, Postgres).

A session plugin with support for arbitrary backing caches via fastify-caching.

Plugin for sharing schemas between different routes.

Fastify Slonik plugin, with this you can use slonik in every part of your server.

A plugin to delay the response from the server.

A Socket.io plugin for Fastify.

Small plugin to allow you use multiple validators in one route based on each HTTP part of the request.

Connects your application to a sqlite3 database.

Connects your application to a SQLite database with full Typescript support.

To provide Server-Sent Events with reply.sse( … ) to Fastify.

To provide Server-Sent Events using Async Iterators (supports newer versions of Fastify).

A simple plugin for setting up server side rendering with vite.

Plugin to initialize and encapsulate Stripe Node.js instances in Fastify.

Plugin to initialize and encapsulate Supabase instances in Fastify.

Automatically generate a browser-compatible, trusted, self-signed, localhost-only, TLS certificate.

Tokenize plugin for Fastify that removes the pain of managing authentication tokens, with built-in integration for fastify-auth.

A plugin to handle TOTP (e.g. for 2FA).

Useful functions for Twitch Extension Backend Services (EBS).

Fastify type provider for zod.

Fastify plugin to work with TypeORM.

Parses your request's user-agent header.

A Fastify plugin to use the web server uWebSockets.js.

Proxy subdomain HTTP requests to another server (useful if you want to point multiple subdomains to the same IP address, while running different servers on the same machine).

Vite plugin for Fastify with SSR data support.

Nuxt.js plugin for Fastify. Control the routes nuxt should use.

Web Application Messaging Protocol router for Fastify.

Enables returning web streams objects Response and ReadableStream in routes.

Webpack hot module reloading plugin for Fastify.

Webpack Hot Module Replacement for Fastify.

WebSocket integration for Fastify — with support for WebSocket lifecycle hooks instead of a single handler function. Built upon ws and uws.

Parse XML payload / request body into JS / JSON object.

Exports a typescript API client for your Fastify API and ensures fullstack type safety for your project.

An i18next based i18n (internationalization) middleware to be used with Node.js web frameworks like Express or Fastify and also for Deno.

API Gateway plugin for Fastify, a low footprint implementation that uses the fastify-reply-from HTTP proxy library.

A fully-featured and performant GraphQL server implementation for Fastify.

A fast and compact way to get all your network and process stats for your node application. Websocket, HTTP/S, and prometheus compatible!

OAS 3.x to Fastify routes automation. Automatically generates route handlers with fastify configuration and validation.

Swagger and OpenAPI 3.0 spec-based request validation middleware that supports Fastify.

A Fastify plugin to easily create Google Cloud PubSub endpoints.

A simple and lightweight Sequelize plugin for Fastify.

A simple and updated Typeorm plugin for use with Fastify. #### Community Tools

Reusable workflows for use in the Fastify plugin

Route configuration generator by directory structure.

Tool for building Fastify APIs using decorators and convert Typescript interface to JSON Schema.

CLI tool to generate JSON Schema from TypeScript interfaces.

Fastify plugin for Vite with Hot-module Replacement.

File-based routing for Fastify applications using Vite.