Commonly Used Localhost Ports Quick Reference
A quick overview of common localhost ports in development: 5173 (Vite), 3000 (Next.js), 5432 (PostgreSQL), 6379 (Redis), and more.
During local development, different tools listen on various default localhost ports. This article summarizes common ports for quick identification of “who is running at this address.”
Web and Frontend Development Servers
| Port | Typical Use | Access Example |
|---|---|---|
| 80 | Default HTTP for Apache, Nginx, IIS | http://localhost |
| 443 | HTTPS | https://localhost |
| 3000 | Next.js, Express, NestJS, Create React App | http://localhost:3000 |
| 4173 | Vite Preview (vite preview) | http://localhost:4173 |
| 4321 | Astro Development Server | http://localhost:4321 |
| 5173 | Vite Development Server (most commonly used) | http://localhost:5173 |
| 8080 | Backup Web, Tomcat, some Java applications | http://localhost:8080 |
| 8888 | Default for MAMP, Jupyter, etc. | http://localhost:8888 |
| 4200 | Angular CLI (ng serve) | http://localhost:4200 |
Backend and Scripting Languages
| Port | Typical Use |
|---|---|
| 5000 | Default for Flask |
| 8000 | Django, php -S built-in server, Uvicorn (configurable) |
| 8080 | Spring Boot (configurable), common backup for Go |
| 9000 | PHP-FPM (FastCGI, not directly accessed by browsers) |
Databases and Caching
| Port | Service | Connection Example |
|---|---|---|
| 3306 | MySQL / MariaDB | mysql -h localhost -P 3306 |
| 5432 | PostgreSQL | postgresql://localhost:5432/db |
| 6379 | Redis | redis://localhost:6379 |
| 27017 | MongoDB | mongodb://localhost:27017 |
Other Common Ports
| Port | Use |
|---|---|
| 1337 | Default for Strapi |
| 8081 | Expo Metro Bundler |
| 19000 | Expo Dev Tools |
| 54321 | Supabase Local CLI Stack (API Gateway, etc.) |
Quick Access Ports on Homepage
The “Suggested Ports” section on our homepage lists commonly used HTTP ports: 80, 81, 8080, 8081, 8888, 8890, 8000, 8889, 7080, 3000.
How to Check Who is Using a Port
- macOS / Linux:
lsof -i :5173orss -tlnp | grep 5173 - Windows:
netstat -ano | findstr :5173
For detailed port conflict troubleshooting, see the port-conflicts article.
Summary
Remember a few high-frequency ports: 5173 (Vite), 3000 (Node Full Stack), 4321 (Astro), 8000 (Django/PHP built-in), 5432 (PostgreSQL), 6379 (Redis), 3306 (MySQL).