step-by-step guide

From a phone to a running server in 4 steps.

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.

Before you start
💳
Claude Max ($100/mo) — This is not optional. It's your developer salary replacement. Without it this tutorial is just reading.
📱
Android phone + Termux — Free from F-Droid (not Play Store). Galaxy preferred but any Android works.
🖥️
A PC running Windows or Linux — This becomes your real server. It stays on 24/7.
Termux
Tailscale
SSH
tmux
alias
Claude
1
Install Termux
Your phone's Linux terminal

Install Termux from F-Droid — NOT the Play Store version (outdated). Then install the base packages:

Termux · Initial setup
pkg update && pkg upgrade -y
pkg install -y git nodejs openssh autossh
Why autossh?
Regular SSH dies when your phone switches WiFi→LTE. autossh watches the connection and automatically reconnects. Without it, you'll be retyping ssh every 10 minutes.
pkg list-installed shows git, nodejs, openssh, autossh
2
Set up Tailscale
Private VPN — phone talks to PC anywhere

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.

PC (WSL2/Ubuntu) · Install Tailscale
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up

After connecting, get your PC's Tailscale IP:

PC · Get your Tailscale IP
tailscale ip -4
# Returns something like: 100.90.83.128
# Save this — you'll use it everywhere
Common failure
tailscaled: connection refused
Run sudo systemctl start tailscaled (or on WSL2: sudo tailscaled & then sudo tailscale up)
Both phone and PC appear in Tailscale admin panel
3
SSH from phone to PC
The phone becomes a terminal

Enable SSH on your PC and connect from Termux using autossh for a stable persistent connection:

PC · Enable SSH server
sudo apt install openssh-server -y
sudo systemctl enable ssh
sudo systemctl start ssh
Termux · Connect with autossh (add to ~/.bashrc)
alias pc='autossh -M 0 \
-o "ServerAliveInterval 30" \
-o "ServerAliveCountMax 3" \
-p 2222 \
your-username@100.90.83.128'
Why port 2222?
Port 22 is blocked by many routers and ISPs. Using 2222 avoids those restrictions. Configure it in /etc/ssh/sshd_config: set Port 2222
Real failure — 3 months in
SSH self-loop: CPU 38% spike tailscaled CPU: 29.6% (runaway process) Session drops every WiFi→LTE switch
Fix: Kill the self-loop PIDs, restart tailscaled, add ServerAliveInterval to SSH config, create ~/.wslconfig with vmIdleTimeout=-1
Type pc in Termux → PC terminal opens. WiFi→LTE switch reconnects automatically.
4
tmux — never lose your session
Sessions that survive disconnects

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.

PC · Install tmux + auto-attach on SSH login
sudo apt install tmux -y

Add this to your PC's ~/.bashrc — auto-creates a named session per SSH connection:

PC ~/.bashrc · Auto tmux on SSH login
# Auto-attach tmux on SSH (named by port)
if [[ -n "$SSH_CONNECTION" ]] && \
[[ -z "$TMUX" ]] && [[ -z "$TMUX_PANE" ]]; then
CLIENT_PORT=$(echo "$SSH_CONNECTION" | awk '{print $2}')
SESSION_NAME="ssh-${CLIENT_PORT}"
exec tmux new-session -A -s "$SESSION_NAME"
fi

Named sessions for different contexts:

SessionPurpose
claude-mainClaude Code main workspace
tabletTablet SSH client workspace
tg-imageTelegram image bot (runs 24/7)
tg-audioTelegram audio bot (runs 24/7)
watchdogConnection monitor
ssh-xxxxxAuto-created per SSH connection
Disconnect SSH, reconnect → session is still running, all processes intact
5
Aliases — 2-key commands
The finishing touch

Add these aliases to PC ~/.bashrc. Each one does exactly what its name implies:

PC ~/.bashrc · The full alias set
# SSH to PC (from phone)
alias pc='autossh -M 0 -o "ServerAliveInterval=15" \
-p 2222 user@100.90.83.128'
 
# Claude Code in termux-bridge dir
alias cc='cd ~/termux-bridge && claude'
 
# Jump to termux-bridge dir
alias cb='cd ~/termux-bridge'
 
# Switch to (or create) claude-main session
alias cm="tmux switch -t claude-main 2>/dev/null || \
TMUX='' tmux new-session -A -s claude-main"
 
# Switch to (or create) tablet session
alias ct="tmux switch -t tablet 2>/dev/null || \
TMUX='' tmux new-session -A -s tablet"

Apply without restarting:

source ~/.bashrc
Type cc on PC → Claude Code opens in termux-bridge dir
6
Install Claude Code
Your engineer is now online

Claude Code runs on the PC via WSL2. Install it globally and it's available in every session:

PC (WSL2) · Install Claude Code
npm install -g @anthropic-ai/claude-code
The 십장 model (Foreman model)
You don't need to know how to code. You are the foreman — you know what the building should look like. Claude is the engineer — it knows how to build it. Give directions in plain language. Verify the output. That's the entire job.
Full workflow in 3 commands
# On phone:
pc # SSH to PC
cm # Switch to claude-main tmux session
cc # cd to project + open Claude Code
Claude Code opens. You can give instructions in plain English. Claude executes.
Try it in your browser → Terminal simulator · Architecture diagram · Data calculator View the source on GitHub All logs, all scripts, all failures — public