# @nestjs/terminus

> Terminus integration provides readiness/liveness health checks for NestJS.

Latest version **12.0.0** (published 2026-08-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install @nestjs/terminus
pnpm add @nestjs/terminus
yarn add @nestjs/terminus
bun add @nestjs/terminus
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 12.0.0 |
| Published | 2026-08-31 |
| First published | 2018-12-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | ^20.19.0 \|\| ^22.12.0 \|\| >=24.0.0 |
| Dependencies | 0 |
| Unpacked size | 211.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 743 |
| Author | Livio Brunner |
| Maintainers | nestjscore, kamilmysliwiec, brunnerlivio |
| Keywords | nestjs, healt-checks, express, fastify, typeorm, microorm, mongoose, sequelize, grpc, kafka, rabbitmq, nats, redis, amqp, amqplib, axios, prisma |

## Links

- npm: https://www.npmjs.com/package/@nestjs/terminus
- Repository: https://github.com/nestjs/terminus
- Homepage: https://github.com/nestjs/terminus#readme
- Issues: https://github.com/nestjs/terminus/issues
- npm.io page: https://npm.io/package/@nestjs/terminus

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 12.0.0 (latest) — 2026-08-31
- 12.0.0-next.1 (next) — 2026-08-31
- 11.1.1-beta.1 (beta) — 2026-02-18
- 12.0.0-next.0 — 2026-08-30
- 11.1.1 — 2026-02-18
- 11.1.1-beta.0 — 2026-02-18
- 11.1.0 — 2026-02-17
- 11.0.0-beta.2 — 2026-02-17
- 11.0.0 — 2025-01-25
- 11.0.0-beta.1 — 2025-01-25
- 11.0.0-beta.0 — 2025-01-23
- 10.3.0 — 2025-01-23
- 10.3.0-beta.1 — 2024-07-17
- 10.3.0-beta.0 — 2024-07-16
- 10.2.3 — 2024-02-18
- … 87 more at https://npm.io/package/@nestjs/terminus/versions

## README

<p align="center">
  <a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
</p>

  <p align="center">A progressive <a href="http://nodejs.org" target="blank">Node.js</a> framework for building efficient and scalable server-side applications, heavily inspired by <a href="https://angular.io" target="blank">Angular</a>.</p>
    <p align="center">
<a href="https://www.npmjs.com/package/@nestjs/terminus"><img src="https://img.shields.io/npm/v/@nestjs/terminus.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/package/@nestjs/terminus"><img src="https://img.shields.io/npm/l/@nestjs/terminus.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/package/@nestjs/terminus"><img src="https://img.shields.io/npm/dm/@nestjs/terminus.svg" alt="NPM Downloads" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
  <a href="https://paypal.me/kamilmysliwiec"><img src="https://img.shields.io/badge/Donate-PayPal-dc3d53.svg"/></a>
  <a href="https://twitter.com/nestframework"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
</p>
  <!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
  [![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->

## Description

This module contains integrated healthchecks for [Nest](https://github.com/nestjs/nest).

## Installation

`@nestjs/terminus` integrates with a lot of technologies, such as `typeorm`, `grpc`, `mongodb`, and many more!

```bash

npm install --save @nestjs/terminus

```

## Usage

1. Import the Terminus module
2. Make sure the additionally needed modules are available to (e.g. `TypeOrmModule`), in case you want to do Database Health Checks.

```typescript
// app.module.ts

@Module({
  controllers: [HealthController],
  imports:[
    // Make sure TypeOrmModule is available in the module context
    TypeOrmModule.forRoot({ ... }),
    TerminusModule
  ],
})
export class HealthModule { }

```

3. Setup your `HealthController` which executes your Health Check.

```typescript
// health.controller.ts

@Controller('health')
export class HealthController {
  constructor(
    private health: HealthCheckService,
    private db: TypeOrmHealthIndicator,
  ) {}

  @Get()
  @HealthCheck()
  readiness() {
    return this.health.check([
      async () => this.db.pingCheck('database').withTimeout(1000),
    ]);
  }
}
```

If everything is set up correctly, you can access the healthcheck on `http://localhost:3000/health`.

```json
{
  "status": "ok",
  "info": {
    "database": {
      "status": "up"
    }
  },
  "details": {
    "database": {
      "status": "up"
    }
  }
}
```

For more information, [see docs](https://docs.nestjs.com/recipes/terminus).
You can find more samples in the [samples/](https://github.com/nestjs/terminus/tree/master/sample) folder of this repository.

## Contribute

In order to get started, first read through our [Contributing guidelines](https://github.com/nestjs/terminus/blob/master/CONTRIBUTING.md).

### Setup

Setup the development environment by following these instructions:

1. Fork & Clone the repository
2. Install the dependencies

```bash
pnpm i
pnpm dev
```

In order to test the library against a sample, go to a sample, build it and
start it:

```bash
cd sample/000-dogs-app
pnpm build
pnpm start
```

> [!NOTE]
> Once the library is rebuilt, the sample needs to be rebuilt and restarted
> in order to pick up the changes.

### Test

For unit testing run the following command:

```bash
pnpm test
```

For e2e testing, a Docker Compose stack is required. Make sure
Docker is installed on your machine and run the following command.

```bash
docker compose up -d
pnpm test:e2e
```

## Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).

## Stay in touch

- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com) and [Livio Brunner](https://brunnerliv.io)
- Website - [https://nestjs.com](https://nestjs.com/)
- Twitter - [@nestframework](https://twitter.com/nestframework)

## License

Nest is [MIT licensed](LICENSE).

---
_Source: https://npm.io/package/@nestjs/terminus · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
