cd /news/ai-tools/how-to-run-claude-code-on-iphone-ssh… · home topics ai-tools article
[ARTICLE · art-42095] src=onepilotapp.com ↗ pub= topic=ai-tools verified=true sentiment=· neutral

How to Run Claude Code on iPhone (SSH, tmux, and Setup)

Anthropic's Claude Code, an agentic coding tool, can be run on an iPhone via SSH and tmux, enabling developers to manage codebases from mobile devices. The setup requires an SSH terminal app, a server with SSH access, and a Claude Code subscription or API key. This approach allows developers to fix bugs, refactor code, or run tasks during idle time without needing a laptop.

read3 min views1 publishedJun 27, 2026
How to Run Claude Code on iPhone (SSH, tmux, and Setup)
Image: Onepilotapp (auto-discovered)

Claude Code is Anthropic's agentic coding tool: it reads your codebase, runs commands, edits files, and commits code. It's built for the terminal, and it runs on a server, not on the phone. That's exactly why your iPhone can drive it: anything that holds an SSH session can reach the agent.

What do you need to run Claude Code on iPhone? #

Three things:

  • An iPhone with an SSH terminal app
  • A server with SSH access (a cloud VPS, or a home machine on Tailscale)
  • A Claude Code subscription (Anthropic Max plan) or API key

Step 1: Make Sure You Can Reach the Server #

Before anything else, your phone has to be able to open an SSH connection to the box. If it's a cloud VPS with a public IP, you're set; connect straight to it from anywhere. If Claude Code lives on a machine behind NAT, say a Mac mini, a Raspberry Pi, or your laptop at home, it has no public address, so put it on a private network like Tailscale and reach it over its tailnet address. This step is unavoidable for NAT'd hosts regardless of which app you use; it's how the network works.

Step 2: Install Claude Code on the Server #

If it isn't installed yet, SSH in and install it:

`npm install -g @anthropic-ai/claude-code`

Authenticate with your Anthropic account or set your API key as an environment variable.

Step 3: Connect from Your iPhone #

Add your server (hostname or tailnet address, username, SSH key) and connect. You get a full, real terminal; Claude Code's interactive UI renders natively.

Step 4: Start Claude Code Inside tmux #

Don't launch the agent in a bare session; if your phone locks or switches networks, the connection can drop and take the agent with it. Start it inside tmux so it survives:

tmux new -s claude

Then, in your project directory, run:

claude

Claude Code launches in interactive mode, the same interface as on a desktop terminal, file diffs and tool calls and all, rendered on your phone. If you disconnect, reattach later with tmux attach -t claude

and it's exactly where you left it.

Step 5: Give It a Task #

Type your task in natural language: "Fix the failing CI tests in the payments module""Add rate limiting to the API endpoints""Refactor the database queries to use connection pooling"

Claude Code reads the relevant files, proposes changes, and executes them after your approval.

Tips for running Claude Code on iPhone #

Use headless mode for long tasks:claude -p "your task here"

runs without interactive promptsName a tmux session per task:tmux new -s fix-auth

,tmux new -s migrate-db , so several agents stay untangledStart big tasks before idle time(commute, lunch, overnight) and let the agent work while you're away

Why Not Just Use a Laptop? #

You absolutely can. But laptops aren't always available. Claude Code on mobile isn't about replacing your desk setup; it's about never being blocked. Incident at 2 AM, idea on the train, quick fix between meetings. Your phone is always there.

For the deeper version of the reachability and session-persistence problem, and where the manual tmux-and-Mosh dance starts to chafe on a phone, see running AI coding agents from your iPhone over SSH. Still picking an SSH client? The Termius vs Blink comparison covers the options, or start from scratch with the SSH from iPhone guide. If you'd rather skip the tmux ceremony and get native push when the agent needs you, that's what Onepilot is built for.

── more in #ai-tools 4 stories · sorted by recency
── more on @anthropic 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-to-run-claude-co…] indexed:0 read:3min 2026-06-27 ·