Why is Cursor using my port 3001 as a preview server?

my original backend server use port 3001.

but suddenly from today, when I send request to 127.0.0.1:3001 as my local,

it goes to front page in prod.

I didn’t set up anything, so I don’t understand how it could happen.

How can I set up cursor not to use 3001 as preview server?

can anyone guide how to set, or how this could happen ?

Hey, there are a couple of things worth checking:

  1. Open the Ports panel in Cursor (Terminal area > Ports tab) and see if port 3001 is listed. If it is, right-click it and remove it. This panel handles auto port forwarding and can sometimes grab ports.

  2. Check the remote.autoForwardPorts setting. If it’s enabled, Cursor might automatically detect and forward ports. Try setting it to false:

    "remote.autoForwardPorts": false
    
  3. Did you use the Agent’s Browser tool before this started? The Browser feature can open previews on local ports. If a browser session started on port 3001, it could cause a conflict.

  4. Try running lsof -i :3001 (macOS/Linux) or netstat -ano | findstr :3001 (Windows) in an external terminal to see which process is actually using that port.

Also, what Cursor version are you on, and what OS are you using? That’ll help narrow it down. Let me know what you find.

1 Like