Why your phone can't open your local dev site on Windows
You type localhost:3000 on your phone and get an error. You try the PC's address instead and the page never loads. On a phone, localhost means the phone itself, and a request to the PC's address has to get past three checks: the dev server, Windows Firewall and the network between them.
This post covers each check, then shows how RepoYard's phone preview gets past them without changing the project.
The dev server has to accept requests from the network
A dev server only answers on the addresses it listens on, and some refuse requests that don't come from localhost. Vite and Next.js differ here:
| Tool | Listens on by default | To open it to your phone |
|---|---|---|
| Vite | localhost only | Start it with --host, for example npm run dev -- --host |
| Next.js | Every address (0.0.0.0) | Add the PC's address to allowedDevOrigins in next.config. Without it, Next.js blocks dev-only requests from that address. |
With the server open, find the PC's address with ipconfig (the IPv4 Address under your Wi-Fi adapter) and open http://that-address:port on the phone. The full steps are in Preview a Vite or Next.js app on your phone.
Windows Firewall has to let the connection in
The first time a program listens on the network, Windows Firewall asks whether to allow it. For a manual setup that program is node.exe. If you closed the prompt or allowed public networks only, the phone's request never reaches the server.
| Network profile | What the firewall does |
|---|---|
| Private | Lets in programs you allowed on private networks |
| Public | Blocks programs you allowed on private networks only. Windows picks this for networks it doesn't know. |
Check how Windows sees your Wi-Fi: open Settings, then Network & internet, then Wi-Fi, select your network and look at Network profile type. On a home or office network you trust, choose Private.
The phone has to reach the PC
If the server is open and the firewall allows it, the problem is usually the network or the app itself.
| What you see | Likely cause |
|---|---|
| The page never loads | The phone is on a different network, a guest Wi-Fi, or mobile data. Guest networks often keep devices apart. |
| Works at home, not at the office | The office Wi-Fi isolates devices from each other. Ask IT, or use a network you control. |
| The wrong address | A VPN, WSL or Docker adapter on the PC has its own address. Use the Wi-Fi or Ethernet one. |
| The page loads but data doesn't | The app calls an API at localhost, which on the phone means the phone. Point it at the PC's address. |
RepoYard opens it with one button
Press the phone button on a running dev server, in the board's Live list or the repo's Dev servers. Preview on a phone shows a QR code and an address on your local network. Scan it with the phone's camera.
RepoYard listens on the network itself and passes each request to the dev server on localhost. It rewrites the Host, Origin and Referer headers so Vite and Next.js see a local request. You don't add --host or allowedDevOrigins, and live reload keeps working. It shows the Wi-Fi or Ethernet address, not one from a VPN, WSL or Docker.
The firewall still asks once. This time the program is RepoYard: allow it on private networks.

See what is shared, and stop it
A shared dev server says "on network" in the Live list, and its phone button stays highlighted. Hover it to see the address again.
Sharing ends when you choose Stop sharing, or a few seconds after the dev server stops. If the dev server restarts on another port, the shared address follows it, so the phone keeps working.

What RepoYard does not do
- The preview works on your local network only. It isn't a public link for someone elsewhere.
- The address is plain http. Browser features that need https, such as the camera or service workers, may not work on the phone.
- It doesn't change your app's code, so API calls to localhost still need fixing in the app.
- It can't get past a guest or office Wi-Fi that keeps devices apart.
Try it on your own repos.
Windows 10 and 11, x64. Every feature for 7 days, then US$39.99 once. No RepoYard account needed.