“Error: Port 1420 is already in use” during tauri dev means the Vite dev server inside your Tauri project could not bind port 1420, and because the project template sets strictPort: true, Vite stops instead of moving to 1421. Usually an earlier tauri dev run, a second Tauri project or a stray Node process still owns 1420. On Windows, Port Detective from Automata Labs shows which process and PID hold the port, so you can stop the right one instead of rebooting.
See which process owns port 1420 before you restart tauri dev again.
Get it fromMicrosoft
Why does a Tauri project use port 1420?
The number comes from the project templates, not from Tauri itself. In the create-tauri-app repository, the Vite-based templates (React, Vue and Svelte among them) ship a manifest with:
devUrl = http://localhost:1420beforeDevCommandset to your package manager’sdevscript
Their vite.config.ts matches it:
server: {
port: 1420,
strictPort: true,
host: host || false,
hmr: host ? { protocol: "ws", host, port: 1421 } : undefined,
}
The template comment explains the choice: “tauri expects a fixed port, fail if that port is not available”. Tauri opens its window at devUrl, so if Vite quietly moved to another port, the window would load the wrong address or nothing at all. Failing loudly is the intended behaviour.
Note the second number. On Tauri 2, when TAURI_DEV_HOST is set (for example when you develop against a physical phone), hot module reload uses a WebSocket on port 1421. If 1421 is taken, you get a different failure, so check both.
What does “already in use” actually mean here?
The message is Vite’s. In Vite’s source (packages/vite/src/node/http.ts), when strictPort is on, Vite tries to bind the server to the configured port. If the bind fails with EADDRINUSE, it throws Port 1420 is already in use. Without strictPort, the same situation would print “Port 1420 is in use, trying another one…” and keep going.
| What you see | What it means | Likely cause |
|---|---|---|
Error: Port 1420 is already in use | Vite could not bind 1420 and strictPort stopped it | Old dev server, second project, other app |
| Tauri window blank or “connection refused” | Vite never started, or started on another port | strictPort removed, or ports out of sync |
| Warning that 1420 is in use on a wildcard address | Something listens on 0.0.0.0 or :: for 1420, but localhost was free | A server bound to all interfaces |
That last row is newer Vite behaviour: before binding, Vite checks the wildcard addresses, and with strictPort it still tries the direct bind and only warns if that works.
How do you find what is holding 1420 on Windows?
With Port Detective
- Open Port Detective.
- Type
1420in the port lookup. - Read the process name, PID and connection state.
- If it is
node.exefrom atauri devyou started earlier, close that terminal or stop the process. If it is something you do not recognise, leave it and change your project’s port instead.
With built-in tools
netstat -ano | findstr :1420
tasklist /FI "PID eq 12345"
Replace 12345 with the PID in the last column of the LISTENING line.
| Method | Good at | Watch out for |
|---|---|---|
| Port Detective | Port to process name, PID and state in one view | Ending a process from the app is a Pro feature |
| netstat plus tasklist | No install | Two commands; pick the LISTENING line, not TIME_WAIT |
| Closing the editor | Clears terminals the editor started | Misses dev servers started in another window |
For the same pattern with other dev servers, see the port already in use guide and how to find the process using a port.
Map port 1420 to a process and PID in one lookup, then decide what to stop.
Get it fromMicrosoft
Why is an old dev server still running?
The common causes on Windows:
- The Tauri window closed but Vite did not.
tauri devstarts Vite throughbeforeDevCommand. If the CLI is killed abruptly, or the terminal is closed in an unusual way, the Node process running Vite can outlive it. - Two Tauri projects at once. Every project created from the same template wants 1420. Opening a second one while the first is running will always collide.
- A plain
npm run dev. Running the frontend on its own, outsidetauri dev, also binds 1420 because the port is set invite.config.ts. - An unrelated program. Anything can listen on 1420; it is not a reserved number.
If the lookup shows only short-lived TIME_WAIT entries and no listener, wait a moment and try again. If a LISTENING line has a PID, that process is the blocker.
What if nothing seems to be listening on 1420?
Check whether Windows has reserved a range that includes 1420:
netsh interface ipv4 show excludedportrange protocol=tcp
If 1420 falls inside one of the listed ranges, no process “owns” it in the netstat sense and there is nothing to end. Port Detective will show no owner, which is a useful answer in itself: stop hunting and change the port. Our page on excluded port ranges blocking a port explains why these ranges appear.
How do you change the port safely?
Change it in two places, and keep them identical:
| File | Setting | Example |
|---|---|---|
vite.config.ts | server.port | port: 1430 |
src-tauri/tauri.conf.json | build.devUrl | "devUrl": "http://localhost:1430" |
vite.config.ts (Tauri 2, mobile) | server.hmr.port | port: 1431 |
Keep strictPort: true. If you remove it to “fix” the error, Vite will drift to the next free port while Tauri keeps loading the old URL, which swaps a clear error for a blank window. Tauri’s own Vite guide makes the same point in its sample config: the port must match devUrl, and Tauri expects a fixed port.
If you run several Tauri apps side by side, give each one its own pair (1420/1421, 1430/1431 and so on) and commit the change so teammates get it too.
Should you free 1420 or change the port?
Free 1420 when the holder is your own leftover Vite process. Nothing else in the project needs editing.
Change the port when you regularly run two Tauri projects, when 1420 sits in a reserved range, or when the owner is a program you cannot identify. Ending an unknown process just to win a port number is the riskier choice.
Free vs Pro for this job
Free Port Detective has fewer features than Port Detective Pro. The free edition covers live socket tracking and the port lookup, which is enough to see which process and PID own 1420. One-click termination guarded by a process token, Port Guard notifications when a watched port is taken, and deeper details such as executable paths are in Pro. The Pro listing offers a free trial.
If the collision happens once in a while, Free is enough. If you switch between several Tauri, Vite and Node projects every day, Pro saves the trip back to taskkill.
Frequently asked questions
Is 1420 a special Windows or Tauri port?
No. It is the port the create-tauri-app Vite templates write into vite.config.ts and devUrl. Tauri uses whatever devUrl says.
Can I just delete strictPort?
You can, but Vite will then move to another port while Tauri keeps opening devUrl. Change both values instead.
Does this affect release builds?
No. tauri build bundles the files in frontendDist and does not start the dev server, so port 1420 only matters during development.
Is it safe to end the process holding 1420?
Only if you are sure it is your own leftover dev server. Match the PID to a terminal you started before ending it.
Try Port Detective
Get Port Detective (Free) or Port Detective Pro from the Microsoft Store. Free has fewer features than Pro, and Pro offers a free trial on its listing. Both listings require Windows 10 version 17763.0 or higher.
Find the leftover Vite server on port 1420 and get tauri dev running again.
Get it fromMicrosoft
Port Detective is a product of Automata Labs. Tauri is a trademark of its respective owner. Vite is a trademark of its respective owner. Windows is a trademark of the Microsoft group of companies.
Last updated 24 November 2026. Published by Automata Labs, a software company in Canada.