#ports

1 messages · Page 1 of 1 (latest)

covert cargo
#

what ports does vercel allow my nextjs app to be on?

onyx flameBOT
#

Hi @covert cargo. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Next.js 11 supports the PORT environment variable to set the port the application runs on. You can use the PORT environment variable as an alternative to -p/--port. Here's an example:

PORT=4000 next start

This command will start your Next.js application on port 4000. However, please note that this is applicable when you are running your application locally. When deploying your Next.js application on Vercel, the platform handles the port assignment and you don't need to specify it.

For more details, you can refer to the Next.js documentation (https://nextjs.org/docs/pages/building-your-application/upgrading/version-11).

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: