Default dev server ports: 3000, 5173, 8000, 8080 and more
Short answerMost Node frameworks default to port 3000 (Next.js, Create React App, Express examples), Vite uses 5173, Angular 4200, Astro 4321, Django 8000, Flask 5000 and Rails 3000. Many of them collide on 3000, which is the most common cause of “address already in use”.
Web frameworks
- 3000: Next.js, Create React App, Remix, Rails, most Express tutorials
- 5173: Vite (and SvelteKit, which uses Vite)
- 4200: Angular (
ng serve) - 4321: Astro
- 8000: Django (
runserver), FastAPI/uvicorn examples,python -m http.serveruses 8000 - 5000: Flask (taken by AirPlay Receiver on newer macOS)
- 8080: webpack-dev-server, many Java servers, a common fallback
- 4000: Phoenix, Jekyll
- 1313: Hugo
- 8888: Jupyter
Databases and services
- 5432: PostgreSQL
- 3306: MySQL and MariaDB
- 6379: Redis
- 27017: MongoDB
- 9200: Elasticsearch
- 5672 and 15672: RabbitMQ and its management page
Why collisions happen
Two projects that both default to 3000 can't run at once, and the second one fails. Some tools (Vite, and Next.js when you haven't set a port) pick the next free port by themselves; others stop with an error. When you run several projects at once, give each its own port.
See what's actually running
The defaults tell you what a server probably is, not what is actually listening. Portmole reads each listening process's command and project folder, so :3000 shows up as “my-app (Next.js)” instead of a bare number.
Frequently asked questions
What port does Vite use by default?
5173. If it is taken, Vite tries the next free port unless you set strictPort.
What port does Next.js run on?
3000 by default. Change it with next dev -p 3001 or the PORT environment variable.
What is port 8080 used for?
It is a common alternative HTTP port, used by webpack-dev-server, many Java servers and proxies. It needs no special rights, unlike port 80.
Skip the terminal
Portmole shows every port your Mac is listening on and closes any of them with one click. Free, signed and notarized, about 7 MB.
Download Portmole for Mac