explainx.ainewsletter3.5k
TrendingNewsPathwaysSkills
Pricing
explainx.ai

Upskill in AI — 16 free pathways, live workshops & bootcamps, and 50+ courses from practitioners. Plus the skills, tools, and MCP servers to practice on.

follow us

custom AI agents

[email protected]

get started

Find your pathTake Free Evaluation

learn

pathways — start freeworkshopsbootcampscoursescertificationsmock testsexplainx universitycorporate traininglearn skills & mcp

discover

skillsmcp serversexplainx mcptoolsagentsllmsdesignsagi trackerranks

company

aboutvisionmissionteaminstructorscommunityhackathonscareers

content

daily AI newsstate of AI — live resultsblogreleasespromptsgeneratorsresource librarydemofor LLMs

solutions

all solutionsdeveloper upskillingmarketing upskillingproduct manager upskillingleadership upskilling

More from us

InfloqInfluencer marketingBgBlurPrivacy-first blurOlly SocialSocial AI copilotCeptoryVideo intelligenceBgRemoverBackground removal

newsletter · weekly

Get AI news, tools, and insights in your inbox.

supportprivacytermsdata rightssubmission guidelines

© 2026 AISOLO Technologies Pvt Ltd

On this page

  • TL;DR — levelsio Remote Agent Stack
  • Architecture — iPhone to Xcode in three hops
  • What people are asking after the July 8 thread
  • When VPS-only agent coding makes sense
  • iOS-specific: why macOS stays in the loop
  • MacinCloud vs own Mac Mini vs GitHub Actions
  • Security — credentials, handoff, and the July 16 Codex reminder
  • Copy-paste setup checklist
  • How this compares to explainx.ai's other mobile agent paths
  • Summary
  • Related on explainx.ai
← Back to blog

explainx / blog

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.

Jul 16, 2026·11 min read·Yash Thakker
Claude CodeRemote DevelopmentVPSiOS DevelopmentAgent HarnessSSH
go deep
Claude Code on VPS + SSH: iOS via MacinCloud and the levelsio Remote Agent Stack

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.

Weekly digest3.5k readers

Catch up on AI

Curated AI updates on agents, skills, and MCP — delivered to your inbox. Unsubscribe anytime.


TL;DR — levelsio Remote Agent Stack

QuestionAnswer
What triggered this?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):

snippet
[iPhone / MacBook Pro]
        │  Termius SSH
        ▼
[Linux VPS: tmux → Claude Code → git repo]
        │  SSH (second hop)
        ▼
[macOS: Xcode, simulators, signing, App Store]

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:

PathProsCons
Capacitor wrap existing web appReuse Nomad List web stack; one codebaseApp Store review, native feel, offline
Expo / React NativeAndroid for free; hot reloadStill need macOS for iOS builds; not fully native
SwiftUI (Levels' path)Best iOS integrationRequires 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
  • You want a blast-radius sandbox after reading Codex full-access deletion chains

Poor fit:

  • You need low-latency local debugging (game dev, heavy ML on GPU)
  • Your org forbids credentials on shared VPS tenants
  • You are uncomfortable SSH-hopping and prefer native Claude Code mobile remote
  • You want zero ops — use managed cloud agents (Cursor iOS path in our phone agent guide)

Local-first alternative: Grok Build and OpenCode + local models keep inference on hardware you control — opposite tradeoff, same harness ideas.


iOS-specific: why macOS stays in the loop

Apple does not ship Xcode for Linux. Even with Claude Code editing Swift on a VPS, you still need macOS for:

  1. Xcode project generation and builds (xcodebuild)
  2. Simulators and device provisioning
  3. Code signing (certificates, provisioning profiles)
  4. 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

OptionSetup timeMonthly cost (typical)Agent SSH accessBest for
MacinCloud (rented)HoursVariable hourly/planEasy — Levels' pathExperiments, short Nomads-style pushes
Own Mac MiniDays (ship hardware)Power + amortized hardwareYou control firewallLong-term iOS products, signing key custody
GitHub Actions macOSHours (workflow YAML)Per-minute CI billingNo interactive SSH — git push triggersRelease builds, asccli.sh upload, no 24/7 Mac
No Mac (Capacitor/Expo web wrap)DaysVPS onlyN/A — web build on Linux80/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:

RiskMitigation
API keys on VPSEnv files in /etc/agent/env or secret manager — never in repo or prompts
MacinCloud login in agent contextEphemeral credentials; rotate after session; prefer SSH keys over passwords
Second-hop SSH keysScoped read/write deploy keys; no agent access to production Apple keys
Prompt injection → shellRun agent as unprivileged user; hook-level destructive command guards
Shared tenant MacTreat as semi-trusted — assume other users' isolation is not your threat model
Logs exfiltrating secretsDisable 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_keys
chmod 700 /home/dev/.ssh && chmod 600 /home/dev/.ssh/authorized_keys

# As dev — basics
sudo 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

2. SSH from iPhone / MacBook (Termius)

  • Import Ed25519 key; disable password auth on VPS
  • Save host as VPS Agent with SSH key auth
  • Default command: tmux attach -t code || tmux new -s code
  • 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

PatternAgent runs onPhone UIiOS builds
levelsio VPS + SSHYour Linux VPSTermius + tmuxMacinCloud / own Mac / Actions
pocketdevTailscale Hetzner boxTermius + tmuxStill need macOS somewhere
Claude Code mobile remoteYour laptopClaude iOS appLocal Mac for Xcode
Cursor iOS cloud agentsCursor cloudCursor appCursor-managed macOS
OpenCode local + local modelsYour hardwareSSH optionalLocal Mac

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.


Related on explainx.ai

  • Claude Code VPS production workflow — June 28 manifesto — deploy evolution, live prod edits, Hetzner + Tailscale (read this first)
  • Run AI coding agents from your phone — pocketdev, Cursor iOS, Termius patterns
  • Codex $HOME deletion — full access sandboxing — why disposable VPS matters
  • OpenCode Desktop tabs — session management — visual parallel to tmux windows
  • Run open-source models locally in OpenCode — VPS + local inference variant
  • Grok Build open source — local-first vs cloud — opposite deployment philosophy
  • Thin prompts, thick artifacts — Thariq — what the agent should commit vs chat
  • What is an agent harness? — permission modes and tool loops
  • Screenpipe — local work memory for agents — optional context layer
  • Desktop Commander MCP setup — filesystem tools without leaving the harness
  • Destructive Command Guard — hook-level rm protection

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.

Yash Thakker

Written by

Yash Thakker

Yash is an AI expert with over 300K learners. Join his workshops →

Related posts

Jun 28, 2026

Claude Code on VPS Only: levelsio's Year-Long Production Workflow (June 2026)

Pieter Levels spent almost a year coding solely on a VPS with Claude Code — no laptop open, overnight /goal runs, and live production edits with only two ~10-second outages. explainx.ai unpacks the manifesto, deploy evolution, security checklist, and when teams should refuse this pattern.

Jul 22, 2026

Top 10 Closed-Source and Open-Source Agent Harnesses (2026)

The model gets the headline; the harness decides whether the agent actually finishes the task. Here are the top 10 closed-source and top 10 open-source agent harnesses builders are running in 2026 — what each one does differently, what it costs, and who should pick it.

Jul 16, 2026

You Don't Need a VPS to Auto-Publish Blogs — Railway Already Is Your Server

The levels.io-style VPS-and-tmux setup for autonomous publishing solves a problem you probably don't have if your app already deploys through Railway. Here's the alternative design — Claude Code on the web or phone for authoring, GitHub as the trigger, and a small CI safety net — plus the one real tradeoff it introduces.