Home / Localhost / localhost:3000

localhost:3000 (React, Next.js, Express): not working and fixes

Port 3000 is the default for React, Next.js, Express, Rails and Grafana. How to open it, and fix refused to connect and port in use.

Open this address: http://localhost:3000This opens on your own computer. It only works if the program is running.

localhost:3000 is the address of an app running on port 3000 of your own computer. It is the default port for React, Next.js, Express and Rails, so when it will not open, the app is usually not running yet.

localhost:3000 in a browser address bar reaches port 3000 on your computer, where React, Next.js, Express is running

What runs on localhost:3000

Commands to start and test port 3000

React (Create React App)
npm start
Next.js and most Node templates
npm run dev
Rails
rails server
Another port, Mac/Linux
PORT=3001 npm start
Another port, Windows PowerShell
$env:PORT=3001; npm start

Find what is using port 3000

Run these in a terminal on your computer. Nothing is sent to this site.

If localhost:3000 will not open

EADDRINUSE: address already in use :::3000
Another program, often an old dev server in a forgotten terminal, is on port 3000. Find it with the tool below and stop it, or start yours on another port.
Cannot GET /
Your Express app is running but has no route for /. Add app.get("/", ...) or open a route that exists.
This site can’t be reached (ERR_CONNECTION_REFUSED)
The server is not running. Start it and keep that terminal open. See the full checklist.
Works on your computer, not on your phone
Start the server on all network addresses and use your computer’s IP address. See how to open localhost from your phone.
Something is already running on port 3000
Create React App asks whether to use another port. Answer yes, or stop the old process. In Next.js, npx next dev -p 3001 uses a different port.
Cannot find module or missing scripts
Run npm install in the folder that has package.json, then npm run dev or npm start. Read which script name your package.json defines.
Blank page and no error
Open the browser console (F12) and read the first error. Then check the terminal. A crash in the terminal shows the real cause.
Vite and some new templates use 5173, not 3000
If nothing is on 3000, read the address your terminal prints. Newer Vite projects use port 5173.
Grafana asks for a login
Grafana’s default user is admin with the password admin, and it asks you to change the password after the first login. Change it before exposing the port.
Docker: nothing at localhost:3000
Publish the port with -p 3000:3000 and make the app listen on 0.0.0.0, not only on 127.0.0.1 inside the container.
localhost works in one tool but not another
localhost can resolve to the IPv6 address ::1 or the IPv4 address 127.0.0.1. If a server listens on only one of them, the other fails. Try http://127.0.0.1:PORT and http://[::1]:PORT. If one works, start the server on the address you need or use that address.

Other ports like 3000

PortUsually used by
localhost:5173Vite dev server
localhost:4200Angular dev server
localhost:5000Flask
localhost:8000Django, PHP, Python
localhost:8080Tomcat, Spring Boot, Docker
localhost:8888Jupyter Notebook
localhost:9000PHP-FPM, SonarQube

Questions about localhost:3000

What runs on localhost:3000?
Most often a React, Next.js, Express or Rails development server, or Grafana. The terminal where you started it shows which one.
How do I change the port from 3000?
Set the PORT variable when you start the app, for example PORT=3001 npm start, or change app.listen(3000) in your Express code.

Updated 2026-10-20

Free tools that help

Related pages