1. Create a Box
Create a box with thenode runtime. You don’t need to configure an agent for this. See the quickstart if you haven’t created one before.
2. Scaffold the App
Runcreate-next-app inside the box. The --yes flag accepts the default options so the setup runs without prompts, installing all dependencies.
3. Start the Dev Server
Start the development server in the background so the command returns while Next.js keeps running on port3000. Commands run from the box’s home directory (/workspace/home), where the app was created.
4. Create a Public URL
Expose port3000 with a public URL to view the app in your browser. Creating a public URL for a running server returns its address.
Next.js blocks cross-origin dev resources by default, so hot reloading won’t work over the public URL until you add the host to
allowedDevOrigins in next.config.ts:next.config.ts