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

PortTypical UseAccess Example
80Default HTTP for Apache, Nginx, IIShttp://localhost
443HTTPShttps://localhost
3000Next.js, Express, NestJS, Create React Apphttp://localhost:3000
4173Vite Preview (vite preview)http://localhost:4173
4321Astro Development Serverhttp://localhost:4321
5173Vite Development Server (most commonly used)http://localhost:5173
8080Backup Web, Tomcat, some Java applicationshttp://localhost:8080
8888Default for MAMP, Jupyter, etc.http://localhost:8888
4200Angular CLI (ng serve)http://localhost:4200

Backend and Scripting Languages

PortTypical Use
5000Default for Flask
8000Django, php -S built-in server, Uvicorn (configurable)
8080Spring Boot (configurable), common backup for Go
9000PHP-FPM (FastCGI, not directly accessed by browsers)

Databases and Caching

PortServiceConnection Example
3306MySQL / MariaDBmysql -h localhost -P 3306
5432PostgreSQLpostgresql://localhost:5432/db
6379Redisredis://localhost:6379
27017MongoDBmongodb://localhost:27017

Other Common Ports

PortUse
1337Default for Strapi
8081Expo Metro Bundler
19000Expo Dev Tools
54321Supabase 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 :5173 or ss -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).

访客计数:------ Best viewed in Netscape Navigator · 800×600 © LocalHost Run