Port 8000: Alternative HTTP / dev

Port 8000 (TCP) is used by Alternative HTTP / dev. Django and Python http.server defaults (unofficial use).

8000Port
TCPProtocol
irdmiIANA service name
DevOps & dev serversCategory

Port range

8000 is a registered port (range 1024–49151). Any user can bind to it; IANA records which service registered the number.

Security

Only open port 8000 to the hosts that need it. Prefer the encrypted variant of the protocol where one exists.

Open port 8000 in a firewall

ufw         sudo ufw allow 8000/tcp
iptables    sudo iptables -A INPUT -p tcp --dport 8000 -j ACCEPT
firewalld   sudo firewall-cmd --permanent --add-port=8000/tcp
Windows     New-NetFirewallRule -DisplayName "Alternative HTTP / dev 8000" -Direction Inbound -Protocol TCP -LocalPort 8000 -Action Allow

Check if port 8000 is open

nc -vz example.com 8000
Test-NetConnection example.com -Port 8000   # PowerShell
sudo ss -tulpn | grep ':8000 '   # what is listening locally (Linux)

Other devops & dev servers ports

Frequently asked questions

What is port 8000 used for?
Alternative HTTP / dev. Django and Python http.server defaults (unofficial use).
Is port 8000 TCP or UDP?
TCP.