Use your coding agent's web UI from your phone
Open a coding-agent UI or dev server on your phone through TSLink. Set up private access, verify the URL, and remove the share when done.
Last updated on
Ask your coding agent to share its dev server. TSLink returns a private https://<name>.<tailnet>.ts.net address that you open in your phone's browser. Your phone needs the Tailscale app, signed in to the same tailnet. By hand it is the same three steps: share the HTTP port, finish node enrollment, and open the exact returned HTTPS URL. This walkthrough uses a coding-agent UI or dev server on port 3000. For just report.html, use the single-file walkthrough.
To let your agent handle the share, first connect your coding agent.
Before you start
- Computer: macOS 13 Ventura or later, or Linux with a working systemd user manager, using bash or zsh. Install TSLink; these commands and fields target TSLink v0.4.0, including its running daemon. After upgrading a background installation, run
tslink installagain. Windows users should first follow the platform-specific installation steps. - App: an HTTP UI already running on an address the daemon can reach. Open
http://localhost:3000on the computer and confirm the expected app before continuing; substitute its actual port below. - Tailscale: an account with MagicDNS and HTTPS enabled, and policy allowing the phone to reach the new app node. The computer needs no separate Tailscale app; this default enrollment needs no API token or
tslink login. - Phone: iOS or Android with a browser and Tailscale installed, signed into your tailnet and connected. The phone does not need TSLink.
See first private share, Tailscale HTTPS setup and access controls.
Any agent UI or dev server that serves HTTP on a port the daemon can reach fits this workflow, such as an OpenCode, Vite or Next.js dev server. TSLink forwards requests to it; it does not start, configure or sign in to the app.
Publish the agent's running port
Use the port the app actually chose. For port 3000:
tslink share localhost:3000 --name agent-ui --jsonCapture data.name from the response: the requested name can receive a suffix. Use that actual name in every later command. Sharing can install/start TSLink's background service; it does not start the dev server. See app management and daemon lifecycle.
An agent can use CLI --json or MCP share and unshare. MCP registration/removal requires owner, including remote MCP; app-operator, people-manager and viewer cannot create or delete shares. Local stdio MCP is owner by default. CLI access uses the launching OS user's authority rather than an MCP role. See MCP setup and MCP roles.
Finish enrollment and copy the exact URL
If status is needs_login, give the returned auth_url to the owner. This is a successful pending handoff, not a working app URL. A person completes enrollment and any device approval. Then replace <returned-name> below with the saved actual name:
tslink url <returned-name> --wait --json
tslink status --urls --name <returned-name> --jsonBare --wait waits up to 30 seconds. In the status response, require data.runtime_snapshot.exact: true and the selected service's endpoint.state: "exact"; inspect its runtime_state and errors too. These are the v0.4.0 verification fields, not a substitute for opening the app from the phone.
The address can be a gateway route such as https://home.<your-tailnet>.ts.net:8443/ or an app-node URL such as https://<app-node>.<your-tailnet>.ts.net. This is a schematic, not command output: the runtime hostname can differ from the requested name. Copy the exact URL returned by url; the https://login.tailscale.com/... enrollment address is for the owner. See enrollment and URL retrieval and Tailscale tsnet authentication.
Open it on your phone
On the phone, confirm Tailscale is connected, open the copied URL in the browser, and sign in to the app if it asks. Confirm a familiar page or item, then check a live update if the app provides one. Bookmark this exact address after it works. A daemon process or a healthy backend alone does not verify the phone path.
New installations default to the home gateway, where new apps allow the owner/admins and explicitly granted people. Existing installations keep their mode and access rules. To limit it to your own login, instead of the share command, register an unused name with tslink add agent-ui --proxy localhost:3000 --allow you@example.com, replacing the login with your actual Tailscale account; retrieve that name's URL as above. Ordinary add replaces an existing service, so do not use it to amend a share without retaining its complete settings. Alternatively, pass allow to the MCP share tool. A recipient outside your tailnet also accepts the app-node invitation. See people sharing, Tailscale for iOS, Android and device sharing.
Check login, live updates, and host settings
Keep the UI's own authentication and tool permissions. TSLink proxies the app's functions; it does not authorize another MCP server's tools. See MCP hosting and access boundaries.
TSLink's HTTP proxy forwards WebSocket upgrades, and its upload timeout does not cut off streamed responses such as server-sent events, so hot reload and live agent output can reach the phone. By default share rewrites the Host header to the local target and leaves the browser's Origin unchanged. If the app checks Origin, or checks allowed hosts when you use --preserve-host, allow the exact URL from tslink url. Open the app from that URL on the phone and confirm login, live updates and layout before you rely on it. See reverse proxy, app recipes and WebSockets and request limits and streams.
If the phone cannot finish the flow
Run tslink doctor --json on the computer and follow error.next on failed JSON commands. These five checks distinguish enrollment, the backend and the phone path:
| Symptom | Check and recovery |
|---|---|
needs_login, an auth_url, or pending enrollment | The share is saved but human enrollment is pending. Open the returned authorization URL, finish any administrator device approval, then rerun url for the returned name. Do not send auth_url as the app address. |
url is still pending after the wait, or the status endpoint is not exact | Inspect tslink status --urls --json for data.pending_logins and finish the relevant app enrollment. Recheck the saved name and current daemon snapshot before copying an address. |
Health is degraded, down or unknown | Inspect health.last_error, status_code when present, and doctor. Open the backend locally again and fix its process or port. Three consecutive unreachable checks become down; an unexpected HTTP response stays degraded. An authenticated app's expected 401/403 may need a readiness path or a deliberate tslink health set <returned-name> --path /health change, only if that endpoint exists. unknown is missing/stale evidence. |
| Exact URL works elsewhere but the phone cannot reach it, or access is denied | Confirm the phone's Tailscale connection and account, tailnet policy, and any configured --allow or people grant. An outsider must accept the app's device share. Backend health does not prove those permissions or the phone connection. |
| Page loads but sign-in or live updates fail | Keep the app's authentication and check its external URL, allowed Host and exact Origin settings. Confirm WebSockets/SSE in the actual app; do not disable its checks or use a wildcard Origin. |
Health semantics and recovery: TSLink health guide.
Remove the preview
Remove only the returned name:
tslink remove <returned-name> --jsonThe MCP equivalent is unshare. Removal deletes registration; the daemon reconciles and closes its node. Remote device deletion depends on credentials and ownership proof. It does not stop the agent/backend, uninstall the daemon or recall downloads. Stop the dev server separately if desired and inspect the cleanup result. See app removal and MCP roles.
This private share has no access deadline from share itself. For one person until a deadline, continue with people sharing; keep the app's own login and tool permissions in either workflow.
Official Tailscale sources linked above: accessed 2026-10-07. TSLink behavior: v0.4.0.
See also: duration syntax explains how to choose an access window; portal access requests covers eligible visitors requesting access to a private app; Vite "Blocked request" on a ts.net host explains the Host check error and its fix; several apps on one machine gives each dev server its own name.
App recipes
Share a report, preview a local web app, connect an agent, and access raw TCP over a tailnet
HTML report with a deadline
Share one HTML report privately with named Tailscale users, with access that expires at a deadline. Learn file limits, revocation, and the separate browser guest-link option.