In package.json,, make sur you add -p $PORT at the start script. "scripts": { "start": "next start -p $PORT" }