Copy-paste ready. Failure logs included. This is the exact setup that runs 28 repos and monitors 26 sites — every day — from a Galaxy phone.
Install Termux from F-Droid — NOT the Play Store version (outdated). Then install the base packages:
Install Tailscale on both your phone and your PC. Sign in with the same account. They'll see each other on a private 100.x.x.x network — no port forwarding needed.
After connecting, get your PC's Tailscale IP:
Enable SSH on your PC and connect from Termux using autossh for a stable persistent connection:
Port 2222pc in Termux → PC terminal opens. WiFi→LTE switch reconnects automatically.The core insight: without tmux, every time your SSH connection drops, everything stops. With tmux, processes keep running on the PC even if your phone goes offline.
Add this to your PC's ~/.bashrc — auto-creates a named session per SSH connection:
Named sessions for different contexts:
| Session | Purpose |
|---|---|
| claude-main | Claude Code main workspace |
| tablet | Tablet SSH client workspace |
| tg-image | Telegram image bot (runs 24/7) |
| tg-audio | Telegram audio bot (runs 24/7) |
| watchdog | Connection monitor |
| ssh-xxxxx | Auto-created per SSH connection |
Add these aliases to PC ~/.bashrc. Each one does exactly what its name implies:
Apply without restarting:
cc on PC → Claude Code opens in termux-bridge dirClaude Code runs on the PC via WSL2. Install it globally and it's available in every session: