Configuration

Deployment ID

A deploymentId is a public release marker for skew handling, not a secret or cache isolation policy. The explicit config value wins over NEXT_DEPLOYMENT_ID when both are set. Fail the build if the CI-controlled release ID is missing or malformed. Use the same ID only for replicas of the same deployment. Source: https://nextjs.org/docs/app/api-reference/config/next-config-js/deploymentId. Documentation-reviewed illustrative draft; installed declarations and runtime not verified.

Formal Syntax & Structure

nextjs syntaxnextjs
deploymentId: process.env.RELEASE_ID

Working Example

Example Snippetnextjs
import type {NextConfig} from 'next';const id=process.env.RELEASE_ID;if(!id||!/^[A-Za-z0-9._-]{1,80}$/.test(id))throw new Error('Invalid release ID');const config:NextConfig={output:'standalone',deploymentId:id};export default config;
Next.js Reference