suna icon indicating copy to clipboard operation
suna copied to clipboard

How to change default port from 3000 to another (e.g., 3005)?

Open gino8080 opened this issue 9 months ago • 2 comments

Hi! šŸ‘‹ I’m running Suna locally and I’d like to change the default port (currently 3000) to something else, like 3005, to avoid conflicts with other services on my machine.

I noticed that the port seems to be hardcoded in some parts of the code. Besides updating the docker-compose.yml, are there other places where I need to make changes?

Thanks in advance for your support! šŸ™

gino8080 avatar Jun 23 '25 07:06 gino8080

Go to suna/frontend/package.json and look for two commands under the script key. Specify the port that you want to run the front end through -p flag:

 "scripts": {
    "dev": "next dev -p 3005",
    "start": "next start -p 3005",
  },

bytrangle avatar Jun 23 '25 13:06 bytrangle

You can refer the official Next.js documentation

next dev -p 3005

or

PORT=3005 next dev

mateonunez avatar Jun 26 '25 10:06 mateonunez