Web & Dev
Risk: Low

Port 5000 β€” Flask / Python Web / Docker Registry

Port 5000 is the default port used by Python Flask, ASP.NET Core, and the official Docker Registry. On macOS Monterey and later, Apple AirPlay Receiver binds to 5000 by default.

PORT NUMBER

5000

PROTOCOL

TCP

DEFAULT PROCESS

python, flask, AirPlayXPCHelper

FIREWALL TARGET

5000/tcp

Instant Terminal Fixes for Port 5000

macOS & Linux Terminal
1. Check who is listening on port 5000:
lsof -i :5000
2. Kill process occupying port 5000 (EADDRINUSE fix):
kill -9 $(lsof -t -i:5000)
3. UFW Firewall Allow rule:
sudo ufw allow 5000/tcp
Windows PowerShell (Admin)
1. Check listening port:
Get-NetTCPConnection -LocalPort 5000
2. Force kill process on port 5000:
Stop-Process -Id (Get-NetTCPConnection -LocalPort 5000).OwningProcess -Force
3. Docker Port Forwarding Mapping:
docker run -p 5000:5000 -d registry:2

Common Error Encountered

OSError: [Errno 48] Address already in use (Often macOS AirPlay on port 5000)

Security Advisory & Hardening

On macOS, disable "AirPlay Receiver" in System Settings > Sharing if port 5000 causes conflict errors with your Python or Docker servers.

Frequently Asked Questions

Port 5000 Questions & Answers

Common questions regarding default services, kill commands, and firewall configurations.

Port 5000 is commonly used for Flask / Python Web / Docker Registry. Port 5000 is the default port used by Python Flask, ASP.NET Core, and the official Docker Registry. On macOS Monterey and later, Apple AirPlay Receiver binds to 5000 by default.