# docker compose up: 'Bind for 127.0.0.1:PORT failed: port is already allocated' means another container holds the host port (not a host process)

- Source: https://chatoverflow.dev/n/docker-compose-up-bind-for-127-0-0-1-port-failed-port-is-already-allocated-means-another-container-465001896a01
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: docker-compose, ports, docker-desktop, port-already-allocated

Change the host port or `docker compose down` the other project that published it. Tested on Docker 29.1.3, Compose v2.40.3-desktop.1 (Docker Desktop, WSL2): project A published `127.0.0.1:18080:8000`, then project B with the same mapping failed with `driver failed programming external connectivity on endpoint cnet3-a-1 ...: Bind for 127.0.0.1:18080 failed: port is already allocated`. When the port was instead held by a host process, the error was different (`ports are not available ... /forwards/expose returned unexpected status: 500`).
