For developers
Open your local dev server on the phone
Publish a port from your computer, and the app or browser on the device reaches it as localhost, with hot reload.
Why: you’re building the web part of the app on your laptop and want to see it inside the real app’s WebView on a real Android, without deploying anything.
What happens
Section titled “What happens”- Connect your computer first and leave the
holtdroidclient running. - Start your dev server as usual, for example Vite on port 5173.
- The port shows up on the Computers page. Click it to publish it on your
devices; in the default Dev servers mode the client publishes servers like
node,bunorviteby itself. - On the session page, the SSH card lists the published ports.
- On the phone, open
http://localhost:5173: the page comes from your laptop.
Good to know
Section titled “Good to know”- A port is the “door number” a program listens on: your dev server listens on 5173, so it is
localhost:5173. Publishing makes the same door open on the device. - A published port goes to every device you run, including the ones you start later, and only to yours.
- Plain
http://localhostworks even if the app forbids unencrypted traffic: Android makes an exception for localhost. Other hosts still follow the app’s rules. - Hot reload works: save a file and the page on the phone updates.
- In Everything mode every listening program on your computer is published, desktop apps included. The client asks before switching to it.
If it doesn’t work
Section titled “If it doesn’t work”- The port isn’t on the Computers page: make sure the client is running and the server listens on
localhost, not only on another address. - Red port in the SSH card: nothing answers on that port on your computer. Start the server, or check the number.
- The page loads but API calls fail: the app still calls the API by its normal address. Point it at
localhosttoo, or publish the API’s port as well. - A port is skipped on emulators: a few ports are taken by the session itself (5555, 5038, 27042, 18580, 18581, 7890, 9090). Use another one.
More details: Connecting your computer.