listen EACCES 🟩 Node.js

Error: listen EACCES: permission denied 0.0.0.0:80

Node isn’t allowed to bind that port — ports below 1024 need root on Linux/macOS, and some Windows ports are reserved.

Seen on: Node.js

Meaning

Privileged ports (80, 443) require elevated rights. On Windows, Hyper-V/WSL reserve dynamic port ranges, producing EACCES even for high ports.

Common causes

  • Binding port 80/443 as a normal user
  • Windows reserved/excluded port range
  • Another security policy blocking the port

⚡ Quick fix

  1. Use a high port (3000/8080) behind Nginx
  2. Grant the capability: sudo setcap 'cap_net_bind_service=+ep' $(which node)
  3. Windows: check reserved ranges and pick another port

Detailed fix by platform

Windows

  1. netsh interface ipv4 show excludedportrange protocol=tcp

How to diagnose

  1. Port — Which port?
  2. User — Running as root?
  3. OS — Windows reserved range?

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