Docker: Bind for 0.0.0.0:80 failed: port is already allocated
Another container or host process already publishes that host port.
port is already allocatedBind for 0.0.0.0address already in use 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 not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- A server is already running. Check /tmp/pids/server.pid Rails: A server is already running (pid: 12345, file: /app/tmp/pids/server.pid). Exiting
- ACR unauthorized Azure Container Registry: unauthorized: authentication required, visit https://aka.ms/acr/authorization (AKS ErrImagePull 401)
- bind() failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Most viewed in Docker
- docker-credential-desktop error getting credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH
- pull access denied pull access denied for image, repository does not exist or may require 'docker login'
- lookup registry-1.docker.io: no such host dial tcp: lookup registry-1.docker.io: no such host / Temporary failure in name resolution during docker build
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 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.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 14 Oct 2026