Claude Code on your iPhone – Termius, a VPS, and files in and out
Anthropic ships official Claude Code mobile options – the apps and remote sessions. This guide covers the self-hosted path many builders prefer: Claude Code running on your own VPS, driven from an iPhone over SSH. It survives your laptop sleeping, keeps the agent next to the code it deploys, and works from anywhere. And it has one gap nobody writes about: files.
The setup
- A VPS (any provider) with Claude Code installed and your repos on it.
- Termius (or Blink) as your iPhone SSH client, connected to the VPS.
- Run Claude Code inside
tmuxso the session survives when iOS backgrounds the app:tmux new -s code, thenclaude. Reconnect anytime withtmux attach -t code.
That's the whole loop – you're now steering a coding agent from a phone keyboard. Until a file needs to cross the phone–server boundary.
Getting files in (the screenshot problem)
You photograph a whiteboard or screenshot a broken UI. The agent that needs to see it is on the VPS, and no amount of tapping pastes an image into an SSH session. The move:
- Share sheet → open yafl.dev in Safari (signed in) → upload. The image is encrypted in the browser before it leaves the phone.
- Copy the link, paste it into Termius:
> Download https://yafl.dev/t/{id}#{key} and look at it
With the YAFL MCP server installed, the agent pulls and decrypts it on the VPS – full walkthrough in the screenshot guide.
Getting files out (the artifact problem)
The agent built a PDF, an export, a zip of logs – and it's on the VPS while you're on a phone. Tell the agent to send it:
> Upload the report with yafl and give me the link
The agent calls upload_file, and every YAFL send returns both a browser link and a ready-to-run retrieval command. Open the link in Safari – it decrypts in the browser, nothing to install. Or have the agent email it straight to someone's inbox with the email_link tool – that needs a verified account, and the full link (including the #fragment decryption key) travels through the mail path, so anyone with access to that inbox can decrypt it too (the one sanctioned exception to "the server never sees the key"). Links die after 24 hours; add oneTime and the link burns on first download.
FAQ
Can I use Claude Code on an iPhone? Yes – two ways: Anthropic's official mobile experience, or self-hosted via any SSH client (Termius, Blink) connected to a server running Claude Code in tmux. The self-hosted path gives you your own VPS, your own repos, and full CLI access.
How do I get a photo from my iPhone to a server? Share sheet → yafl.dev in Safari → upload (encrypted client-side) → paste the link in your SSH session and let the agent download it. No scp, no cables, no cloud-drive sync.
Install: npx -y @yafldev/mcp with
YAFL_API_KEY set, or the one-liner
curl -fsSL https://yafl.dev/install.sh | sh.