---
title: "Connect Next.js"
description: "Install Xovris in a Next.js project with one command, verify the first event and remove it cleanly."
url: https://xovris.ai/docs/connect/nextjs/
---

# Connect Next.js

Install Xovris in a Next.js project with one command, verify the first event and remove it cleanly.

Support: Connects today - The wizard writes the configuration; its install test has not yet passed in CI on the latest Next.js.

## Run the wizard

Xovris makes this change for you: connect GitHub once and Xovris raises a pull request that lists every change, for you to review and merge. Do it yourself instead: run the command above in the folder that holds your project’s package.json – it opens your browser once to sign you in, and you never copy a key.

npm:

```sh
npx xovris@latest init
```

pnpm:

```sh
pnpm dlx xovris@latest init
```

yarn:

```sh
yarn dlx xovris@latest init
```

bun:

```sh
bunx xovris@latest init
```

## Variables it writes

The wizard writes these to .env.local and adds that file to .gitignore if it is not already ignored. It refuses to write a key into a file git tracks.

- `XOVRIS_INGEST_URL`
- `XOVRIS_INGEST_KEY`
- `NEXT_PUBLIC_XOVRIS_INGEST_URL`
- `NEXT_PUBLIC_XOVRIS_INGEST_KEY`

## Check it works

The wizard ends by waiting for your first stored event. To check again later, run:

```sh
npx xovris@latest verify
```

## Remove it

This reverses every change the wizard recorded and revokes the key, then confirms both are gone:

```sh
npx xovris@latest remove
```

## Packages

```sh
npm install @xovris/next
```

## What you get

- Server errors: Included
- Browser errors: Included
- Traces: Through OpenTelemetry
- Metrics: Through OpenTelemetry
- Logs: Not collected
- Releases: Included
- Readable stack traces: Included

## Supported versions

Written for Next.js 15.3 or later (before 17), on Node.js 20.19 or later.

## If you already use another tool

The wizard looks for existing instrumentation first and tells you what it will do before it changes anything, so you never send each error twice.

- OpenTelemetry: Adds Xovris as a second OpenTelemetry exporter – your existing setup keeps working unchanged.
- Sentry: Offers to run both side by side for a while, or to switch over; it never sends one error to Xovris twice.
- Datadog: Leaves the existing agent in place and offers to export through OpenTelemetry instead of adding a second agent.
- New Relic: Leaves the existing agent in place and offers to export through OpenTelemetry instead of adding a second agent.
