Skip to content

// guides

Run Node.js on Your Phone (iPhone + Android)

You can run Node.js from your phone today, but the honest answer is that where it runs matters. Real, unmodified Node.js needs a Linux or macOS machine, so the fastest path is to install Cosyra for iOS or Cosyra for Android, sign in, and type node --version in the terminal — it is already there, because the AI coding CLIs we pre-install are Node programs. On Android you can also run Node locally in Termux with some sharp edges; on iPhone you cannot run real Node at all. Here is each option, honestly.

Quick decision — pick the approach you came for:

  • Cloud container (Cosyra) — you want real Node.js + npm with no JIT restriction and no process killer, reached from a native app. Setup in ~3 minutes ↓
  • Termux (Android) — you want Node on-device and accept that the default is Node 26 Current, arm64 native builds can fail, and Android can kill long runs. How it works ↓
  • iPhone / iPad — you searched for Node on iOS and need the hard truth about iSH, a-Shell, and play.js. Why iOS can't run real Node ↓

Not sure which fits? The side-by-side comparison ↓ lines them up on Node version, native modules, and what breaks.

This guide was written by the Cosyra team. We run Node-based tools from a phone every day, and we checked the moving parts against primary sources on 2026-06-08: the Node.js release schedule, the Termux package recipe, the iSH and a-Shell issue trackers, and Apple's App Store Review Guidelines. Versions and dates below carry that date so you can re-verify them.

Why is running Node.js on a phone hard?

Node.js is not just a language — it is the V8 JavaScript engine plus a large set of native bindings (the filesystem, networking, child processes, the npm ecosystem). Two phone-specific facts get in the way. On iOS, V8 relies on just-in-time compilation, and Apple's App Store Review Guidelines forbid third-party apps from generating and executing code that way, so the real V8 build cannot run. On Android, you can run Node in Termux, but the OS treats long-lived background processes as disposable and the userland is arm64, where some native addons have no prebuilt binary.

None of that applies to a normal Linux server. So every working approach below either runs Node on-device with those constraints (Termux) or puts Node on a real Linux box your phone talks to (a cloud container).

How can you run Node.js on a phone?

There are three realistic paths in 2026: a cloud Ubuntu container with Node pre-installed reached from a native app (Cosyra), Termux on Android, and — on iOS — a set of options that all fall short of real Node. We will be specific about what each one actually gives you.

1. Cosyra: a cloud Ubuntu container with real Node.js

This is what we build. A native iOS and Android terminal connected to a persistent Ubuntu 24.04 x86_64 container. Because Claude Code, Codex CLI, Gemini CLI, and OpenCode are all Node programs, a current Node LTS and npm are already on the PATH. You get unmodified V8, working native-module compilation, and 30 GB of persistent storage.

2. Termux: Node on-device on Android

Termux is an open-source Android terminal with a real package manager. pkg install nodejs installs Node, and for short scripts it works well. Three things to know before you lean on it:

For more on the Android side, see our guide on running a Linux container on Android.

3. iPhone and iPad: the hard truth about Node on iOS

There is no real Node.js on stock iOS, and it is worth understanding why so you do not waste an afternoon on it:

The clean fix on iPhone is the same as on a locked-down work laptop: run Node somewhere real and reach it. That is the cloud-container path, and on iOS it is effectively the only way to get unmodified Node.

How do you run Node.js on iPhone or Android with Cosyra?

You set it up in about three minutes: install the app, sign in, confirm node is on the PATH, optionally pin a version with nvm, clone a repo, and npm install. No JIT workaround, no phantom-process killer, no SSH tunnel to babysit.

Step 1: Install Cosyra and sign in

Download from the App Store or Google Play. Sign in with Apple, Google, or email. On first launch we provision a fresh Ubuntu 24.04 container.

Step 2: Confirm Node.js and npm are there

Node is already installed because the bundled AI CLIs need it. Verify it in one command. The image tracks the active LTS (Node 24 at the time of writing) and we re-bake it regularly.

cosyra — Node is already on the PATH

$ node --version

v24.4.1

$ npm --version

11.3.0

$ which node

/usr/local/bin/node

Step 3: Pin a specific Node version with nvm (optional)

Need a specific line for a project? Install nvm and switch versions per project. This is real version management, not a shim.

cosyra — installing and pinning a Node LTS with nvm

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

$ source ~/.bashrc

$ nvm install --lts # active LTS (Node 24)

Now using node v24.4.1 (npm v11.3.0)

$ nvm install 22 # pin Node 22 for a repo

Now using node v22.16.0 (npm v10.9.2)

Step 4: Clone a project and install dependencies

cosyra — npm install with native modules

$ git clone https://github.com/your-org/your-api.git

$ cd your-api && npm install

added 412 packages in 9s

 

# native addons build on x86_64 — no arm64 gotcha

Step 5: Run a script or a dev server

cosyra — running a dev server that survives a screen lock

$ npm run dev

> vite

VITE v6.0.0 ready in 412 ms

➜ Local: http://localhost:5173/

The container keeps running when you lock the phone, so the server is still up when you glance back at it — the thing Android's process killer takes away from a local Termux server.

Try it free. 1 hour on signup, no credit card. Real Node.js and npm, already installed. App Store / Google Play / Pricing details

Which Node.js version should you use in 2026?

Use Node 24. As of 2026-06-08 the Node.js release lines sit like this:

Version Codename Status (mid-2026) Use it?
Node 26 Current Only for testing the next line
Node 24 Krypton Active LTS Yes — the default pick
Node 22 Jod Maintenance LTS Fine if a dependency pins it
Node 20 Iron End-of-life (2026-04-30) No — no security fixes
Node 18 Hydrogen End-of-life (2025-04-30) No

The catch on phones: Termux's default nodejs package installs the Current line (Node 26), not an LTS, so a fresh Termux install can put you on a version most production projects do not target. In a container you control the version explicitly with nvm.

What can you actually do with Node.js from a phone?

Enough to be useful in a 15-minute gap. Clone a repo and run its test suite, bump a dependency and confirm the build still passes, run a one-off migration script, spin up a dev server to check an API response, or drive a Node-based AI CLI against the codebase. Because the container persists, you pick the same work back up on an iPad or a laptop without re-cloning anything.

That last one is the common case we see: Node is the runtime under the AI agents. If your real goal is to run Claude Code, Codex CLI, or the other agents from your phone, a working Node runtime is the foundation they sit on.

What are the real limits?

Cosyra vs Termux vs a-Shell for Node.js

Cosyra wins for a real, current Node runtime on either platform; Termux wins if you are on Android, want on-device Node, and can live with the version and process-killer caveats; a-Shell is an iOS terminal but does not run Node at all. The table lines them up, verified 2026-06-08.

Feature Cosyra Termux a-Shell
Runs real Node.js (V8) Yes Yes No (JavaScriptCore)
Platforms iOS + Android Android only iOS only
npm + native modules Yes (x86_64) Often fails on arm64 No npm
Default version Active LTS (24) Current (26) n/a
Long-running dev server Survives screen lock Phantom killer risk No
Pin versions (nvm) Yes Limited No
Price $29.99/mo after trial Free Free

If you are weighing the broader Android vs cloud question, see Cosyra vs Termux; for the iOS side, Cosyra vs a-Shell and our roundup of the best terminal apps for iPhone. The same "run a language on your phone" walkthrough for Python lives in code Python on your phone.

Frequently asked questions

Can you run Node.js on a phone?

Not natively in a way that handles most real work. Termux on Android runs Node on-device, but the default package is Current (Node 26), arm64 native modules often fail, and Android 12+ can kill long runs. iOS cannot run real Node because Apple forbids the JIT V8 needs. The reliable path on both is a cloud x86_64 Linux container reached from a native app.

Does Node.js work in Termux on Android?

Yes, with caveats. pkg install nodejs installs the Current line (Node 26.x as of June 2026); pkg install nodejs-lts installs the LTS line, and they conflict. The harder issues are arm64 native-module builds failing and the Android 12+ phantom-process killer ending long-running node processes with signal 9. Fine for short scripts; unreliable for dev servers.

Can you run Node.js on an iPhone or iPad?

Not the real thing. V8 needs JIT, which Apple blocks for third-party apps, so iSH crashes on node (no SSE2 in its emulator), a-Shell offers a JavaScriptCore engine rather than Node (no npm, no Node API), and play.js is a JavaScriptCore port of Node — compatible, not complete. Unmodified Node on an iPhone means reaching a remote Linux machine.

Which Node.js version should I use in 2026?

Node 24 (Krypton) is the Active LTS. Node 22 (Jod) is in Maintenance, and Node 20 (Iron, EOL 2026-04-30) and Node 18 (EOL 2025-04-30) are end-of-life. Node 26 is the Current release, not an LTS. In a container, nvm install --lts gives you Node 24 and nvm install 22 pins the older line for a specific project.

How do I run a Node dev server from my phone?

Run it inside a cloud container and reach the port from the app. In Cosyra you npm run dev and the process stays up when the phone locks. A local Termux server can work, but Android's phantom-process killer tends to end long-lived node processes, and stock iOS has no path to a real Node server.

tl;dr

Real Node.js needs a Linux or macOS machine. On Android, Termux runs Node on-device but defaults to Node 26 Current, struggles with arm64 native modules, and gets long processes killed. On iPhone there is no real Node — iSH crashes and a-Shell is JavaScriptCore, not Node. The reliable path on both is a cloud Ubuntu container with Node pre-installed (Cosyra), where npm and native modules just work and you pin any LTS with nvm.

App Store / Google Play. 1 hour free, no credit card.

Run real Node.js from your phone in three minutes. Install Cosyra, open the terminal, type node --version.

See pricing