What Is Using Port 5000 on Mac? (It's AirPlay Receiver)
macOS Monterey and later reserve ports 5000 and 7000 for AirPlay Receiver. Here's how to confirm it and fix the conflict with your dev server.
You go to start your Flask app (or another dev server that defaults to port 5000) and immediately get:
Error: listen EADDRINUSE: address already in use :::5000
You didn’t start anything else. The culprit is macOS itself.
AirPlay Receiver Is Using It
macOS Monterey (12), released in late 2021, added AirPlay Receiver as a built-in feature. It lets your Mac accept AirPlay streams from an iPhone or another Mac, the same way an Apple TV does.
The catch: AirPlay Receiver binds ports 5000 and 7000 automatically when it’s enabled. The process that owns those ports is ControlCenter, part of macOS. This has been catching developers off guard ever since Monterey shipped.
If your Mac upgraded from Big Sur to Monterey or later, AirPlay Receiver was silently enabled for you. Port 5000 went from being freely available to being permanently reserved.
How to Confirm It
Run this in Terminal:
lsof -i :5000
If AirPlay Receiver is the culprit, you’ll see output like this:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ControlCe 423 aaron 33u IPv4 0xabcd1234 0t0 TCP *:5000 (LISTEN)
ControlCe 423 aaron 34u IPv6 0xabcd5678 0t0 TCP *:5000 (LISTEN)
ControlCe is a truncated display of ControlCenter. If you see it owning port 5000, AirPlay Receiver is the cause.
Fix 1: Disable AirPlay Receiver
The fastest fix is turning off AirPlay Receiver entirely. The path depends on your macOS version:
macOS Ventura, Sonoma, or Sequoia: System Settings > General > AirDrop & Handoff > AirPlay Receiver (toggle off)
macOS Monterey: System Preferences > Sharing > AirPlay Receiver (uncheck)
Once you toggle it off, ports 5000 and 7000 are released immediately. No restart required. You can start your dev server right away.
Fix 2: Change Your App’s Port
If you use AirPlay and want to keep it running, point your dev server at a different port instead.
Flask:
flask run --port 5001
Next.js:
PORT=5001 next dev
Python http.server:
python -m http.server 5001
Any unused port above 1024 works. Port 5001 is the most common fallback for Flask specifically, since it’s the next one up and well outside AirPlay’s range.
What About Port 7000?
Same cause. ControlCenter also binds port 7000 when AirPlay Receiver is enabled. If you see a conflict on port 7000, the fix is identical: disable AirPlay Receiver in System Settings (or Preferences), or change your app’s port.
Running lsof -i :7000 will show the same ControlCe process if AirPlay Receiver is active.
Using Portie
If you’d rather skip Terminal entirely, Portie shows every port open on your Mac with its owning process, updated automatically every 3 seconds. You can see ControlCenter owning 5000 and 7000 the moment you open the app, without typing a single command.
The live port list is free. The $8.99 one-time unlock adds process kill and remote port scanning, which is useful if you want to terminate a stuck process directly from the list.