Preset Options

Provider-specific options, applied when the matching deployment preset is used.

Note

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

import { defineConfig } from "nitro";

#awsAmplify

The options for the AWS Amplify preset. Main fields are catchAllStaticFallback, imageOptimization (path, cacheControl), imageSettings, and runtime (nodejs20.x | nodejs22.x | nodejs24.x, default nodejs22.x). See Preset Docs.

export default defineConfig({
  awsAmplify: {
    runtime: "nodejs22.x",
    imageOptimization: { path: "/_image", cacheControl: "public, max-age=3600" },
  },
});

#awsLambda

The options for the AWS Lambda preset. Set streaming to true to enable response streaming. See Preset Docs.

export default defineConfig({
  awsLambda: {
    streaming: true,
  },
});

#azure

The options for the Azure Static Web Apps preset. Use config to customize the generated staticwebapp.config.json (e.g. platform.apiRuntime, navigationFallback). See Preset Docs.

export default defineConfig({
  azure: {
    config: { platform: { apiRuntime: "node:20" } },
  },
});

#firebase

The options for the Firebase App Hosting preset. Use appHosting to customize the generated run configuration. See Preset Docs.

export default defineConfig({
  firebase: {
    appHosting: {
      memoryMiB: 512,
      maxInstances: 10,
    },
  },
});

#iis

The options for the IIS presets. Use mergeConfig to merge the generated web.config with an existing one, or overrideConfig to replace it entirely. See Preset Docs.

export default defineConfig({
  iis: {
    mergeConfig: true,
  },
});

#netlify

The options for the Netlify presets. Use config to provide Netlify deploy configuration (headers, redirects, functions, edge_functions, images, ...). See Preset Docs.

export default defineConfig({
  netlify: {
    config: {
      redirects: [{ from: "/old", to: "/new", status: 301 }],
    },
  },
});

#vercel

The options for the Vercel preset. See Preset Docs.

export default defineConfig({
  vercel: {
    config: { runtime: "nodejs20.x" },
  },
});

#cloudflare

The options for the Cloudflare preset. See Preset Docs.

export default defineConfig({
  cloudflare: {
    wrangler: { compatibility_date: "2025-01-01" },
  },
});

#zephyr

The options for the Zephyr preset. See Preset Docs.

Nitro  builds full-stack servers that deploy anywhere.