localhost:5173: what runs on it and how to open it
Port 5173 is Vite’s default. How to open it, change the port and fix connection problems.
Open this address: http://localhost:5173This opens on your own computer. It only works if the program is running.
localhost:5173 is where the Vite development server runs by default. If the page does not load, check the terminal, because Vite prints the exact address it is using.
What runs on localhost:5173
- Vite dev server for React, Vue, Svelte and plain JavaScript projects
Commands to start and test port 5173
npm run devnpm run dev -- --port 5174npm run dev -- --hostFind what is using port 5173
Run these in a terminal on your computer. Nothing is sent to this site.
If localhost:5173 will not open
- Vite started on 5174, not 5173
- Port 5173 was busy, so Vite picked the next free one. Open the exact address printed in the terminal.
- localhost refuses to connect but 127.0.0.1 works
- Newer Node versions can resolve localhost to IPv6 (::1). Open http://127.0.0.1:5173 or set
server.hostto"127.0.0.1"in vite.config. - Cannot open it from another device
- Add
--hostand use your computer’s IP address. See how to open localhost from your phone. - npm run dev: missing script
- Your package.json has no dev script. Check the scripts section, or you are in the wrong folder.
Other ports like 5173
| Port | Usually used by |
|---|---|
| localhost:3000 | React, Next.js, Express |
| localhost:4200 | Angular dev server |
| localhost:5000 | Flask |
| localhost:8000 | Django, PHP, Python |
| localhost:8080 | Tomcat, Spring Boot, Docker |
| localhost:8888 | Jupyter Notebook |
| localhost:9000 | PHP-FPM, SonarQube |
Questions about localhost:5173
- What is port 5173?
- It is the default port of Vite, the build tool behind many React, Vue and Svelte projects.
- Why did Vite use 5174 instead?
- Port 5173 was busy, so Vite moved to the next free port. Open the address printed in the terminal.
- Is localhost:5173 safe?
- Yes, as long as it stays on localhost. Only your own computer can reach localhost:5173. It becomes reachable from other devices only if you start the program on 0.0.0.0 or your computer's IP address. Development servers are for testing, so do not put them on the public internet.
- Can I use a different port instead of 5173?
- Yes. Most programs let you choose the port with a setting or a command option. Pick a free port above 1024 and open that number instead, for example localhost:5174.
- How do I check what is using port 5173?
- Use the port checker on this page. It shows the command for Windows, macOS and Linux and does not send anything to this site.
- Can I open localhost:5173 from my phone?
- Yes, if both are on the same Wi-Fi. Start the program so it listens on all addresses, then open your computer's IP address with :5173 on the phone. A firewall on the computer can still block it.
Free tools that help
- Common ports listSearch a list of common TCP and UDP port numbers: SSH 22, HTTP 80, HTTPS 443, MySQL 3306, PostgreSQL 5432 and more, with dev server ports.