﻿# Install Dotenvx for Next.js

From your Next.js app directory, install the loader with npm

```console
$ npm install @dotenvx/next-env@^3.0.0
```

In your app’s package.json, add this entry to the overrides object so Next.js uses the Dotenvx loader.

```json
{
  "overrides": {
    "@next/env": "npm:@dotenvx/next-env@^3.0.0"
  }
}
```

Apply the override.

```console
$ npm install
```

See the [Next.js SDK guide](/docs/sdk/nextjs/) for usage and API details.
