Home / Localhost / Port already in use

Port already in use (EADDRINUSE): find and stop the program

Find which program holds a port on Windows, macOS or Linux, then stop it or use another port.

Two programs try to use the same port, but only one can, so the other fails with address already in use

An "address already in use" or EADDRINUSE error means another program already holds the port you asked for. Find the program, stop it, or start your app on a different port.

What to do, step by step

  1. Enter your port in the tool below and run the first command.
  2. Find the PID, which is the process number.
  3. Check what the program is before stopping it.
  4. Stop it with the second command, or just start your app on another port.

Find what is using port 8080

Run these in a terminal on your computer. Nothing is sent to this site.

Common causes

The usual culprits
An old dev server still running in another terminal, a Docker container, or a second copy of your app.
macOS, port 5000 or 7000
AirPlay Receiver uses them. Turn it off in System Settings.
Windows, port 80, PID 4
PID 4 is Windows itself. IIS or the World Wide Web Publishing Service is using the port. Stop it in Services, or use another port.
Nothing found but the error stays
Run the command as administrator or with sudo. Another user’s program is hidden otherwise.

Questions about Port already in use

What does EADDRINUSE mean?
The port you want is already used by another program. Stop that program or choose another port.
How do I kill the process on a port?
Find the PID with netstat (Windows), lsof (macOS) or ss (Linux), then stop it with taskkill or kill.

Updated 2026-10-02

Free tools that help

Config generators for this

Related pages