What’s running on port 3000 on my Mac?
Port 3000 is the most crowded default in web development. If EADDRINUSE :::3000 just stopped your server, here’s how to see which of the usual suspects owns it and how to move either one.
Updated
Commonly used by
- Next.js
next devandnext startlisten on 3000 unless you pass-por setPORT. - Create React App
react-scripts startdefaults to 3000 and reads thePORTenvironment variable. - Ruby on Rails
bin/rails server(Puma) serves on 3000, bound to localhost in development. - Nuxt
nuxi devuses 3000, or--port/ thePORTenv var. - GrafanaA Homebrew or Docker Grafana serves its web UI on 3000.
Check what’s on port 3000
lsof -nP -iTCP:3000 -sTCP:LISTEN
A node command means Next.js, Create React App, Nuxt, Remix or an Express app. ruby means Rails (Puma). grafana or com.docker.backend means Grafana or some other container. To tell several Node projects apart, print the full command line and working folder:
ps -o pid,etime,command -p <PID>
lsof -a -p <PID> -d cwd -Fn | tail -1
Or with Stat Space installed:
statspace port 3000
Free it
If it’s a forgotten server, stop it with kill <PID>. Give it a few seconds to shut down; use kill -9 <PID> only if it ignores you. Docker containers need docker stop <name> instead, because killing com.docker.backend takes every container down with it. The full walkthrough is in how to kill a process on a port.
Or move your app
| Tool | Change the port |
|---|---|
| Next.js | next dev -p 3001 or PORT=3001 npm run dev |
| Create React App | PORT=3001 npm start, or PORT=3001 in .env |
| Rails | bin/rails server -p 3001 |
| Nuxt | nuxi dev --port 3001 |
| Express | app.listen(process.env.PORT || 3001) |
| Grafana | http_port = 3001 under [server] in grafana.ini |
Recent Next.js versions don’t fail when 3000 is taken: they quietly move to 3001. That keeps you working but hides the leftover server, so it pays to check what’s holding 3000.
Who can reach it
Look at the NAME column. 127.0.0.1:3000 is local only. *:3000 means every device on your network can open it. Next.js and Create React App bind to all interfaces by default, so on shared Wi-Fi your work-in-progress app and its API routes are reachable by others. Use next dev -H 127.0.0.1 or HOST=127.0.0.1 for CRA when you don’t need phone testing. More in dev server exposed to the network.
Seeing it live
Stat Space lists port 3000 with the framework it detected, the project folder, the launcher that started it (Terminal, VS Code, Cursor, Claude Code, Docker) and how long it’s been up. A *:3000 binding gets a warning, and stopping it asks first.
Questions
Why is port 3000 in use when I closed my terminal?
Closing a terminal tab doesn't always stop its children. A dev server started by an editor task, npm run dev &, or an AI agent can keep running with launchd as its parent. Find it with lsof -nP -iTCP:3000 -sTCP:LISTEN and stop it with kill <PID>.
How do I run Next.js on a different port?
Run next dev -p 3001, or PORT=3001 npm run dev. To make it permanent, change the script in package.json to "dev": "next dev -p 3001".
Can I make Rails and Next.js share port 3000?
No, only one process can listen on a given address and port. Give one of them another port, for example bin/rails server -p 3001, and point the frontend's API URL at it.
Know what your Mac is doing, without adding to it.
Free, no account. Pro is $9.99 once for the first 100 buyers.