Skip to main content
PORT 5000 / TCPDev & LocalhostExposure Risk: Medium

Port 5000: Flask / .NET / AirPlay — Python Flask, ASP.NET Core, Docker Registry & macOS AirPlay

Used by Python Flask, Docker private registries, and macOS ControlCenter (AirPlay Receiver). On macOS, disable AirPlay Receiver if port 5000 is blocked.

Default Service
Flask / .NET / AirPlay
Process: python / ControlCenter
Transport Protocol
TCP
IANA Registered Port 5000
Docker Port Flag
-p 5000:5000
Container to Host Mapping

How to Check & Kill Process on Port 5000 (EADDRINUSE Fix)

macOS & Linux (lsof / kill)
# Find process using port 5000
sudo lsof -i :5000

# Instantly kill process on port 5000
lsof -ti:5000 | xargs kill -9
Windows (PowerShell & CMD)
# Find PID listening on port 5000
netstat -ano | findstr :5000

# Force kill by PID
taskkill /PID <PID_NUMBER> /F
Cross-Platform Node.js One-Liner
# Kill port 5000 via npx
npx kill-port 5000

# Or diagnose via Castov CLI
npx castov fix "EADDRINUSE :::5000"
Linux Firewall (UFW) & Connectivity Test
# Test if port 5000 is reachable
nc -zv localhost 5000

# Allow or deny port 5000 in UFW
sudo ufw allow 5000/tcp

Frequently Asked Questions about Port 5000

What is Port 5000 used for?

Port 5000 is the standard network port for Flask / .NET / AirPlay (Python Flask, ASP.NET Core, Docker Registry & macOS AirPlay) operating over TCP. The typical system daemon or process is python / ControlCenter.

How do I kill a process running on Port 5000 (EADDRINUSE)?

On macOS and Linux, run: lsof -ti:5000 | xargs kill -9 (or npx kill-port 5000). On Windows PowerShell/CMD, run: netstat -ano | findstr :5000 and then taskkill /PID <PID> /F.

Is it safe to expose Port 5000 to the internet?

Port 5000 has a Medium security risk profile. Used by Python Flask, Docker private registries, and macOS ControlCenter (AirPlay Receiver). On macOS, disable AirPlay Receiver if port 5000 is blocked.

Other Common Network Ports