How do I find which process is using port 3000 and free it without reboot?
#1
I’m trying to set up a local development environment for a web project and I’ve hit a wall with port conflicts. My main app server needs to run on port 3000, but another service is already bound to it, and I can’t figure out which process is holding it open or how to safely free it up without shutting down everything.
Reply
#2
I hit this last month. I ran lsof -i :3000 to see who was bound to it, got a PID, and sent TERM with kill <PID>. If it ghosted, I used kill -9 <PID>. Then I restarted the main app and it came up clean.
Reply
#3
Another time I used netstat -tulpn | grep 3000 to catch the PID, killed it, and moved the other service to 3001 so I could run the main one. It felt clunky but it worked.
Reply
#4
Be careful with kill -9; sometimes it’s a process you actually want to stop gracefully. I checked what it was with ps -fp <PID> before forcing anything.
Reply
#5
If you’re using Docker or WSL, a container or extra VM can bind that number without you realizing. Run docker ps to spot one and stop it.
Reply
#6
Which OS are you on? The exact commands differ a bit between macOS, Linux, and Windows.
Reply


[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Forum Jump: