What’s running on port 1420 on my Mac?
If you’ve never heard of port 1420, you’re probably building a Tauri app. Its Vite template pins the frontend to 1420 with strictPort, so a leftover dev server stops tauri dev cold.
Updated
Commonly used by
- Tauri (create-tauri-app, Vite templates)vite.config sets
server: { port: 1420, strictPort: true }; Tauri loads it fromdevUrl. - Tauri HMRWhen
TAURI_DEV_HOSTis set (mobile dev), Vite’s HMR socket uses 1421.
The error
error when starting dev server:
Error: Port 1420 is already in use
Vite refuses to pick another port because the template sets strictPort: true. Something is still on 1420.
Find it
lsof -nP -iTCP:1420 -sTCP:LISTEN
ps -o pid,ppid,etime,command -p <PID>
You’ll usually see node …/vite from an earlier tauri dev (or npm run tauri dev) that outlived its window. The parent PID tells you if its terminal is still around; 1 means it’s an orphan. Stop it:
kill <PID>
With Stat Space: statspace port 1420, then statspace kill 1420.
Change the port
Tauri needs to know where the frontend is, so change both files to the same number.
In vite.config.ts:
server: {
port: 1430,
strictPort: true,
}
In src-tauri/tauri.conf.json (Tauri 2):
"build": {
"devUrl": "http://localhost:1430"
}
Tauri 1 calls the same setting build.devPath. If you only change Vite, the window opens blank or shows a connection error, because it’s still loading 1420.
Exposure
The template binds Vite to localhost unless TAURI_DEV_HOST is set. That variable is set by tauri android dev and tauri ios dev so a phone can reach your Mac, and then Vite listens on your LAN address. That’s expected during mobile work, but don’t leave it running on shared Wi-Fi. More in dev server exposed to the network.
Seeing it live
Stat Space shows 1420 as a Vite server with its project folder and who started it, so a stray one from yesterday’s session stands out. Leftovers whose parent is launchd are also flagged as orphans you can clear in one go.
Questions
Why does Tauri use port 1420 instead of Vite's 5173?
The create-tauri-app templates pick a fixed, unusual port so the Rust side always knows where the frontend is. That's why strictPort is on: if Vite silently moved to 1421, the Tauri window would load nothing.
What is the process on 1420 if no Tauri window is open?
Usually the Vite server from a tauri dev run that didn't shut down cleanly, for example after the Rust build panicked or the terminal was closed. It's a node process with vite in its command line.
Can I run two Tauri projects at once?
Yes, but give the second one its own port in both vite.config and tauri.conf.json, for example 1430.
Know what your Mac is doing, without adding to it.
Free, no account. Pro is $9.99 once for the first 100 buyers.