There’s a mini gold rush to put Claude Code on your phone. Some startups are building custom apps, others are creating managed cloud environments. They’re solving real problems, but you’re trading raw Unix power for convenience. If you have a desktop and 20 minutes, you can get full kernel access with SSH, Termux, and Tailscale. This approach was proven in practice: shipping a feature to a live blog from the passenger seat of a car driving from San Francisco to Apple Hill, CA — SSH’d into an office desktop, prompted Claude to make changes, tested on the phone’s browser, and pushed to production in 10 minutes. This guide walks through SSH-based mobile development with Claude Code. If you have a desktop that stays on (or a cheap VPS), you can get full terminal access from your phone with session persistence, port forwarding, and the ability to test your code on your actual mobile browser. The initial setup takes about 20 minutes and just works once configured.Documentation Index
Fetch the complete documentation index at: https://mint.skeptrune.com/llms.txt
Use this file to discover all available pages before exploring further.
The architecture
The setup uses five standard Unix tools that work together without custom integration:| Tool | Role |
|---|---|
| Desktop | Runs Claude Code and your development environment |
| Tailscale | Creates a private encrypted network between your devices |
| Termux | Gives you a real terminal on Android |
| SSH | Handles the connection between phone and desktop |
| tmux | Keeps your sessions alive when you disconnect |
Setup
Set up your desktop
You need a computer that stays on. This could be a home desktop, an office desktop, a cloud VM, or a home server. It doesn’t need to be powerful — Claude Code just makes API calls, the actual compute happens at Anthropic.Install Claude Code globally using npm:Install tmux for session persistence. When you disconnect from SSH (phone locks, network drops, whatever), tmux keeps your Claude Code session running in the background:With Claude Code and tmux installed, your desktop is ready to host development sessions.
- Ubuntu/Debian
- macOS
Install Tailscale everywhere
Tailscale creates a private network between all your devices. Your phone gets a stable IP address that can reach your desktop, even when you’re on different networks.On your desktop, run the Tailscale installer and bring up the connection:The You’ll get something like
tailscale up command will prompt you to authenticate in your browser. Install Tailscale on your phone from the Play Store and sign in with the same account. Your devices are now on the same private network.Grab your desktop’s Tailscale IP address — you’ll need it to connect:100.64.0.5. That’s your desktop’s address on the Tailscale network. It’s stable, private, and works from anywhere.Install Termux on your phone
Termux is a terminal emulator for Android that gives you a real Linux environment — not a toy terminal. A real one with bash, ssh, and full package management.Once installed, update the package repositories and install the SSH client:
SSH into your desktop
Open Termux and SSH to your desktop using the Tailscale IP you grabbed earlier. Replace The first time you connect, SSH will ask you to verify the host fingerprint. Type
100.64.0.5 with your actual IP and your-username with your desktop username:yes, then enter your password.You’re now running a shell on your desktop, from your phone, over a secure encrypted connection that works anywhere you have internet.Use tmux for session persistence
From your SSH session, start a new tmux session with a name you’ll remember. Name it after the project you’re working on:Inside the tmux session, launch Claude Code:You’re now coding from your phone using Claude Code running on your desktop.When you need to disconnect, don’t exit Claude Code and don’t exit tmux. Just close Termux or let your phone lock. The tmux session stays running on your desktop.When you want to code again, SSH back in and reattach:Your conversation with Claude is still there, your file context is still loaded, and you can continue immediately.
Why this works better than custom apps
Every startup trying to solve “Claude Code on mobile” is building abstractions on top of these primitives. They’re not giving you anything you can’t already do with SSH and Termux. They’re just wrapping it in a prettier UI and charging for hosting. When you do it yourself, you get several advantages: Port forwarding just works. With Tailscale, your desktop’s ports are directly accessible from your phone. No configuration, no exposing services to the public internet, no proxies adding latency. Full CLI access. Want to run your dev server with--host so you can test on your phone’s browser? Just add the flag. Need to adjust firewall rules, modify server configs, or install system packages? You have root access. Native mobile coding apps can’t offer this level of control.
Session persistence that actually works. tmux was built for this. Your session survives network disconnections, phone reboots, and SSH reconnects. You never lose your place.
Your own hardware. Your desktop has your SSH keys, your git credentials, your environment exactly how you configured it. You’re not coding in a disposable cloud container.
The mobile experience
Coding on a phone isn’t as good as coding on a desktop. The screen is small, the keyboard is mediocre, and you can’t see multiple files at once. But Claude Code is different from traditional coding. You’re not typing out functions character by character. You’re describing what you want, reviewing Claude’s changes, and approving or rejecting them. That workflow translates to mobile well. You’re reading more than you’re typing, and phones are great for reading. The Apple Hill example isn’t cherry-picked. Real features ship from a phone. Production bugs get fixed while getting coffee. Pull requests get reviewed from the back of an Uber. It’s not a primary development environment, but it’s shockingly capable when needed.Practical tips
Once the basic setup is running, these tweaks make the mobile coding experience dramatically better.Test your changes on your phone’s browser
This is the killer feature. You’re not just editing code remotely — you can test it on your phone while the dev server runs on your desktop. Start your dev server with the--host flag, which makes it accessible on your Tailscale network instead of just localhost:
- Vite / Astro
- React (CRA)
- Next.js
- Django
0.0.0.0 instead of 127.0.0.1.http://100.64.0.5:4321 on your phone’s browser (replace with your Tailscale IP and port). You’re now viewing your local dev server in your phone’s browser, testing on the actual target device with the actual screen size and layout.
Use SSH keys
Don’t type your password every time you SSH. Generate an SSH key on your phone and add it to your desktop’s authorized keys:Create an SSH config
Make connecting faster by adding an alias in Termux’s SSH config at~/.ssh/config:
ssh desktop instead of the full IP and username every time.
Use a better keyboard
Termux works with external Bluetooth keyboards. When actually trying to get work done on a phone, a small keyboard makes a massive difference. The phone screen is fine for reading; the keyboard makes typing bearable.Set up tmux keybindings
tmux’s default keybindings are terrible on mobile. On your desktop, create or edit~/.tmux.conf:
Run multiple sessions
You can have multiple tmux sessions for different projects:tmux ls, then attach to whichever one you want:
Security considerations
You’re SSH’ing into your desktop over the internet. Do it right with a few precautions. Disable password authentication. Keys are longer, stronger, and can’t be brute-forced. Edit/etc/ssh/sshd_config on your desktop:
who or w. Check SSH logs with:
When this doesn’t work
No persistent desktop. If you don’t have a computer that stays on, rent a $5/month VPS from DigitalOcean or Hetzner, install Tailscale and Claude Code, and SSH into it the same way. iOS instead of Android. Termux isn’t available on iOS. Use a different SSH client like Blink or Prompt instead. The rest of the setup is identical. Unstable internet. Mosh (mobile shell) is designed for high-latency or unreliable connections. Install it on both your phone and desktop, then usemosh desktop instead of ssh desktop. It handles disconnections gracefully and keeps your terminal responsive even on bad networks.