Skip to content

// guides

Run Qwen Code on Your Phone (iPhone + Android)

You can run Qwen Code on your phone today, iPhone or Android, but not by installing an app, because Alibaba ships no mobile build. Qwen Code is a Node.js command-line tool that needs Node 22 or newer and a real Linux shell. The fastest path: install Cosyra for iOS or Cosyra for Android, open the Ubuntu container, confirm Node is 22+, then npm install -g @qwen-code/qwen-code. Qwen Code is not one of the agents we pre-install, so this is the one guide in the set where you add the tool yourself. 1 hour free on Cosyra signup, no credit card.

This guide was written by the Cosyra team. We install and run Qwen Code in a Cosyra container from a phone, and we cross-checked every claim about Qwen Code against the official QwenLM/qwen-code repo and the Qwen Code docs, verified 2026-05-22.

One thing changed recently and trips everyone up: the free Qwen OAuth tier was discontinued on 2026-04-15. The quota was cut from 1,000 to 100 requests per day on 2026-04-13, then the free tier was removed two days later. If a tutorial tells you to "just sign in with Qwen OAuth for free," it predates that change. As of 2026-05-22 you bring an API key.

Decision diagram: from a Cosyra container, run node --version; if Node is 22 or newer install Qwen Code with npm and authenticate with an API key, otherwise install Node 22 with nvm first.
The Node 22 gate for Qwen Code on a phone — verified 2026-05-22 against the QwenLM/qwen-code README.

What is Qwen Code?

Qwen Code is Alibaba's open-source terminal coding agent, published as the @qwen-code/qwen-code npm package under Apache-2.0. The latest release is v0.16.0 (2026-05-21), and the repo sits at roughly 24,600 GitHub stars as of 2026-05-22. The README's tagline calls it "an open-source AI agent that lives in your terminal," and it pairs the CLI with Alibaba's open-weight Qwen3-Coder model.

Here is the part most blog posts skip: Qwen Code is a fork of Google's Gemini CLI. The README says so directly — "This project is based on Google Gemini CLI… our main contribution focuses on parser-level adaptations to better support Qwen-Coder models." That lineage is useful to know, because if you already run Gemini CLI on your phone, the command surface, the /auth flow, and the project structure of Qwen Code will feel familiar. The two diverge on the model and on cost.

The opinion we hold that Alibaba's marketing would soften: the headline feature of Qwen Code right now is not raw capability, it is that Qwen3-Coder is a genuinely good open-weight model you can point the CLI at. If you want the strongest closed model on a phone, Claude Code is still our default. We reach for Qwen Code specifically when we want an open-weight model in the loop and we are bringing our own key anyway.

How can you run Qwen Code on a phone?

You can run Qwen Code on a phone three ways, and all three put the actual Node process somewhere with a real shell: a cloud Ubuntu container reached from a native mobile app (Cosyra), Termux on Android with workarounds, or an SSH client into a VPS you own. Qwen Code needs Node 22+, which is the detail that decides how painful each path is. Comparison current as of 2026-05-22.

1. Cosyra: cloud Ubuntu container, you add Qwen Code with npm

This is what we built: a native iOS and Android terminal connected to a persistent Ubuntu 24.04 container. Claude Code, Codex CLI, OpenCode, and Gemini CLI are already installed; Qwen Code is the one you add. On a clean Node 22 it is a single npm install -g and you are running.

2. Termux on Android, with workarounds

Install Termux from F-Droid, pkg install nodejs to get a recent Node, then npm install -g @qwen-code/qwen-code. On paper this works. In practice, the QwenLM/qwen-code repo has an open issue titled "Error Install Qwen latest version in termux," and Node-on-Termux installs routinely hit native-module and libc mismatches. Termux runs on Android's Bionic libc and an arm64 userland, which is precisely where these binary installs tend to fail.

3. SSH from an iOS client into your own VPS

On iPhone or iPad, an SSH client like Blink Shell into a VPS works. Spin up a box (Hetzner, Scaleway, DigitalOcean), install Node 22 and npm install -g @qwen-code/qwen-code on it, SSH in inside a tmux session, and run qwen. API-key auth is the simplest path here because a browser round-trip over SSH is awkward.

How do you set up Qwen Code on iPhone or Android?

You set up Qwen Code on iPhone or Android in about five minutes with Cosyra: install the app, open the container, confirm Node is 22+, install Qwen Code with npm, authenticate with an API key, and run qwen. The Node check is the step that saves you a confusing failure later.

Step 1: Install Cosyra and open a container

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 with Node.js, Python, Git, and tmux already on it.

cosyra, fresh container first-launch banner

Welcome to Cosyra.

Ubuntu 24.04.1 LTS (x86_64)

Pre-installed: claude, codex, gemini, opencode

(qwen is not pre-installed — we add it below)

Step 2: Check the container's Node version

Qwen Code requires Node.js 22 or newer — the README carries a node >= 22.0.0 badge. Check what you have before installing, because an install against Node 20 fails in a way that is annoying to diagnose.

cosyra, checking node before installing qwen

$ node --version

v20.18.1

# below 22 — bump it in the next step

Step 3: Install Node 22 with nvm (if you are below 22)

If node --version is under 22, install Node 22 with nvm. The container has persistent storage, so this is a one-time step — it survives hibernation and the next time you open the app.

cosyra, installing node 22 with nvm

$ nvm install 22 && nvm use 22

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

$ node --version

v22.14.0

Step 4: Install Qwen Code with npm

With Node 22 in place, install Qwen Code globally and confirm the binary is on your PATH.

cosyra, installing qwen code

$ npm install -g @qwen-code/qwen-code@latest

added 1 package in 14s

$ qwen --version

0.16.0

Step 5: Authenticate with an API key and run qwen

Launch qwen and run /auth. Because the free OAuth tier ended on 2026-04-15, pick the API-key path: an Alibaba Cloud Model Studio key, an Alibaba Coding Plan, or any OpenAI-compatible key you bring. Export it once and it persists in your shell config.

cosyra, authenticating qwen with an api key

$ echo 'export OPENAI_API_KEY="your-key-here"' >> ~/.bashrc

$ source ~/.bashrc

$ git clone https://github.com/your-org/your-project.git && cd your-project

$ qwen

Qwen Code 0.16.0 — workspace: /home/cosyra/your-project

> Summarize this repo and flag the riskiest files.

Try it free. 1 hour on signup, no credit card. Extend with a 10-hour, 7-day trial when you want more. Claude Code, Codex CLI, OpenCode, and Gemini CLI come pre-installed; add Qwen Code with one npm command. App Store / Google Play / Pricing details

What can you actually do with Qwen Code on your phone?

The honest pitch for Qwen Code on a phone is open-weight model access from a terminal you already carry. Three sessions we run from a phone.

Review a diff on the train with an open-weight model

You pushed a branch before leaving the office. On the train home, open Cosyra, cd into the repo, run qwen, and ask it to review the diff against main and flag anything risky. Qwen3-Coder is tuned for code, and you are paying your own key, so a long review session is a cost you control rather than a metered surprise.

Generate tests for a module from the couch

Saturday morning, phone in hand. Point Qwen Code at a file: "read src/billing/invoice.ts and write a Vitest suite for the three pricing tiers and the proration edge cases." Review the proposed test file, approve, run it in the same shell.

Compare an open model against your closed default

Because Qwen Code shares Gemini CLI's bones and you can also run Claude Code and Codex CLI in the same container, a phone session is a low-stakes place to A/B the same prompt across an open-weight model and a closed one. We do this when deciding which agent to keep on a given repo. The honest answer is usually "it depends on the task," which is exactly why having all of them one command apart is useful.

What are the real limits of running Qwen Code on a phone?

Knowing where Qwen Code stops helps you match it to the right job instead of fighting it.

How does Cosyra compare to Termux and Blink+VPS for Qwen Code?

Cosyra wins on a clean x86_64 Node 22 and dual-platform use; Termux wins if you are an Android power user who accepts the install tax; an SSH client plus a VPS wins on iOS if you want a box you own. None is strictly best. Comparison as of 2026-05-22.

Feature Cosyra Termux + workarounds Blink + VPS
Qwen Code install One npm command on Node 22 Brittle (open Termux issue) You install on the VPS
Node 22 available cleanly Yes (nvm, persistent) Sometimes; libc mismatches Yes
Platforms iOS + Android Android only iOS only
Architecture x86_64 arm64 / Bionic x86_64 (typical VPS)
Requires always-on machine No No (local only) Yes (your VPS)
Setup time (cold) ~5 min 30 min + troubleshooting 30 to 60 min
Price (not counting tokens) $29.99/mo after trial Free $19.99/yr + VPS (~$5–40/mo)

Who should pick each option?

Choose Termux if you are on Android, you live in the terminal, and you do not mind pinning versions and debugging the occasional native-build failure to keep everything local and free. Choose an SSH client plus a VPS if you are on iOS, you already run a box, and you want full control of the host. Choose Cosyra if you want a clean Node 22 on both iOS and Android without maintaining a machine, and you want Claude Code, Codex CLI, OpenCode, and Gemini CLI sitting next to Qwen Code in the same container.

For the same walkthrough with the agents we pre-install, see Gemini CLI on phone (the tool Qwen Code is forked from), OpenCode on phone (the other open-source agent), and Codex CLI on phone.

Frequently asked questions

Can you run Qwen Code on a phone?

Yes, indirectly. Qwen Code is a Node.js 22+ command-line tool with no native iOS or Android build, so you run it on a real Linux shell and drive that shell from your phone. The least-friction path is a cloud Ubuntu container reached from a native app: confirm Node 22, then npm install -g @qwen-code/qwen-code.

Is the Qwen Code free OAuth tier still available?

No. The free Qwen OAuth tier was discontinued on 2026-04-15. The repo's own auth changes show the quota cut from 1,000 to 100 requests per day on 2026-04-13, then the free tier disabled entirely. As of 2026-05-22 you authenticate with an API key or a Coding Plan.

Why did the free request quota drop before it was removed?

Alibaba adjusted the free OAuth quota from 1,000 to 100 requests per day on 2026-04-13 as a policy change, then removed the free OAuth tier two days later. If you saw a sudden 429 "free allocated quota exceeded" around then, that is why. Bring an API key for a stable path.

Does Qwen Code install cleanly on Termux on Android?

Not reliably as of 2026-05-22. There is an open repo issue titled "Error Install Qwen latest version in termux," and a broader class of install failures where a system's Node hits a glibc-version mismatch. Termux's arm64 Bionic userland is where Node-native installs commonly break, so an x86_64 cloud container is the lower-friction route on Android.

What Node.js version does Qwen Code need?

Node.js 22.0.0 or newer. The README badge reads node >= 22.0.0 and the prerequisites say "Make sure you have Node.js 22 or later installed." On a container that defaults to Node 20, install Node 22 with nvm install 22 before the npm install.

Is Qwen Code the same as Gemini CLI?

No, but it is a fork of it. The README states the project "is based on Google Gemini CLI" with "parser-level adaptations to better support Qwen-Coder models." The command surface is close to Gemini CLI; the model and the auth model differ.

tl;dr

Qwen Code is Alibaba's open-source terminal agent, forked from Gemini CLI. It is a Node.js 22+ CLI with no mobile build, so on a phone you run it on a Linux shell. Use Cosyra if you want a clean Node 22 on iOS and Android without maintaining a box — install the app, bump Node to 22, then npm install -g @qwen-code/qwen-code. Use Termux if you are an Android power user who accepts the install tax. Either way, the free OAuth tier ended 2026-04-15, so bring an API key.

App Store / Google Play. Sign up for 1 hour free, no credit card. Extend with a 10-hour, 7-day trial when you want more.

Run Qwen Code from your phone. Install Cosyra, confirm Node 22, install Qwen Code with npm, run qwen.

See pricing