
# General

> Core options for presets, logging, and runtime configuration.

::note
All examples on this page assume the following import in `nitro.config.ts`:

```ts
import { defineConfig } from "nitro";
```
::

### `preset`

The deployment preset to build for in **production**. Can also be set with the `NITRO_PRESET` environment variable.

The preset for development mode is always `nitro_dev`. For production, the default is `node_server`, which builds a standalone Node.js server.

When the `preset` option is not set and Nitro is running in a known environment, the preset is detected automatically.

```ts
export default defineConfig({
  preset: "cloudflare_pages", // deploy to Cloudflare Pages
});
```

### `defaultPreset`

Customize the preset used as the **fallback** when `preset` is not set and none of the known hosting providers are auto-detected.

By default, Nitro falls back to the runtime-based preset (`node`, and `deno` or `bun` when running on those runtimes). An explicit `preset`, the `NITRO_PRESET` environment variable, and auto-detected providers (Vercel, Netlify, Cloudflare Pages, ...) all take precedence over `defaultPreset`.

It accepts a preset name or an inline preset definition.

```ts
export default defineConfig({
  defaultPreset: "node_cluster", // use node_cluster instead of node_server by default
});
```

### `debug`

- Default: `false`{lang=ts} (`true`{lang=ts} when `DEBUG` environment variable is set)

Enable debug mode for verbose logging and additional development information.

```ts
export default defineConfig({
  debug: true,
});
```

### `logLevel`

- Default: `3`{lang=ts} (`1`{lang=ts} when the testing environment is detected)

Log verbosity level. See [consola](https://github.com/unjs/consola?tab=readme-ov-file#log-level) for more information.

```ts
export default defineConfig({
  logLevel: 4, // verbose logging
});
```

### `logging`

- Default: `{ compressedSizes: true, buildSuccess: true }`{lang=ts}

Control build logging behavior. Set `compressedSizes` to `false` to skip reporting compressed bundle sizes. Set `buildSuccess` to `false` to suppress the build success message.

```ts
export default defineConfig({
  logging: {
    compressedSizes: false, // skip compressed size reporting
    buildSuccess: false,
  },
});
```

### `runtimeConfig`

- Default: `{ app: {}, nitro: {} }`{lang=ts}

Server runtime configuration. Nitro injects `app.baseURL` (from the [`baseURL`](/config/routing#baseurl) option) into the `app` namespace.

**Note:** The `app` and `nitro` namespaces are reserved for internal use.

```ts
export default defineConfig({
  runtimeConfig: {
    apiSecret: "default-secret", // override with NITRO_API_SECRET
  },
});
```

### `compatibilityDate`

- Default: `"latest"`{lang=ts} behavior when not provided

Deployment providers introduce new features that Nitro presets can leverage, but some of them need to be explicitly opted into. Set this to the latest date you have tested against, in `YYYY-MM-DD` format, to leverage the latest preset features.

```ts
export default defineConfig({
  compatibilityDate: "2025-01-01",
});
```

### `static`

- Default: `false`{lang=ts}

Enable static site generation mode.

```ts
export default defineConfig({
  static: true, // prerender all routes
});
```
