I Ran Claude Code from My Phone on a Train
I was on a train. A deployment needed checking. I pulled out my phone and was inside my Mac Mini in under two minutes.
No laptop. No hotspot workaround. No scrambling.
Here’s the stack that made it happen — and it costs nothing.
The Stack
Four tools. All free.
- Termius — SSH client for iPhone. Clean interface, saves connections.
- Tailscale — Mesh VPN. Makes your Mac accessible from anywhere, no router config needed.
- tmux — Terminal multiplexer. Runs on the Mac Mini, keeps sessions alive.
- Claude Code — CLI. Runs inside the tmux session.
I already had all of these installed for other reasons. Total setup time for this specific use case: maybe 3 minutes.
How It Works
iPhone -> Termius -> Tailscale network -> Mac Mini -> tmux session -> Claude Code
That’s the full chain. When you open Termius, you tap the saved Mac Mini connection. Tailscale handles routing behind the scenes — your Mac Mini gets a stable private IP that works from any network, anywhere. No port forwarding. No dynamic DNS. No headaches.
Once connected, you attach to an existing tmux session (or start one), and you’re in Claude Code exactly where you left off.
Why tmux Is the Key Part
Without tmux, dropping your SSH connection kills the session.
On a train that means dead spots = lost work. With tmux, the session keeps running on the Mac Mini whether you’re connected or not. You reconnect, type tmux attach, and you’re back. Same conversation, same context, same file state.
This is the part most guides skip. SSH alone isn’t enough for mobile use — your connection will drop. tmux turns that from a problem into a minor inconvenience.
Why Tailscale Is the Other Key Part
The alternative to Tailscale is a mess: static IP from your ISP (costs money, not always available), port forwarding (firewall config, security exposure), or a self-hosted VPN (works but you need to maintain it).
Tailscale just works. You install it on your Mac Mini and your phone, they join the same mesh network, done. The Mac Mini shows up at the same address every time. It works over LTE, WiFi, any network.
The Honest Take
The phone keyboard is brutal for anything serious.
Writing real code, doing complex edits, navigating files fast — all painful on a touchscreen. I use a Bluetooth keyboard shortcut app when I need to type more than a few commands, but it’s still not a great experience.
Where this actually shines: checking status, reading outputs, running a quick command, or asking Claude to handle something autonomously while you’re away from your desk. You delegate the work to Claude, it runs on your Mac Mini, you check back later.
Less “coding from your phone” and more “dispatching tasks from your phone.” That distinction matters.
When to Use It
- You’re away from your laptop and something urgent comes up
- You want to kick off a long Claude Code task and check progress later
- Quick read — did that deployment work? What’s in that file?
- You trust Claude to execute something while you handle other things
It is not a replacement for a proper dev environment. But as a remote control for your machine? It’s surprisingly solid.
Stack links: Termius / Tailscale / tmux / Claude Code