Docker: Bind for 0.0.0.0:80 failed: port is already allocated
Another container or host process already publishes that host port.
Seen on:
Docker
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
docker psand stop the container using the port- Change the host side of the mapping (
8080:80) - Stop the host service or pick another port
Detailed fix by platform
Docker
docker ps --filter publish=80finds containers publishing port 80.
How to diagnose
- Containers — Which container publishes the port?
- Host — Is a host process listening?
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026