Flask / UPnP / Docker Registry
What is Port 5000?
Port 5000 is used by several popular services and frameworks. Flask, the popular Python web framework, defaults to port 5000 for its development server. Docker Registry, the service for storing and distributing Docker container images, also defaults to port 5000. Additionally, ASP.NET Core development servers and Python's http.server module sometimes use this port. On macOS Monterey and later, port 5000 is used by AirPlay Receiver, which can conflict with development services. UPnP devices may also use port 5000 for their web interfaces. The versatility and popularity of this port means developers frequently encounter port conflicts and need to configure alternative ports.
Common Uses
- Flask (Python) web application development
- Docker Registry for container image storage
- ASP.NET Core development server
- UPnP device web interfaces
Technical Details
Copy-paste commands to check port 5000 (Flask / UPnP / Docker Registry) from your terminal
Test connectivity
nc -zv example.com 5000
curl -v --max-time 5 http://example.com:5000/
telnet example.com 5000
nmap -p 5000 -sV example.com
(echo > /dev/tcp/example.com/5000) 2>/dev/null && echo "open" || echo "closed"
Open port in firewall
sudo ufw allow 5000/tcp
sudo iptables -A INPUT -p tcp --dport 5000 -j ACCEPT
sudo firewall-cmd --permanent --add-port=5000/tcp && sudo firewall-cmd --reload
Security Considerations
Docker Registry on port 5000 without authentication allows anyone to push and pull container images, which can include malicious code. Always enable authentication and TLS for Docker Registry. Flask's development server is not suitable for production — use Gunicorn or uWSGI behind Nginx. Verify what service is actually running on port 5000 as multiple services claim it.
Popular Ports Reference
The most commonly used and referenced network ports