Skip to content
MtrXTools

bind() to 0.0.0.0:80 failed (98: Address already in use)

Another process already uses the port

Seen in nginx start-up ([emerg] in the error log or systemctl status)

nginx could not start listening because another process, or another nginx, already holds that address and port.

Common causes

  • Apache, another web server or a container is already bound to port 80 or 443.
  • An old nginx master process is still running.
  • Two listen directives in the config overlap (for example listen [::]:80 ipv6only=off alongside listen 80).

How to fix it

  1. Find the owner: sudo ss -ltnp 'sport = :80' (or lsof -i :80).
  2. Stop or reconfigure the other service (systemctl stop apache2), or change its port.
  3. Remove duplicate listen lines, then nginx -t and start nginx.

Got a different message? Paste it into the error explainer.

Related errors

All 19 Web servers & certificates errors