You can run OpenCode on iPhone today, but not on the phone itself. OpenCode
ships prebuilt binaries for macOS, Linux, and Windows, and iOS gives you
none of those. There is no Termux for iPhone, and the local terminals that
do exist cannot run a modern Node.js. So on an iPhone the agent always runs
on a host elsewhere and your phone drives it. The fastest path is
Cosyra on the App Store: a cloud Ubuntu
container with OpenCode already installed that you reach from a native iOS
app. Tap the OpenCode shortcut and you are in the TUI, on a free model.
Plans start at $20/month, and eligible new users can start a
7-day free trial in the App Store app. The two other real paths are SSH from
Blink Shell into your own Linux box, and OpenCode's
own opencode serve headless server reached over a private network.
I took the Cosyra steps and screenshots below in the Cosyra 2.9.0 iPhone app on November 3, 2026. The OpenCode reply and provider screens are OpenCode's own and date from October.
This is the iPhone-specific companion to our
OpenCode on your phone
walkthrough, which covers iPhone and Android together. The iPhone earns its own
page because iOS changes the answer in one big way: Android has Termux, so on
a Pixel or Galaxy you can run a native aarch64 community build of OpenCode, or
fall back to a proot-distro chroot, to get closer to the metal (we
cover both in
OpenCode on Android). iOS has
no equivalent. That single difference is why the iPhone story is all about
reaching a host, never about running OpenCode on the device. If you want the
bigger tablet form factor, see
OpenCode on iPad; for the full
picture of every agent on mobile, start at our
AI coding agents on mobile
pillar.
Quick decision. Jump to what matches your situation:
- Just give me the setup. Three-minute path: install Cosyra and tap the OpenCode shortcut. The first prompt runs on a free model. Cosyra iPhone setup ↓
- My dev box is Linux. SSH in from Blink Shell, or skip the host with a cloud container. Three options compared ↓
- I want OpenCode's own remote, for free. Run
opencode serveon a machine you own. Three options compared ↓ - Why can't I just use iSH like on a Linux box? Because modern Node crashes under iSH's i386 emulation. Why nothing runs locally ↓
Why won't OpenCode run locally on an iPhone?
OpenCode will not run locally on an iPhone because iOS has no Linux userland
and the on-device terminals cannot run a modern Node.js. OpenCode is
distributed as a Node package (opencode-ai) plus a
platform-matched prebuilt binary, and the README lists its targets as macOS,
Linux, and Windows. iOS is not one of them, and Apple does not allow a
Termux-style app that ships a general-purpose Linux environment with a
package manager. So the two well-known iOS terminals each hit a wall:
- iSH emulates 32-bit i386 Alpine Linux. Modern Node.js crashes
with
Illegal instructionunder that emulation, tracked in iSH issue #2335, open since 2024-01-21, and the i386-only target rules out OpenCode's prebuilt binaries anyway. No working Node means no OpenCode. - a-Shell ships native iOS-compiled tools and a curated set of
WebAssembly binaries. It is genuinely useful, but it has no
apt, noapk, and no global npm install path, so there is nowhere to put OpenCode.
Here is an opinion the "just self-host it" crowd pushes back on: keeping a
machine awake at home so your phone has something to talk to is the exact
chore that mobile coding is supposed to remove. OpenCode's
opencode serve is a genuinely good design, and we link the docs below,
but a server you babysit is still a server you babysit. When the home box sleeps
on the train, the phone has nothing. We pre-install OpenCode in a cloud container
precisely so there is no second computer in the loop. For the local-terminal limits
in more depth see
Termux for iPhone and
Cosyra vs iSH.
What are the three ways to run OpenCode on iPhone?
There are three real ways to run OpenCode from an iPhone as of 2026-06-30: a
cloud terminal with OpenCode pre-installed (Cosyra, native iOS app), SSH
from a terminal app into your own always-on Linux box, or OpenCode's own
headless
opencode serve on a machine you own, reached over a private network.
All three share the same shape: the agent runs on a host and the iPhone is the
remote. They differ in who owns and babysits that host.
1. Cosyra (cloud terminal, native iOS app)
This is what we build. The Cosyra iOS app gives you a persistent Ubuntu container with one-tap shortcuts for OpenCode, Claude Code, Codex, Cursor, Grok and Antigravity, 30 GB of storage, and hibernation that resumes exactly where you left off. We put the agents one tap away because setup friction is the thing that actually kills agent-driven mobile coding; nobody wants to debug a curl installer or a Node version on a phone keyboard. There is no SSH tunnel to keep alive and no laptop that has to stay awake. The same container is reachable from iPhone, Android, and web, so you can start on the couch and pick it up in a waiting room.
- Works when: you want zero setup and a host you do not have to maintain, and you want the real OpenCode TUI rather than a remote view of it.
- Breaks when: you have no internet. The container lives in the cloud, so there is no offline mode. That is a real trade-off against a local terminal.
- Cost: Core is $20/month and Pro is $30/month. Eligible new users can start a 7-day free trial in the App Store app. OpenCode is free and MIT-licensed and starts on a free model with a daily limit. For more, connect your own provider and pay it directly. See pricing.
2. SSH from Blink Shell into your own machine
The classic remote-into-your-own-box path.
Blink Shell is a paid iOS terminal built around
SSH and Mosh. Mosh matters on a phone: it keeps the session alive across the cellular
handoffs and IP changes that drop plain SSH the moment you walk between cell towers.
You SSH into a Linux box or VPS where you installed OpenCode with npm i -g opencode-ai@latest or the
curl -fsSL https://opencode.ai/install | bash script, start
tmux so the TUI survives app switching, and drive it from there.
- Works when: you already keep an always-on machine and are comfortable with SSH plus tmux.
- Breaks when: the machine sleeps, the home connection drops, or you do not want to keep a second computer awake just to give the phone a target.
- Cost: the Blink+ subscription plus whatever the host costs. Tailscale's free tier covers the personal networking.
3. opencode serve / opencode web on your own host
This is OpenCode's own remote-friendly design, and it is the one genuinely
distinctive path here.
opencode serve
runs a headless HTTP server (default port 4096, default hostname
127.0.0.1), and opencode web starts a browser UI you
can open in Safari. Because the default binds to localhost, the safe way to reach
it from a phone is over a private network rather than the public internet: put
the host on a Tailscale
tailnet, run the server, and set OPENCODE_SERVER_PASSWORD so it is
not wide open. Then the iPhone hits the web UI or the API directly.
- Works when: you run a free, open-source agent on hardware you control and are comfortable with the networking setup.
- Breaks when: the host sleeps, or you do not want to expose and secure a server just so the phone has a target. The default localhost bind means anything wider is your responsibility to lock down.
- Cost: free software (MIT) plus the host and your model-provider tokens. This is the cheapest path if you already run an always-on box.
How do you set up OpenCode on iPhone with Cosyra?
Install Cosyra from the App Store, start your workspace and tap the OpenCode shortcut. OpenCode is already installed and opens on a free model, so there is no Node install, no SSH tunnel and no API key for the first prompt. It takes about three minutes.
Step 1
Install Cosyra on iPhone
Install Cosyra from the App Store. Sign in with Apple, Google, GitHub or email, then pick a plan: Core or Pro.
The app opens on Terminals. On a new account the chip next to the title says Not started. Tap Start your workspace once and it turns Awake.
Step 2
Tap the OpenCode shortcut
The Your shortcuts row holds Claude Code, Codex, Cursor, Grok, Antigravity and OpenCode. On an iPhone the first three fit on screen, so swipe the row to the left and tap OpenCode. It opens in a terminal in your workspace. There is no install step and no sign-in screen. The workspace had OpenCode 2.2.4 when I took these screenshots.
The line under the prompt shows the agent and the model: Build and Big Pickle, a free model from OpenCode Zen. The footer shows the folder you are in.
Step 3
Send a first prompt
Tap the terminal to bring up the keyboard, type a request and press
return. I asked for a hello world script in Python and for it to be run.
OpenCode wrote hello.py, ran it and printed the output.
The free model has a daily message limit. When you reach it, OpenCode
shows Free limit reached with the reset time and points you
to /connect and /models.
Step 4
Connect your own provider
Type /connect and press return. OpenCode lists its providers, with
the popular ones first:
- OpenCode Zen and OpenCode Go
- OpenAI, with a ChatGPT plan or an API key
- GitHub Copilot
- Anthropic
Pick one and follow its sign-in. Then switch models with
/models.
Step 5
Run OpenCode in your own repo
Go back to Terminals, tap New and choose
New terminal. I ran
opencode --version && node --version && git --version
and got OpenCode 2.2.4, Node 22.23.4 and git 2.34.1.
Clone your repository, cd into it and type
opencode.
The toolbar above the keyboard has Esc, Tab, Ctrl and the arrow keys. Tap Ctrl for Shift+Tab, which switches OpenCode between its Build and Plan agents, and Ctrl+C, which interrupts it. OpenCode keeps running in the workspace when you leave the terminal.
Step 6
Prefer a chat? Tap Code
Open the sidebar and tap Code. It opens a chat instead of a terminal.
The model chip next to the message box opens the picker. New chats start on OpenCode's free models: GLM-5.3-Flash and DeepSeek V4.1 Flash when I checked.
Try Cosyra. Eligible new users can start a 7-day free trial in the App Store app. App Store / Google Play / Pricing details
What does iPhone OpenCode look like in practice?
iPhone OpenCode in practice is short prompts, one hand, and dead time that used to be wasted. The phone is not where you do a four-hour refactor; it is where you keep a long task moving while you are away from the desk. Two patterns we run constantly:
The commute kickoff
Standing on the platform, you remember the failing CI job from last night. Open Cosyra, pull the branch, and hand OpenCode the whole problem in one dictated sentence. Press and hold the mic key, say it, release:
$ git fetch origin && git checkout fix/ci-flake
$ opencode
› The auth integration test is flaky in CI. Reproduce it,
find the race, and propose a fix with a regression test.
By the time the train arrives you have a diff to skim. Because OpenCode is
provider-agnostic, you can switch the model on the fly with
--model if the cheap model stalls on the hard part, useful when you
are watching token spend on a personal key.
The waiting-room review
Fifteen minutes in a waiting room is enough to review a teammate's pull
request. Pull the branch, drop into OpenCode's plan agent so it reads
without editing, ask for a structured review of what you care about, and post
it with gh pr review --comment from the same terminal. The container
holds your gh auth, so there is no login dance. This is the kind of work the phone
is genuinely good at: bounded, reviewable, no deep window juggling required. We
think the on-screen keyboard is fine for this. The work is prompts and approvals,
not hand-typing functions, and most people who say otherwise have not tried it
on a real commute.
How do the iPhone options compare?
The three paths line up cleanly against what matters for an agent client: whether you maintain the host, whether you get the real CLI, and what happens when you switch apps or lose signal. The table covers the real options as of 2026-06-30. For the wider field of editors and terminals beyond OpenCode, our coding on iPhone guide lines every option up the same way, and best terminal apps for iPhone covers the client side.
| Feature | Cosyra (iOS app) | SSH via Blink Shell | opencode serve / web |
|---|---|---|---|
| Gives you the real OpenCode | Yes (cloud host) | Yes (your host) | Yes (your host) |
| OpenCode pre-installed | Yes | You install on host | You install on host |
| Requires another machine | No | Yes (always-on) | Yes (always-on) |
| Interface on the phone | Full TUI | Full TUI | Web UI / API |
| Persistent workspace | Yes (30 GB) | On your host | On your host |
| Setup time | ~3 min | 15–30 min | 20–40 min |
| Cost on iPhone | From $20/mo | Blink+ sub + host | Free software + host |
Which path should you pick?
Choose Cosyra if you want the real OpenCode TUI with no host to maintain and
the same container across iPhone, Android, and web, and the other three
agents next to it. Choose Blink plus SSH if your dev box is already
always-on and Linux, and you want OpenCode running on hardware you control.
Choose
opencode serve if you want to lean into OpenCode's open-source, self-hosted
design for free and do not mind the networking setup. It is the honest pick for
anyone who values MIT-licensed software on their own box over convenience. The
one combination iOS cannot give you is OpenCode running on the phone itself; on
Android the calculus shifts because Termux gets you closer to local, which is
the whole point of our
OpenCode on Android guide.
Frequently asked questions
Can you run OpenCode directly on an iPhone?
Not on the device itself. OpenCode ships prebuilt binaries for macOS,
Linux, and Windows; there is no iOS build and no Termux for iPhone, so iOS
gives you no Linux userland and no modern Node to install it into.
OpenCode always runs on a host elsewhere and the iPhone drives it: a cloud
Ubuntu container with OpenCode pre-installed (Cosyra), SSH into your own
Linux box, or
opencode serve on a machine you own.
[source: OpenCode README, supported platforms macOS/Linux/Windows]
Does OpenCode have an iPhone app or a mobile remote like Codex?
No. OpenCode is a CLI and TUI with no native mobile app, and unlike
OpenAI's Codex or GitHub Copilot CLI it has no first-party phone
remote-control surface. What it does have is a headless server: opencode serve
exposes an HTTP API and opencode web starts a browser UI, both
self-hosted. The closest thing to an official remote route is running that server
on a machine you own and reaching it from the phone.
[source: OpenCode docs, server / opencode serve and opencode web]
Why can't iSH or a-Shell run OpenCode on iPhone?
Both are real on-device terminals, but neither runs a modern Node.js, and
OpenCode's installers expect a real Node plus a platform-matched binary.
iSH emulates 32-bit i386 Alpine Linux and current Node crashes there with
Illegal instruction. a-Shell ships curated native and
WebAssembly tools with no apt, no apk, and no
global npm install path. Fine for shell scripting on the go; not a path to
OpenCode.
[source: iSH GitHub issue #2335, Node "Illegal instruction"]
Can I run opencode serve on my own machine and use it from my iPhone?
Yes, and this is OpenCode's own remote-friendly design.
opencode serve runs a headless HTTP server (default port 4096,
default hostname 127.0.0.1); opencode web starts a
browser UI. To reach it from a phone, bind it to your private network rather
than the public internet. A Tailscale tailnet is the clean way. And set
OPENCODE_SERVER_PASSWORD so it is not open. You are still keeping
a machine awake for the phone to talk to.
[source: OpenCode docs, server flags and OPENCODE_SERVER_PASSWORD]
Is OpenCode free to run from an iPhone?
The OpenCode agent itself is free and MIT-licensed; you pay your model
provider directly for tokens. So the SSH and opencode serve
paths cost only the host plus model usage. Cosyra is the paid convenience layer:
the container, the pre-installed agents and the native iOS app. On Cosyra, OpenCode
starts on Big Pickle, a free OpenCode Zen model with a daily message limit,
so the first prompts need no key. For more, run /connect and pay
that provider directly.
[source: OpenCode README, MIT license and provider-pays model]
What terminal app is best for SSHing into an OpenCode host from iPhone?
A native SSH/Mosh client like Blink Shell holds a session better than a
web terminal, because Mosh survives the cellular handoffs that drop plain
SSH when you walk between cell towers. Start tmux on the host so
the OpenCode TUI survives app switching. SSH still needs a machine on the other
end, and a cloud container removes both the SSH client and the host you would
otherwise maintain.
[source: Hacker News, "Show HN: Echo, an iOS SSH+mosh client"]
tl;dr
OpenCode does not run locally on an iPhone. iOS has no Termux and the
on-device terminals cannot run modern Node. Three real ways to reach it as
of 2026-06-30: Cosyra (cloud terminal, native iOS app, OpenCode
pre-installed, persistent container, no other machine required), SSH from
Blink Shell into your own Linux box, or OpenCode's own opencode serve headless server on a machine you keep awake, reached over Tailscale. The phone
is the remote; the host does the work.
App Store / Google Play. Sign up and pick a plan. Eligible new users can start a 7-day free trial in the App Store app.
Run OpenCode from your iPhone in 3 minutes. Install Cosyra, tap the OpenCode shortcut and send your first prompt.