OpenClaw logo
TryOpenClaw
Try for $1

OpenClaw on Android via Termux: the honest 2026 setup guide

By Linas Valiukas · April 17, 2026

Your old Pixel 4 is sitting in a drawer. It has a battery, a CPU, and Wi-Fi. That's enough to run OpenClaw as a 24/7 personal agent you control from WhatsApp or Telegram. No VPS. No cloud bill. No laptop that has to stay open.

This post walks through the three methods that actually work in April 2026, the battery and background gotchas that will kill your setup if you don't fix them, and the `trim` error that trips everyone up on first boot.

The short answer

Start with the Flutter app. Switch to a manual method only if you need to customize something the app hides.

Who this is for

People with an old Android phone who want an always-on OpenClaw agent without paying for a VPS or keeping a laptop open. Also people who want to test OpenClaw before committing to hosting decisions.

Not for: anyone running a business-critical agent. Phones aren't servers. See the closing section.

What you need

Method 1: the Flutter app (easiest)

openclaw-termux is a standalone Flutter app that bundles Termux, proot, Ubuntu, Node.js, and OpenClaw itself. One-tap install. Built-in terminal. Web dashboard at localhost:3000.

  1. Grab the latest APK from the GitHub releases page. Don't install from Play Store knockoffs - there are already two scam clones.
  2. Enable "Install from unknown sources" for your browser, then install.
  3. Open the app. First launch downloads Ubuntu and extracts it. Takes 4-10 minutes depending on your phone.
  4. The app opens a web dashboard automatically. Paste your LLM API key, pick a model, and hit save.
  5. Open the "Channels" tab and connect Telegram or Discord. WhatsApp needs QR pairing - keep the phone screen awake while you scan.

That's it. The agent is running. The app icon stays in your notification drawer as a persistent notification - don't swipe it away or Android will kill the process.

Method 2: native Termux + Node.js (leanest)

Skips Ubuntu and proot. OpenClaw runs directly on Termux's package-managed Node.js. Roughly 30-40% less RAM and 2x faster startup. The trade-off: some skills that shell out to Linux-specific binaries won't work.

  1. Install Termux from F-Droid, not Play Store. The Play Store version hasn't been updated since 2020 and will break on modern Android.
  2. Open Termux and run: pkg update && pkg upgrade -y
  3. Install dependencies: pkg install -y nodejs git python sqlite openssl ffmpeg
  4. Grant storage access: termux-setup-storage
  5. Install OpenClaw: npm install -g openclaw
  6. Hold the CPU awake: termux-wake-lock
  7. Start OpenClaw: openclaw start

The web UI comes up at http://localhost:3000 inside Termux. To reach it from your laptop on the same Wi-Fi, find your phone's IP (ifconfig wlan0) and browse to http://[phone-ip]:3000.

Method 3: Termux + Ubuntu via proot (most compatible)

Runs a full Ubuntu userland inside Termux. Slower and heavier but every OpenClaw skill works without patches. This is the method Mobile Hacker's WhatsApp-control guide uses.

  1. Install Termux from F-Droid as above.
  2. Install proot-distro: pkg install -y proot-distro
  3. Install Ubuntu: proot-distro install ubuntu
  4. Launch it: proot-distro login ubuntu
  5. Inside Ubuntu: apt update && apt install -y nodejs npm git curl
  6. Install OpenClaw the normal way: npm install -g openclaw
  7. Run it: openclaw start

You'll want a script that re-enters Ubuntu on boot. Termux:Boot from F-Droid handles that - set a script in ~/.termux/boot/start-openclaw with termux-wake-lock && proot-distro login ubuntu -- openclaw start.

The battery and background problem

This is where most phone-hosted setups die. Android will aggressively kill long-running processes, throttle CPUs under heat, and suspend Wi-Fi to save battery. OpenClaw can't run if it's frozen.

Fixes, in order of importance:

  1. Disable battery optimization for Termux or the Flutter app. Settings > Apps > Termux > Battery > Unrestricted. On Samsung, also turn off "Put app to sleep" and "Deep Sleep." On Xiaomi, disable "Battery saver" for the app and check MIUI's "Autostart" toggle.
  2. Use wakelock. termux-wake-lock keeps the CPU from suspending. Without it, your agent will appear to freeze every time the screen turns off.
  3. Charge the phone continuously but below 80%. Lithium-ion batteries degrade fast if held at 100% under load. Use a smart plug or an app like AccuBattery to cap charging at 80%.
  4. Cool the phone. Take off the case. Don't leave it in direct sun. Under thermal throttle, OpenClaw's responses can go from 2 seconds to 30 seconds.
  5. Pin Wi-Fi on. Settings > Wi-Fi > Advanced > "Keep Wi-Fi on during sleep: Always." Otherwise your WebSocket dies every time the screen goes off.

The `trim` error (and how to fix it)

Every r/openclaw Termux post eventually hits this error: Error: failed to run trim: ENOENT. OpenClaw is trying to shell out to a system filesystem-trim utility that Termux doesn't expose.

Three fixes, in order of effort:

  1. Update. Versions 2026.4.8 and later handle this gracefully. npm install -g openclaw@latest.
  2. Skip it. Add "skipSystemCommands": true to your ~/.openclaw/openclaw.json. Disables a handful of periodic maintenance tasks but OpenClaw itself runs fine.
  3. Use AidanPark's fork. openclaw-android patches this and several other Android-specific issues at build time. Single command install, no proot.

Performance reality

I ran OpenClaw on a Pixel 4a (2020) and a Pixel 7 (2022) for two weeks.

Local LLMs on-device (via Ollama or MLC) are not realistic on phones yet in 2026. You'll want to call a cloud provider - ideally a cheap one from the free/cheap models post.

Control via WhatsApp

The killer feature of phone hosting: the same device that's running OpenClaw also has WhatsApp. Pair WhatsApp as a channel inside OpenClaw (Channels > WhatsApp > Scan QR). Once paired, every message to yourself goes through the agent.

A warning: WhatsApp's multi-device pairing can kick other sessions if you pair too many times in a week. If you already use WhatsApp Web on a laptop, unlink it first. The pairing flow in OpenClaw is covered in the WhatsApp AI assistant guide.

When this is a bad idea

Phone hosting is tinkerer territory. Don't use it when:

The honest comparison: a $5/month VPS handles OpenClaw better than a $400 phone, with less babysitting. A managed hosting plan eliminates the setup entirely.

Or skip all of this

This whole guide assumes you want to fight Android's memory management, monitor a phone that can thermally throttle, and patch the `trim` error yourself.

TryOpenClaw.ai runs your OpenClaw agent on Linux servers with uptime SLAs. No battery optimization. No `trim` errors. No wakelock. You connect your messaging app and the agent just stays up. If your goal is "an always-on AI assistant," that path is a lot shorter than Termux.

If you're doing this for fun or to learn, keep going. If you're doing this to save $5 a month on a VPS, the math stops working the first time you spend an hour debugging a frozen phone.

Frequently asked questions

Do I need root to run OpenClaw on Android?

No. Every method runs in Termux's userland sandbox without root. proot gives you a Linux environment without touching the kernel.

What's the minimum phone for OpenClaw on Termux?

Snapdragon 855-class or newer, 4 GB RAM minimum, 6 GB comfortable. Pixel 4 and up. Anything older will struggle - not on OpenClaw itself, but on Node.js 20+ and cloud model latency.

How do I stop Android from killing OpenClaw?

Disable battery optimization for Termux or the Flutter app, run termux-wake-lock, and on Samsung/Xiaomi explicitly disable "Deep Sleep" and "Adaptive Battery" for the app.

Can I run local models like Ollama on my phone with OpenClaw?

Technically yes, practically no. Phones don't have the memory or thermal headroom for 7B+ models. Use a cloud model from the cheap-models list instead.

Is phone hosting good enough for production?

No. Use it for tinkering, learning, or personal side projects. Anything business-critical belongs on a VPS or managed hosting.

LV

Linas Valiukas

Founder of TryOpenClaw.ai. Software engineer writing about OpenClaw, self-hosting trade-offs, and what non-technical users actually need from an AI assistant. About the author →

Try it right now

This is just one example - OpenClaw adapts to whatever you need. Describe any workflow in plain language and it figures out the rest. Pay $1 for a full 24-hour trial, pick your messaging app, and start chatting with your own instance in under 60 seconds. Love it? $39/mo. Not for you? Walk away - we delete everything.

Try OpenClaw for $1

24h full access. No commitment. Cancel anytime.