# Server configuration with the Next.js App Router SDK

> The options of uniform.server.config.ts for the Next.js App Router SDK.

Source: https://docs.uniform.app/docs/sdk/nextjs-app-router/configuration

> **Developer Preview:**
>
> This page documents the developer preview of the SDK, version `20.81.1-alpha.25.sha-f076f9b857`.

`uniform.server.config.ts` is optional:

`uniform.server.config.ts`

```ts
import type { UniformServerConfig } from "@uniformdev/next-app-router/config";

const config: UniformServerConfig = {
  // Default storage consent for new visitors.
  defaultConsent: true,

  // The playground route (default: "/uniform/playground").
  playgroundPath: "/playground",

  context: {
    // Turns off the Uniform Context dev tools (default: false).
    disableDevTools: false,

    // Custom personalization selection algorithms for the server and the edge.
    personalizationSelectionAlgorithms: {},
  },

  // Keeps quirks in a cookie for the browser Context (default: true).
  quirkSerialization: true,
};

export default config;
```

| Option | Default | Description |
| --- | --- | --- |
| `defaultConsent` | `true` with no file, `false` when your file does not set it | The storage consent for new visitors. The middleware writes it into the code. |
| `playgroundPath` | `"/uniform/playground"` | The route of the pattern playground. |
| `context.disableDevTools` | `false` | Turns off the Uniform Context dev tools. |
| `context.personalizationSelectionAlgorithms` | none | Custom personalization algorithms, by name. Refer to [Custom personalization algorithms](https://docs.uniform.app/docs/sdk/nextjs-app-router/personalization#custom-personalization-algorithms). |
| `quirkSerialization` | `true` | Keeps quirks in a cookie for the browser Context. |

> **Warning:**
>
> Your file replaces the default configuration fully. The SDK does not merge the two. Without a file, `defaultConsent` is `true`. With a file that does not set `defaultConsent`, it is `false`. Always set `defaultConsent` in your file.

> **Developer Preview:**
>
> The options `middlewareRuntimeCache` and `experimental.disableSwrMiddlewareCache` are removed, because the middleware makes no API calls. `context.personalizationSelectionAlgorithms` is new.
