One-in-All

Remote Claude Code: iPhone + Termius → Mac (Tailscale + tmux + SSH)

Remote Claude Code from your iPhone is one of the most liberating setups I've built: keep Anthropic's terminal-based coding agent running 24/7 on your MacBook Air, then jump in from anywhere (train, café, bed) using just your phone + Termius.

No rented VPS, no ngrok hassle, no port forwarding nightmares. Here's the exact flow that works for me in 2026.

Core Pieces

Step-by-Step Setup

  1. Enable SSH on Mac
    System Settings → General → Sharing → Remote Login ON.
    Allow your user (or all users for simplicity).

  2. Install & Connect Tailscale (both devices)

    • Download Tailscale app on iPhone (App Store) and macOS app.
    • Sign in with the same account on both → status green/connected.
    • Your Mac is now reachable at its Tailscale hostname (e.g. jacks-macbook-air or 100.x.x.x).
      MagicDNS makes it hostname-based — super convenient.
  3. Install tmux & Claude Code on Mac

    brew install tmux
    npm install -g @anthropic-ai/claude-code   # or current install command
    
  4. Start persistent Claude Code session
    In Mac Terminal:

    tmux new -s claude
    claude   # or claude-code — start your agent here
    

    Detach: Ctrl+b then d.
    It keeps running/editing/thinking even if Mac sleeps lightly (use Amphetamine app to prevent deep sleep if needed).

  5. Set up Termius on iPhone

    • Install Termius (free).
    • New Host:
      • Address: your Mac's Tailscale hostname/IP
      • Username: jack (run whoami in Mac Terminal if unsure — it prints your exact username instantly)
      • Auth: SSH key (generate in Termius, add public key to Mac's ~/.ssh/authorized_keys) or password.
    • Connect → type tmux attach -t claude (or tmux a).

You're now inside the same Claude Code session from your phone. Prompt, watch it code, detach with Ctrl+b d when done — reconnect anytime.

Pro Tips

This setup turns any downtime into productive Claude sessions — vibe-coding from the couch in Tokyo. ʕ•ᴥ•ʔ

Questions or tweaks? Hit me up.

Stay remote.

#AI