---
title: "NUXT_E8014"
description: "The runtime config does not match its schema when the server starts."
canonical_url: "https://nuxt.com/docs/4.x/errors/e8014"
---
# E8014

When the server starts, Nuxt applies matching environment variables to the [runtime config](https://nuxt.com/docs/4.x/guide/going-further/runtime-config) and checks the values declared with a schema (or, with `compatibilityVersion: 5`, every value) against their type. The server does not start if:

- an environment variable cannot be converted to the type of the value it replaces (for example `NUXT_PORT=abc` for a `z.number()` `port`)
- a value [declared with a schema](https://nuxt.com/docs/4.x/guide/going-further/runtime-config#validating-with-a-schema) is required, but has no default and no environment variable sets it
- a value is not one of the values allowed by its schema

Unless `compatibilityVersion: 5` is enabled, values whose schema is set by a module with `updateRuntimeConfig()` are reported as a warning instead, and the server starts with their default.

Each issue names the runtime config key and the environment variable that sets it.

## Resolution

Set the listed environment variables to valid values where the server runs:

```bash [Terminal]
NUXT_API_SECRET=my-secret NUXT_PORT=8080 node .output/server/index.mjs
```

If the value is not always needed, give it a default or make it optional in `nuxt.config`:

```ts [nuxt.config.ts]
import { z } from 'zod'

export default defineNuxtConfig({
  runtimeConfig: {
    apiSecret: z.string().optional(),
    port: z.number().default(3000),
  },
})
```

::read-more{to="https://nuxt.com/docs/4.x/guide/going-further/runtime-config#environment-variables"}
::


## Sitemap

See the full [sitemap](https://nuxt.com/sitemap.md) for all pages.
