Claude Code on iPhone: which setup is for you?
Claude Code never runs on the phone itself. It runs on a computer or a server, and the iPhone is the screen and keyboard you use to steer it. The question is how the phone reaches it.
- Remote Control: you start a session on your computer and continue it in the Claude app. Quick to set up, tied to that one session and a Claude subscription.
- SSH and tmux: you open the real terminal of your Mac or server from an SSH app. It works with any login, any server and any agent, and the work goes on while the phone sleeps.
If you only want to approve a step now and then from the sofa, Remote Control is enough. If the agent runs for hours on a server, or you use more than one agent, the SSH way is the one people settle on.
How does Claude Code Remote Control work?
Remote Control connects the Claude app, or claude.ai/code in a browser, to a Claude Code session that keeps running on your machine. Your files and tools stay on the computer; the phone is a window into the session.
- Sign in to Claude Code with your Claude account (
/login), on a plan that includes Remote Control. - In your project folder, start a session and type
/remote-control(or/rc). To start one in server mode, runclaude remote-controlinstead. - Press the space bar to show a QR code, and scan it with the iPhone. The session opens in the Claude app.
Two things to know. The computer has to stay on and online, since that is where Claude Code runs. And Remote Control does not work with API keys or with a gateway set in ANTHROPIC_BASE_URL, according to Anthropic's documentation.
How do you run Claude Code from your phone over SSH?
This is the setup developers have used since the first terminal agents: the agent lives in tmux on a machine that is always on, and the phone attaches to it when you want to look.
1. Pick the machine
A small Linux VPS, a home server or your Mac all work. On a Mac, turn on Remote Login in System Settings, General, Sharing (see enable SSH on a Mac). For a server, our post on running Claude Code on a remote server covers the full setup.
2. Install Claude Code and tmux there
# on the Mac or the server
curl -fsSL https://claude.ai/install.sh | bash
sudo apt install tmux # Debian or Ubuntu
brew install tmux # macOS
3. Start the agent inside tmux
tmux new -s claude
cd ~/projects/my-app
claude
Give it a task, then detach with Ctrl+b, then d. Claude Code keeps working. You can close the laptop lid if the agent runs on a server.
4. Attach from the iPhone
ssh you@your-server
tmux attach -t claude
You are back in the same screen, with the agent's history and any question it is waiting on. New to tmux? tmux for beginners covers the ten keys you need.
What makes Claude Code on iPhone pleasant to use?
The setup above works with any SSH app. What decides whether you use it every day is the small stuff around it.
- A key bar. Claude Code needs Esc to interrupt, Shift+Tab to change mode, arrows to pick an option and Ctrl+c. The iPhone keyboard has none of them.
- A connection that survives the bus. The phone changes network, sleeps and pauses apps. Mosh, or a startup command that runs
tmux new -A -s claude, saves you from typingtmux attachten times a day. - A tap when the agent waits. The worst part of agents on a server is finding out an hour later that one stopped at its first question.
- Dictation. Long prompts are easier to say than to type with thumbs.
How does Wardterm help with Claude Code on iPhone?
Wardterm is an SSH client for Mac, iPhone, iPad and Android. Everything above is built in, so the SSH setup takes a minute instead of an evening.
- Sessions that survive the network. Open sessions stay connected while you use other apps or lock the phone, and Mosh keeps them through a change of network. Save
tmux new -A -s claudeas the startup command and every connection lands in Claude Code. It is part of every plan. Keep sessions alive. - Your servers on every device. With Pro, sync brings your servers and keys to the iPhone. Start Claude Code in tmux on the Mac, then attach to the same session from the phone, as you left it.
- Mosh and a key bar. Mosh is in the Free plan, and the key bar has Esc, Ctrl, Tab and arrows, in the order you choose.
Pro adds Session alerts and encrypted sync between your devices, and you can try it for free.
Tips for running Claude Code from a phone
- Plan on the computer, approve on the phone. Write the task and the plan where you have a real keyboard. From the phone you answer questions and check progress.
- Give each project its own tmux session.
tmux new -s api,tmux new -s web: on the phone,tmux lsshows them all. - Keep the agent off production. Run it on a development server with its own key, and keep production keys out of its reach. Our guide to avoiding mistakes on production servers has the habits that help.
- Use a key, not a password. A key in the secure chip of the iPhone, confirmed with Face ID, means nothing to type on a small screen. See keys on this device.
- Check the diff before you merge. On the phone,
git diff --statgives the picture; the full review can wait for a bigger screen.
Remote Control or SSH: what to choose for Claude Code on iPhone
Choose Remote Control if you use one session on your own computer, sign in with a Claude subscription and want the chat look of the Claude app.
Choose SSH and tmux if the agent runs on a server, if you use an API key or another agent, or if you want several sessions you can leave for hours and find exactly where they were. Many developers end up with both: Remote Control for a quick look, the terminal for real work.
Questions
Can I use Claude Code on my iPhone?
Yes. Claude Code runs on a computer or server, and the iPhone connects to it: through Remote Control in the Claude app, or through an SSH app that opens the real terminal.
Does Claude Code keep working when my phone is locked?
Yes, if it runs inside tmux on the computer or server. The phone is only a window: when it sleeps or loses signal, tmux keeps the session and you attach to it again later.
Do I need a Mac to use Claude Code from my phone?
No. Any Linux server or VPS with SSH works, and so does a Mac with Remote Login turned on. See how to turn on SSH on a Mac.
Does Remote Control work with an API key?
No. Anthropic's documentation says Remote Control needs a Claude subscription and does not support API keys. Over SSH you use Claude Code exactly as on the computer, with whatever login it has there.
How do I know when Claude Code needs me?
With Remote Control, the Claude app shows it. Over SSH, turn on Claude Code's terminal notifications: in Wardterm, session alerts turn them into a notification on your phone, and a tap opens the session.
Is Mosh better than SSH for Claude Code on a phone?
Mosh keeps the connection through network changes and sleep, which helps on a phone. tmux is still what keeps Claude Code running when you close the app. Many people use both.
Can I use Codex or Gemini CLI the same way?
Yes. The SSH and tmux setup works with any agent that runs in a terminal, such as Codex or Gemini CLI: install it on the server, start it inside tmux and attach from the phone.
Sources
Each page was read on the date shown. Prices and features change, so check the maker's page before you decide.
- Claude Code docs, Remote Control, read on
- Claude Code docs, setup, read on
- tmux manual, read on
- Mosh, home page, read on
- Wardterm docs, session alerts, read on
- Wardterm docs, keep sessions alive, read on