Web & Dev
Risk: Low

Port 8000 β€” Django / FastAPI / Python SimpleHTTP

Port 8000 is the default development port for Python Django (`python manage.py runserver`), FastAPI (uvicorn), and `python -m http.server 8000`.

PORT NUMBER

8000

PROTOCOL

TCP

DEFAULT PROCESS

python, uvicorn, gunicorn

FIREWALL TARGET

8000/tcp

Instant Terminal Fixes for Port 8000

macOS & Linux Terminal
1. Check who is listening on port 8000:
lsof -i :8000
2. Kill process occupying port 8000 (EADDRINUSE fix):
kill -9 $(lsof -t -i:8000)
3. UFW Firewall Allow rule:
sudo ufw allow 8000/tcp
Windows PowerShell (Admin)
1. Check listening port:
Get-NetTCPConnection -LocalPort 8000
2. Force kill process on port 8000:
Stop-Process -Id (Get-NetTCPConnection -LocalPort 8000).OwningProcess -Force
3. Docker Port Forwarding Mapping:
docker run -p 8000:8000 -d my-fastapi-app

Common Error Encountered

Error: That port is already in use by another Django or Uvicorn instance.

Security Advisory & Hardening

Django's built-in development server is not hardened for production. Never run `runserver` directly on a public internet IP.

Frequently Asked Questions

Port 8000 Questions & Answers

Common questions regarding default services, kill commands, and firewall configurations.

Port 8000 is commonly used for Django / FastAPI / Python SimpleHTTP. Port 8000 is the default development port for Python Django (`python manage.py runserver`), FastAPI (uvicorn), and `python -m http.server 8000`.