Go to next.config.js and edit the env variables Then yarn install && yarn build && yarn start If you plan to host on cloudflare pages choose the nextjs framework preset, also set your environment variables to NODE_VERSION, 16.14.2