Expose a tmux session as a mobile-friendly web terminal over your Tailscale network with full PWA support.
- tmux installed
- Tailscale configured with HTTPS enabled (
tailscale cert) - remobi installed (
npm install -g remobi)
remobi serveThis bundles the browser client in memory, starts remobi's built-in HTTP and WebSocket server, and spawns a local PTY-backed terminal session on :7681 with full PWA support.
By default remobi serve binds to 127.0.0.1, so it is not exposed on your LAN. Tailscale Serve is the thing that publishes it.
tailscale serve --bg 7681Your terminal is now available at https://<your-machine>.<tailnet>.ts.net. If you publish remobi behind a path prefix instead of the root, start remobi with --base-path /that-prefix so the WebSocket and PWA URLs stay aligned with the external URL.
On mobile, tap Add to Home Screen for a standalone app experience with the remobi icon.
pkill -f "remobi serve"
tailscale serve --https=443 offTip — keep your Mac awake: Add
--no-sleepso the Mac doesn't go to sleep while you're away:remobi serve --no-sleepSee Keeping your Mac awake for persistent options (pmset, nix-darwin) and lid-close caveats.
# webtermup: expose tmux session via remobi serve + Tailscale serve
function webtermup() {
local session=${1:-main}
local port=${2:-7681}
pkill -f "remobi serve.*--port $port" 2>/dev/null
remobi serve --no-sleep --port $port -- tmux new-session -A -s "$session" &!
tailscale serve --bg $port
echo "Terminal ($session): https://$(tailscale status --self --json | jq -r '.Self.DNSName' | sed 's/\.\$//')"
}
# webtermdown: stop remobi serve and Tailscale serve
function webtermdown() {
local port=${1:-7681}
pkill -f "remobi serve.*--port $port" 2>/dev/null
tailscale serve --https=443 off 2>/dev/null
echo "Web terminal stopped"
}Current remobi releases do not depend on ttyd. If you are migrating an older setup, move it to remobi serve rather than trying to preserve the old ttyd path.
The old ttyd docs in this repo are historical only and are not a supported setup path on current releases.
If you are tempted to run remobi serve --host 0.0.0.0, be explicit about the trade-off: that bypasses the localhost-only default and exposes terminal control directly on the bound network interface. Prefer keeping remobi on loopback and letting Tailscale handle reachability.