# Running ENSAdmin Locally

:::caution[Follow ENSNode's Contribution Guide First]
Follow ENSNode's [contribution guide](/docs/reference/contributing) to prepare your workspace environment & install dependencies.
:::

## Install dependencies

```bash
pnpm install
```

## Set configuration

```bash
cp .env.local.example .env.local
```

Available environment variables:

- `NEXT_PUBLIC_SERVER_CONNECTION_LIBRARY` - Comma-separated list of ENSNode URLs offered as connection options (defaults to NameHash's hosted instances)
- `ENSADMIN_PUBLIC_URL` - The public URL where ENSAdmin is hosted (optional)

## Run development server

Starts the Next.js development server:

```bash
pnpm dev
```

Visit [http://localhost:4173](http://localhost:4173) to build with ENSAdmin locally.

## Preview production build

Create an optimized static export and serve it locally:

```bash
pnpm build
pnpm start
```

The production preview runs on http://localhost:4173 using the `serve` package.

:::note[Static Export]
ENSAdmin uses Next.js to output a Single Page Application (SPA). The production build generates a static site in the `out` directory, which is then served by nginx in the Docker container.
:::