port is already allocated Docker Origin: Platform & cloud OSI layer 7 · Application Last updated 14 Oct 2026

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

Another container or host process already publishes that host port.

Exact message you may see port is already allocatedBind for 0.0.0.0address already in use
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

  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?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

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 (Ruby / Rails)A server is already r…ACR unauthorized — Azure Container Registry: unauthorized: authentication required, visit https://aka.ms/acr/authorization (AKS ErrImagePull 401) (Azure)ACR unauthorizedbind() failed (98: Address already in use) — nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) (Linux)bind() failed (98: Ad…Cloud NAT — Cloud NAT: OUT_OF_RESOURCES dropped connections (port exhaustion) (Google Cloud / Firebase)Cloud NATConflict container name — Conflict. The container name "/x" is already in use by container … (Docker)Conflict container na…Container failed to start — Cloud Run: The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable (Google Cloud / Firebase)Container failed to s…daemon — Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? (Docker)daemonEADDRINUSE — Error: listen EADDRINUSE: address already in use :::3000 (Node.js)EADDRINUSEport is a…

Explore the map of this error Full error map →

🧠 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.