Python / macOS Port

Troubleshooting Localhost 5000?

Developing with Flask or ASP.NET? Facing conflicts with macOS Control Center? Check your status below.

Go to http://localhost:5000 →
Kill Port 5000 Generator
npx kill-port 5000

Fixing "Port 5000" Conflicts

Port 5000 is notorious on macOS Monterey (and later) because the AirPlay Receiver uses it by default. It is also the default for Python Flask apps.

Top Issue

1. macOS AirPlay Receiver Conflict

If you are on a Mac and cannot start your Flask/React app on port 5000, it's likely the system's "AirPlay Receiver".

The Fix: Go to System Preferences > Sharing and uncheck "AirPlay Receiver". Or, turn it off to free up the port.

2. Python Flask Not Running?

Ensure your virtual environment is active and the app is running. By default, Flask runs on 5000.

export FLASK_APP=app.py
flask run

3. ASP.NET Core Dev Certs

For .NET developers, 5000 (HTTP) and 5001 (HTTPS) are standard. If connection is refused, check your HTTPS developer certificates.

dotnet dev-certs https --clean
dotnet dev-certs https --trust

What Uses Port 5000?

Developer Port Reference Guide

Frontend & Web
3000 React / Node / Default 3001 React Secondary
Backend & Infrastructure
5000 Flask / AirPlay 4000 Jekyll / Hexo
Database & Cache
3306 MySQL 5432 PostgreSQL
DevOps & Data Science
8888 Jupyter Notebook 9200 Elasticsearch 9090 Prometheus 15672 RabbitMQ UI 8500 Consul 127.0.0.1 Loopback IP