Claude Code on VPS + SSH: iOS via MacinCloud and the levelsio Remote Agent Stack
Jul 8, 2026: levelsio runs Claude Code on a VPS, SSH from iPhone via Termius, and Xcode on rented MacinCloud for Nomads iOS. Setup, security, and alternatives.
Claude CodeRemote DevelopmentVPSiOS DevelopmentAgent HarnessSSH
Update — July 16, 2026: For the June 28 manifesto (~1.2M views) — year on VPS-only Claude Code, deploy evolution, live prod edits, Hetzner + Tailscale setup — read Claude Code VPS production workflow. This post is the July 8 iOS extension (Termius, MacinCloud, Nomads).
On July 8, 2026, Pieter Levels posted a thread that hit ~322.5K views describing a workflow many builders had been sketching in DMs but rarely documented end-to-end: Claude Code on a VPS, Termius on iPhone and MacBook Pro for SSH, and Xcode on a rented MacinCloud Mac Mini in California for the Nomads iOS app — pushed by marckohlbrugge after Levels said he would not code locally anymore. The why — almost a year without opening a laptop, overnight /goal on the server, live production edits — is in the June 28 manifesto.
The pattern is remote agentic development: the agent harness runs on an always-on Linux box; you are the mobile supervisor over SSH; Apple-specific work hops to macOS over a second SSH leg. It sits between pocketdev's Tailscale dev boxes and local-first stacks like Grok Build open source — cloud orchestration, disposable credentials, and thick artifacts (Thariq's framing) checked in from anywhere.
marckohlbrugge pushed Levels to ship Nomads iOS; Levels moved all coding off his laptop
Where does Claude Code run?
Linux VPS — persistent tmux session, reachable 24/7
How does he connect?
Termius SSH from iPhone ~50% and MacBook Pro ~50%
Where is Xcode?
MacinCloud Mac Mini (California) — VPS SSHes into macOS for builds
Why not local?
Track progress while away from home; skip lugging a 16" MacBook
Still need macOS?
Yes — signing, simulators, App Store upload
Security headline?
Credentials on VPS + Mac login handoff = sandbox, not laptop — see Codex $HOME deletion
Cheaper iOS path?
Capacitor wrap web app, Expo for cross-platform — community replies below
Architecture — iPhone to Xcode in three hops
Levels' stack is a split brain: Linux for the coding agent, macOS for the Apple toolchain. You operate both through SSH — no local IDE required on the travel machine.
mermaid
flowchart LR
subgraph clients["Your devices"]
iPhone["iPhone\nTermius"]
MBP["MacBook Pro\nTermius"]
end
subgraph vps["Linux VPS"]
tmux["tmux session"]
CC["Claude Code\nagent harness"]
tmux --> CC
end
subgraph mac["macOS host\nMacinCloud Mac Mini"]
Xcode["Xcode + simulators"]
Sign["Code signing\n+ asc upload"]
end
iPhone -->|"SSH"| tmux
MBP -->|"SSH"| tmux
CC -->|"SSH hop"| Xcode
Xcode --> Sign
ASCII equivalent (useful in terminals and AI citations):
Session persistence matters: when you lock your iPhone mid-prompt, tmux keeps Claude Code running. Reconnecting Termius reattaches the same pane — the same pattern pocketdev documents for Hetzner boxes, minus Tailscale automation.
For harness concepts — permission modes, tool loops, artifact handoff — start with What is an agent harness?.
What people are asking after the July 8 thread
"Why VPS-only coding — isn't that slower?"
Levels' reason is mobility and continuity, not raw compile speed. An always-on VPS means:
Same session whether you are on a couch with an iPhone or at a desk with a MacBook
No sleep/wake killing local agent runs when you close a laptop lid
Separation between travel machine and build environment — aligned with disposable devbox guidance after GPT-5.6 $HOME deletion reports
Tradeoff: you own SSH hardening, backup, and billing. OpenCode on a VPS with local models is an alternative if you want zero cloud LLM credentials on the box — different cost curve, same SSH ergonomics.
"Jump Desktop tunnel vs SSH — which tunnel?"
Replies in the thread debated Jump Desktop-style GUI tunneling versus plain SSH + tmux. For agent coding, SSH wins: copy-paste logs, low bandwidth, scriptable second hop to macOS, and no GUI session to babysit. GUI remote desktop helps when you need to click Xcode manually; Levels delegated that click-work to the agent over SSH.
"Install Claude Code directly on MacinCloud?"
Logical shortcut — one machine, no Linux VPS. Downsides the thread surfaced:
macOS agent sandboxes differ from Linux; some CLI tools assume Linux paths
Multi-tenant MacinCloud increases blast radius if credentials leak
Cost: dedicated Mac hourly rates add up vs a €5–8/mo Linux VPS plus episodic Mac time
The two-hop design keeps the long-running agent on cheap Linux and treats macOS as a build/signing appliance.
"Capacitor.js / Expo vs native SwiftUI?"
Community 80/20 suggestions for Nomads-like products:
Path
Pros
Cons
Capacitor wrap existing web app
Reuse Nomad List web stack; one codebase
App Store review, native feel, offline
Expo / React Native
Android for free; hot reload
Still need macOS for iOS builds; not fully native
SwiftUI (Levels' path)
Best iOS integration
Requires Xcode + macOS always in loop
Levels chose native SwiftUI via Xcode — the hardest path for agents, but the right call if iOS UX is the product differentiator.
"Telegram MCP instead of SSH?"
Some builders proposed Telegram MCP for agent status instead of terminal SSH — async notifications, approve/reject buttons, no tmux scrollback. That is orchestration UX, not a replacement for shell access. Pair Telegram or Discord MCP for alerts with SSH for debugging — similar to how Desktop Commander MCP exposes filesystem tools without leaving the harness.
"GitHub Actions macOS runner + VPS — no Mac Mini?"
A popular reply: run Claude Code on Linux VPS for edits, push branches, and let GitHub Actions macOS runners compile, test, and sign — no 24/7 rented Mac. Upload with asccli.sh or xcodebuild + altool in CI. You lose interactive simulator debugging unless you SSH into a Mac occasionally.
"Kanban orchestration vs SSH terminal UX"
Tools like Multica (named in replies) emphasize kanban-style agent task boards instead of raw terminal scrollback. SSH + tmux is minimal orchestration — you manage context in git, issues, and thick artifacts in-repo. Pick kanban when multiple parallel agents need visibility; pick SSH when one long-running session is enough. OpenCode Desktop tabs sit in the middle — visual session management on a desktop you still have to carry or remote into.
When VPS-only agent coding makes sense
Good fit:
You travel often and want one persistent agent session
Your daily driver is iPhone or ultraportable — SSH is the primary UI
You already pay for Claude Pro / API and want the harness off your laptop
You are building iOS or macOS but refuse to lug a 16" machine — rent macOS episodically
App Store Connect upload (Transporter, asc, or CI scripts)
Levels' answer: MacinCloud Mac Mini in California, credentials handed to the agent on the VPS, SSH from VPS → Mac to run Xcode commands.
Hardening checklist for that hop:
Dedicated Apple Developer credentials — not your personal Apple ID
SSH key per repo — not your global ~/.ssh/id_rsa
Separate macOS user for agent work vs your iCloud login
Rotate MacinCloud password after the build phase completes
Never commit.p12, provisioning profiles, or App Store Connect API keys to the repo the agent reads
For CI-only macOS, GitHub-hosted macOS runners avoid long-lived rented Macs — push from VPS, let Actions compile and upload.
MacinCloud vs own Mac Mini vs GitHub Actions
Option
Setup time
Monthly cost (typical)
Agent SSH access
Best for
MacinCloud (rented)
Hours
Variable hourly/plan
Easy — Levels' path
Experiments, short Nomads-style pushes
Own Mac Mini
Days (ship hardware)
Power + amortized hardware
You control firewall
Long-term iOS products, signing key custody
GitHub Actions macOS
Hours (workflow YAML)
Per-minute CI billing
No interactive SSH — git push triggers
Release builds, asccli.sh upload, no 24/7 Mac
No Mac (Capacitor/Expo web wrap)
Days
VPS only
N/A — web build on Linux
80/20 apps with existing web codebase
asccli.sh (cited in thread replies) automates App Store Connect uploads from CI — useful when the VPS + Actions split replaces a always-on Mac Mini.
Security — credentials, handoff, and the July 16 Codex reminder
The levelsio thread is a productivity story; July 16 was a safety story. Tibo's Codex investigation documented GPT-5.6 deleting entire $HOME directories when full access disabled sandboxing — the model tried to retarget $HOME to a temp folder and deleted the real home instead.
Map that to VPS + MacinCloud:
Risk
Mitigation
API keys on VPS
Env files in /etc/agent/env or secret manager — never in repo or prompts
MacinCloud login in agent context
Ephemeral credentials; rotate after session; prefer SSH keys over passwords
Second-hop SSH keys
Scoped read/write deploy keys; no agent access to production Apple keys
Treat as semi-trusted — assume other users' isolation is not your threat model
Logs exfiltrating secrets
Disable pasting secrets into chat; use env injection at process start
VPS as safety sandbox: a destroyed /home/dev on a €5 VPS hurts less than a destroyed laptop $HOME. That is the same rationale as pocketdev's disposable box — see our phone agent comparison.
For long-session context without sending screen recordings to the cloud, builders also pair harnesses with local capture tools like Screenpipe — optional, not required for Levels' SSH stack.
Copy-paste setup checklist
1. Linux VPS (agent host)
bash
# On a fresh Ubuntu 24.04 VPS as root — create dev user
adduser dev
usermod -aG sudo dev
mkdir -p /home/dev/.ssh
# Paste your public key into authorized_keyschmod 700 /home/dev/.ssh && chmod 600 /home/dev/.ssh/authorized_keys
# As dev — basicssudo apt update && sudo apt install -y git tmux ufw build-essential
sudo ufw allow OpenSSH && sudo ufw enable# Claude Code — follow official install for Linux# Store ANTHROPIC_API_KEY in ~/.config/agent/env (chmod 600), not in shell history
Enable Mosh or keepalive if your carrier drops idle SSH
3. tmux session hygiene
bash
tmux new -s code
cd ~/nomads-ios # or your repo
claude # or opencode, codex — one harness per tmux window# Ctrl-b d to detach; reconnect anytime from Termius
Use git worktrees or separate tmux windows for parallel tasks — same pattern as OpenCode Desktop tabs, but terminal-native.
4. Second hop — VPS to macOS (Xcode host)
bash
# On VPS — ~/.ssh/config
Host macincloud
HostName YOUR_MACINCLOUD_HOST
User YOUR_USER
IdentityFile ~/.ssh/macincloud_ed25519
ForwardAgent no
# From Claude Code session on VPS
ssh macincloud "cd ~/nomads-ios && xcodebuild -scheme Nomads -destination 'platform=iOS Simulator,name=iPhone 16' build"
Never put MacinCloud passwords in Claude prompts. Pre-seed ~/.ssh/config and keys on the VPS before starting the agent.
5. Secrets discipline
No secrets in prompts — inject via environment at harness start
Separate git identity for agent commits vs your personal GitHub
Review git diff before push — especially entitlements and signing files
Snapshot VPS before giving an agent destructive shell access
How this compares to explainx.ai's other mobile agent paths
The levelsio thread validates that builders want the agent always on even when they are on a phone — not a niche hack.
Summary
July 8, 2026: Pieter Levels documented Claude Code on a VPS, Termius from iPhone and MacBook Pro, and Xcode on MacinCloud for Nomads iOS — ~322.5K views and a flood of alternatives (Capacitor, Expo, GitHub Actions macOS, Telegram MCP, asccli.sh).
explainx.ai's read: treat the VPS as your agent harness host, tmux as session memory, macOS as a signing appliance, and July 16 Codex $HOME deletions as the reminder to never run full-access agents on hardware you cannot wipe.
Context: Pieter Levels X thread, July 8, 2026 (~322.5K views) · Nomads iOS / marckohlbrugge · MacinCloud (third-party macOS rental, not affiliated) · Termius SSH client
Architecture, pricing, and agent CLI behavior reflect July 8–16, 2026 community reports. MacinCloud terms, Apple signing requirements, and Claude Code Linux support change — verify before production use. Last updated: July 16, 2026.