Toupas

Blog · 12 November 2026

How to open your localhost app on your phone

Your app runs on your laptop at localhost:3000. You type the same address into your phone, and it doesn't load.

Nothing is broken. localhost always means "this device", so your phone is looking for the app on itself, finds nothing and gives up. To reach your laptop, the phone needs a different address. There are three ways to give it one.

On the same Wi-Fi, a phone can open the laptop's own address. A tunnel lends it a temporary public link. Once the app is live, anyone can open it from anywhere.

Way 1: Use your laptop's address on the same Wi-Fi

This is the quickest, and it's free. It only works while your phone and laptop are on the same Wi-Fi.

1. Find your laptop's address on the network. It looks like 192.168.1.23.

2. Make your app listen to the network, not just your laptop. Many tools only listen to your own computer by default.

Your appStart it like this
Vite or React with Vitenpm run dev -- --host
Next.jsnpm run dev (it prints a Network address)
Astronpm run dev -- --host
ExpressUsually fine as it is
FastAPIuvicorn main:app --host 0.0.0.0 --port 8000
Flaskflask run --host=0.0.0.0

Many of these print the address to use, often labelled Network.

3. Open it on your phone. Type http://192.168.1.23:3000, with your laptop's address and your app's port. If your computer asks whether to allow incoming connections, say yes.

What usually goes wrong on the phone

The page loads, but something doesn't work. These are the usual reasons:

Way 2: Use a tunnel

A tunnel gives your laptop a temporary public link, so your phone can open it from anywhere, even on mobile data. It also gives you https, which fixes the camera problem.

It's good for testing for an afternoon. It stops when your laptop sleeps, and free links often change each time. We compared tunnels with making an app live.

Way 3: Make it live

If you want to keep opening it on your phone, or send it to someone, put the app on a computer that's always on. That's what deploying means. You get a link that works on any phone, on any network, with your laptop closed.

With Toupas, paste this into your coding agent (Claude Code, Codex or Cursor):

Make this app live with Toupas. Instructions: https://toupas.com/agents.md

You get a link like yourapp.toupas.app with https included. Every new app is free for 30 days, with no card. Our guide to deploying an app from localhost explains what happens along the way.

Building a phone app?

If you're building an app for the App Store or Play Store, with React Native, Expo or Flutter, this is a different job. Those apps are published through Apple and Google. Toupas makes websites and web apps live, including the server and database a phone app talks to. A web app also works well on phones, and people can add it to their home screen.

Questions

Why does localhost not work on my phone?

localhost means the device you're using. On your phone it points to the phone, not your laptop. Use your laptop's network address on the same Wi-Fi, a tunnel, or a live link.

How do I open localhost:3000 on another device?

Find your computer's network address, such as 192.168.1.23, and make your app listen to the network (for Vite, npm run dev -- --host). Then open http://192.168.1.23:3000 on a device on the same Wi-Fi.

Why does my app open on my phone but show no data?

The page probably still fetches from a localhost address, which on your phone points to the phone. Use a relative address like /api, or the laptop's network address.

How do I test my app on my phone away from my Wi-Fi?

Use a tunnel for a quick test, or make the app live so it has a link that works anywhere.

Paste this into your coding agent

Make this app live with Toupas. Instructions: https://toupas.com/agents.md

Claude CodeCodexCursor

Keep reading