Use DevProxy with Next.js
Next.js works best when the dev server binds to 0.0.0.0 and DevProxy registers the port from the host OS.
Start the server
bash
pnpm dev --hostname 0.0.0.0 --port 3000Or:
bash
npm run dev -- --hostname 0.0.0.0 --port 3000Register with DevProxy
bash
devproxy add web.myapp --port 3000This creates:
text
https://web.myapp.local -> 127.0.0.1:3000, localhost:3000Set the public site URL
If the app generates absolute URLs, point it at the DevProxy domain:
text
NEXT_PUBLIC_SITE_URL=https://web.myapp.localYou can place that in .env.local.