Utilo

Port 5000 Flask and AirPlay – Free, Online, Private

TCP 5000 is the IANA commplex-main port. The registry gives the service name and no description. Flask's default and the macOS AirPlay receiver both use 5000 by convention.

What listens on 5000

The assigned name is commplex-main. In the registry extract the TCP and UDP rows carry that name and no description text. Nothing about that name tells you that Python's Flask development server binds 5000, or that macOS ControlCenter binds it for the AirPlay receiver. Both of those are conventions. They collide on a Mac: a Flask app fails with address already in use, and the owner is ControlCenter. Flask speaks HTTP. AirPlay does not. A production WSGI server is not required to use 5000 and generally should not. UDP is listed for the IANA name. The two conventions people hit are TCP.

The IANA service name is commplex-main: no description text in the registry. The practical transport is TCP. The checks below use TCP. IANA may also have a UDP row for 5000. The service described here is the TCP one. A process can bind this port without being the service in the registry. The commands show who bound it. They do not prove the protocol on the wire is the one IANA named.

Service notes for port 5000

Service notes for port 5000: the IANA name is commplex-main (no description text in the registry), and the program people mean is Flask and AirPlay. TCP 5000 is the IANA commplex-main port. The registry gives the service name and no description. Flask's default and the macOS AirPlay receiver both use 5000 by convention. The Flask development server is a single-threaded debugger with an interactive console if you turned the debugger on. Do not expose it. The AirPlay listener is an Apple service on a laptop, and publishing it to a guest network is a sharing decision, not an application deploy. A container that publishes 5000 onto a cloud host is an app. Treat that app as you would any HTTP service: authentication, a real server, and 443 in front if users need it. The IANA name will show up in a scanner's label. The process name is the fact. Nothing in that paragraph applies to a different number just because the software family is similar. If your listener is not on 5000, you are on the wrong page.

On macOS, ControlCenter owns 5000 and Flask's quickstart fails. Move Flask, or stop AirPlay Receiver in Sharing settings. Another trap is a Docker mapping of 5000:5000 that looks open on the host while the app inside crashed. Another is a health check aimed at 5000 after the process manager moved the app to a socket. Another is assuming commplex-main describes either convention. It does not. Document the process you meant.

How to check whether it is open

On the machine itself, ask the kernel which socket is bound. ss and lsof do that. A firewall, a security group, and a Docker publish rule sit in front of that socket, so a listener is not the same thing as a port the internet can use. From somewhere else, nc -vz host 5000 tries a TCP handshake when the command is the TCP form. A refusal means something answered with a reset. A timeout means a filter dropped the packet or the host is unreachable. Those are different faults. lsof on 5000 names ControlCenter, Python, or docker-proxy. That name decides which of the three stories you are in. A remote probe is only meaningful if you intended to publish the port.

grep and findstr match text. A pattern of :80 also matches :8080 and :8000. The lsof and Get-NetTCPConnection forms take a numeric port and do not have that substring bug. Use them when the number is ambiguous. ss filters in the kernel with sport = :N, which is also exact. On macOS, netstat -p selects a protocol. It does not print the process the way Linux netstat -p does. lsof prints the process.

  • IANA records commplex-main and no description. Flask and AirPlay are not the registered service.
  • On a Mac, a busy 5000 is often AirPlay, not a leftover Python process.
  • The Flask debugger is not a production server.
  • UDP 5000 is not the HTTP convention.
Linuxsudo ss -lptn 'sport = :5000'
sudo lsof -nP -iTCP:5000 -sTCP:LISTEN
macOSsudo lsof -nP -iTCP:5000 -sTCP:LISTEN
netstat -anv -p tcp | grep '\.5000[^0-9]'
Windowsnetstat -ano | findstr :5000
Get-NetTCPConnection -LocalPort 5000
Remotenc -vz host 5000

Frequently asked questions

What is the IANA name?

commplex-main. The registry rows do not include a description.

Why does Flask say the address is in use on a Mac?

ControlCenter listens on 5000 for AirPlay Receiver. Pick another port, or turn the receiver off.

Is 5000 a privileged port?

No. It is in the registered range. Binding it does not require extra capability.

Should a deployed API stay on 5000?

Only behind a proxy you control. Users should get 443, and the dev server should stay on the laptop.