How to Preview a Dev Server from Your iPhone Without Deploying
The agent says it built the page. You are on a phone, the dev server is bound to 127.0.0.1 on a machine somewhere else, and the options are all bad: bind it to 0.0.0.0 and expose an unauthenticated dev server to the internet, sign up for a tunnelling service, or deploy something you have not looked at. None of that is necessary. You already have an authenticated, encrypted connection to that machine: the SSH session you are typing into. Here is how to use it to actually look at the thing.
Written by the GateShell team at Hefty Innovations
Step by step
- 1
Start the dev server as you normally would
Bound to loopback is fine, and is what you want: 127.0.0.1:3000, localhost:5173, whatever your framework defaults to. There is no need to change the bind address, and no reason to: leaving it on loopback is precisely what keeps it off the public internet. If your agent started it for you, it is already running.
- 2
Open App Preview
From the connected server's terminal menu, open App Preview. It is also available as an Overview quick action if you prefer it there. It uses the port-forwarding entitlement, so it is a Pro feature.
- 3
Pick the port from the list, or type it
GateShell asks the server which IPv4 TCP ports are actually listening, using ss, or lsof where ss is unavailable. You get the real list rather than a guess, which helps when you have three dev servers up and cannot remember which framework took which port. Common non-web infrastructure ports such as SSH, mail, databases and Redis are filtered out of the list to keep it readable. That filtering is based on port number, not on probing, so a non-web service on an unusual port can still appear. You can also type a port directly if what you want is not listed.
- 4
Look at it
GateShell opens an ephemeral listener on the device and forwards it to the server's 127.0.0.1 on that port, through the SSH connection already authenticated and open. The app renders in an embedded browser. Nothing was published: no public bind, no third-party tunnelling service, no DNS record, no deploy. The traffic goes over the same encrypted connection as your terminal.
- 5
Iterate without leaving the app
Reload as the agent keeps working, and use Ports to go back to the listing and switch to a different service. Returning to the list stops the active tunnel. This is the loop worth having on a phone: ask for a change, watch it get made, reload, look. Each step is a tap rather than a context switch.
- 6
Stop when you are done
Stop, dismissing the preview, or disconnecting the SSH session all close the local listener and the forwarded sockets. Nothing is left listening on your device and nothing stays open on the server. Worth knowing rather than assuming: the tunnel's lifetime is tied to the session, by design.
Frequently asked questions
Is my dev server exposed to the internet?+
No. Your app stays bound to loopback on the server, exactly as it was. GateShell forwards a local port on your device to the server's 127.0.0.1 through the existing SSH connection, the same mechanism as ssh -L. Nothing binds to a public interface, nothing passes through a third-party service, and no traffic leaves the encrypted session.
How is this different from ngrok or a tunnelling service?+
Those publish your local app to a public URL through a third party's infrastructure, which means an account, someone else's servers in the path, and a URL anyone who learns it can reach. This uses the authenticated SSH connection you already have. There is no account, no third party, and no publicly reachable address at any point.
Does it work with HTTPS, or an IPv6-only app?+
Not currently. App Preview handles HTTP apps reachable over IPv4 loopback. An HTTPS-only dev server or one bound exclusively to IPv6 is outside what this version supports. Most framework dev servers default to HTTP on IPv4 loopback, which is the case this is built for.
Why is my app's port not in the list?+
Two common reasons. The list is filtered to hide privileged and well-known non-web ports, so a service on an unusual port may be excluded; type the port in manually. Or the app is bound only to a specific external interface rather than loopback or 0.0.0.0, in which case the forward to 127.0.0.1 will not reach it.
Will my login session persist between previews?+
No. The preview browser uses an ephemeral cookie store and keeps navigation within the preview origin, so each session starts clean and external authentication or redirect flows are not supported. That is a deliberate boundary rather than an oversight. It keeps the preview a preview.
What happens if my phone sleeps mid-preview?+
iOS suspension can interrupt the forwarding. Reopen App Preview after reconnecting and it will re-establish. If you are running a long agent task alongside it, having the work inside tmux means the interruption costs you the preview, not the job.
Try it in GateShell
GateShell is a zero-backend SSH client for iPhone, iPad, and Mac, with no vendor cloud, no accounts and no telemetry. Everything above works out of the box.
Guide reflects GateShell's shipped features as of September 2026. Steps assume basic familiarity with SSH and the command line; server-side commands may vary by distribution. All product names, logos, and brands are property of their respective owners.