# Docker: Bind for 0.0.0.0:80 failed: port is already allocated

**Code:** `port is already allocated` · **Category:** Docker · **Seen on:** Docker

Another container or host process already publishes that host port.

## Meaning

Two things can’t bind the same host port. Often an old container from a previous `docker run`/compose project is still running.

## Common causes

- Old container still running
- Another compose project uses the same port
- Host service (nginx, apache, postgres) on that port

## Quick fix

1. `docker ps` and stop the container using the port
2. Change the host side of the mapping (`8080:80`)
3. Stop the host service or pick another port

## Detailed fix by platform

### Docker

1. `docker ps --filter publish=80` finds containers publishing port 80.

## How to diagnose

1. **Containers** — Which container publishes the port?
2. **Host** — Is a host process listening?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/docker/port-is-already-allocated)
