Address already in use (port already bound) - Rocketeers app

  [ Rocketeers ](/)   

[Login](https://rocketeersapp.com/login) 

 On this page

 Knowledge
---------

Address already in use (port already bound)
===========================================

### [\#Hosting](https://rocketeersapp.com/knowledge/hosting)

This error means another process is already listening on the port you tried to bind. Find what is using it and either stop that process or pick a different port.

 Published by [Mark van Eijk](https://rocketeersapp.com/author/mark-van-eijk) on June 23, 2026 · 1 minute read

1. [About the error](#content-about-the-error)
2. [Why do I see this error](#content-why-do-i-see-this-error)
3. [Solution](#content-solution)
4. [Find what's using the port](#content-find-whats-using-the-port)
5. [Stop it or kill it](#content-stop-it-or-kill-it)
6. [Or use a different port](#content-or-use-a-different-port)
7. [Crashed process, port still held](#content-crashed-process-port-still-held)

[\#](#content-about-the-error "Permalink")About the error
---------------------------------------------------------

Starting a server fails with one of these:

 ```
bind() to 0.0.0.0:80 failed (98: Address already in use)   # nginx
Error: listen EADDRINUSE: address already in use :::3000    # Node
[ERROR] Can't start server: Bind on TCP/IP port: Address already in use  # MySQL

```

Only one process can listen on a given port at a time. The bind fails because something already holds it.

[\#](#content-why-do-i-see-this-error "Permalink")Why do I see this error
-------------------------------------------------------------------------

- The service is **already running** (you started it twice).
- A previous instance crashed but didn't release the port yet.
- A **different** program is using that port (Apache holding 80 when you start nginx, another dev server on 3000).
- A `php artisan serve` or Vite process from an earlier session is still alive.

[\#](#content-solution "Permalink")Solution
-------------------------------------------

### [\#](#content-find-whats-using-the-port "Permalink")Find what's using the port

`ss` (or `lsof`) shows the process holding the port. For port 80:

 ```
sudo ss -tlnp | grep ':80'
# or
sudo lsof -i :80

```

The output includes the PID and program name, exactly what's holding it.

### [\#](#content-stop-it-or-kill-it "Permalink")Stop it or kill it

If it's a service you control, stop it properly:

 ```
sudo systemctl stop apache2     # e.g. Apache squatting on port 80

```

If it's a stray process that won't go away, kill it by PID:

 ```
kill 
# if it ignores that:
kill -9 

```

To kill whatever is on a port in one step:

 ```
sudo fuser -k 80/tcp

```

### [\#](#content-or-use-a-different-port "Permalink")Or use a different port

If you actually want both running, change the port of the one you're starting. For `artisan serve`:

 ```
php artisan serve --port=8001

```

### [\#](#content-crashed-process-port-still-held "Permalink")Crashed process, port still held

A port can stay in `TIME_WAIT` briefly after a crash. Wait a few seconds and retry, or confirm with `ss` that nothing still owns it before restarting.

### Subscribe to our newsletter

Do you want to receive regular updates with fresh and exclusive content to learn more about web development, hosting, security and performance? Subscribe now!

  Fill in your email address to receive updates  Subscribe 

#### More in [\#Hosting](https://rocketeersapp.com/knowledge/hosting)

- [How to get top processes with highest memory usage](https://rocketeersapp.com/knowledge/top-processes-memory)
- [How to get top processes with highest CPU usage](https://rocketeersapp.com/knowledge/top-processes-cpu)
- [How to add Swap Space on Ubuntu servers](https://rocketeersapp.com/knowledge/add-swap-space-on-ubuntu)
- [Disable unnecessary and unused PHP versions (FPM pools)](https://rocketeersapp.com/knowledge/disable-unused-php-fpm-pools)
- [Reclaim disk space on Ubuntu server](https://rocketeersapp.com/knowledge/reclaim-diskspace-on-ubuntu)
- [How to check Ubuntu version](https://rocketeersapp.com/knowledge/ubuntu-version)

 [View all 16 articles →](https://rocketeersapp.com/knowledge/hosting)
