ProjectStack
docker

Error starting userland proxy: listen tcp 0.0.0.0:8080: bind: address already in use

The port you're trying to publish is already being used by another process or a Docker container. Docker can't bind to the port because the OS won't allow two processes to listen on the same address and port at the same time.

Common causes

  • Another Docker container is already published on the same port — check with docker ps
  • A local service (a dev server, database, or another app) is using the port
  • A previous container wasn't properly stopped and is still holding the port
  • A system service (like a web server on port 80/443) is running on that port

How to fix it

  1. Find what's using the port: lsof -i :8080 (Mac/Linux) or netstat -ano | findstr 8080 (Windows)
  2. Stop the conflicting Docker container: docker ps, then docker stop CONTAINER_ID
  3. Map to a different host port: docker run -p 8081:8080 myimage (8081 on host → 8080 in container)
  4. Stop the conflicting local service before starting Docker

Example

$ docker run -p 8080:8080 myapp docker: Error response from daemon: driver failed programming external connectivity on endpoint myapp: Error starting userland proxy: listen tcp4 0.0.0.0:8080: bind: address already in use.

Another process is already listening on port 8080 on the host

Browse more errors

The Developer Hub covers 150+ errors across Git, npm, Node.js, Python, TypeScript, and Docker — with plain-English explanations and fix steps.