Guide

Common localhost ports and what uses them

You see localhost:8080 or a port in an error and want to know what normally lives there. This is the list of default ports for the dev servers, databases and tools Mac developers run, and the one command that says what’s actually on a port right now.

By Anmol Sethi · Updated

In short

The usual ones: 3000 (Next.js, Rails, Express, Nuxt), 5173 (Vite), 4200 (Angular), 8000 (Django, FastAPI, php artisan serve), 8080 (many Java and proxy servers), 5432 (Postgres), 3306 (MySQL), 6379 (Redis) and 27017 (MongoDB). A default is only a convention: to see what really holds a port, run lsof -nP -iTCP:<port> -sTCP:LISTEN.

Ask AIChatGPTClaudePerplexityGoogle AIGrok

What’s on a port right now

lsof -nP -iTCP:8080 -sTCP:LISTEN

Nothing printed means nothing of yours listens there. Add sudo to include processes of other users, such as system services.

Web dev servers

PortDefault for
3000Next.js, Nuxt, Rails, Create React App, many Express apps
4200Angular (ng serve)
4321Astro
5173Vite, and the frameworks on it: SvelteKit, Vue, React templates
4173vite preview
5000Flask, and AirPlay Receiver on macOS (see port 5000 on Mac)
8000Django, FastAPI (uvicorn), php artisan serve, python3 -m http.server
8080Spring Boot, Tomcat, webpack dev server, many proxies
4000Phoenix, Jekyll
1313Hugo
6006Storybook
8787Cloudflare Wrangler

Databases and queues

PortService
5432PostgreSQL (port in use?)
3306MySQL and MariaDB (port in use?); 33060 is MySQL’s X Protocol
6379Redis and Valkey (port in use?)
27017MongoDB
11211Memcached
9200Elasticsearch and OpenSearch
5672 / 15672RabbitMQ / its web dashboard
9092Kafka
8123ClickHouse (HTTP)

Tools and local services

PortTool
8081Metro, the React Native and Expo bundler
9229Node.js debugger (--inspect)
8888Jupyter Notebook
11434Ollama
8025 / 1025Mailpit and MailHog: web inbox / SMTP
9000 / 9001MinIO: API / console
4566LocalStack
54321 – 54324Supabase local: API, database, Studio, mail
7000AirPlay Receiver on macOS

These are defaults. Most tools move to the next free port when theirs is taken (Vite to 5174, Next.js to 3001), so the same project can turn up on a different port from one day to the next.

Picking a port for your own project

Pick one between 3000 and 9999 that isn’t in the lists above, give each project its own, and write it into the start script so it never changes. How to set it for each framework: change the dev server port.

The one-click way: Portlivo

Instead of guessing from a list, Portlivo shows what’s on every port on your Mac right now, in the menu bar: the project name, framework, port and how long it’s been up, with databases and Docker containers named too. Click a port to open it, copy its URL or stop it.

Questions people ask

What runs on localhost:3000?
Usually a Next.js, Rails, Nuxt or Express dev server, since all of them default to 3000. Run lsof -nP -iTCP:3000 -sTCP:LISTEN to see which.
What runs on localhost:8080?
Often a Java server such as Spring Boot or Tomcat, the webpack dev server, or a proxy. lsof -nP -iTCP:8080 -sTCP:LISTEN says which.
Why is port 5000 taken on my Mac?
AirPlay Receiver listens on 5000 and 7000. Turn it off in System Settings → General → AirDrop & Handoff, or use another port.

Try Portlivo free for 7 days. Every feature, no account.Then $8.99 once, no subscription.

Download for Mac

Still have a question?

Write to us — a real developer reads every email and replies personally.

support@portlivo.com