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
- Easiest: the openclaw-termux Flutter app. Download the APK, tap install, it handles Termux, proot, Ubuntu, Node, and OpenClaw itself.
- Leanest: native Termux with Node.js. No proot, no Ubuntu. Faster but more manual.
- Most compatible: Termux + Ubuntu via proot. Slower but handles every skill and plugin OpenClaw expects.
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
- An Android phone from 2019 or newer - Snapdragon 855-class or anything Pixel 4 and up. 4 GB RAM minimum, 6 GB comfortable.
- At least 8 GB of free storage. Ubuntu via proot chews through ~3 GB by itself.
- A reliable Wi-Fi network. Mobile data works but drops during OpenClaw's WebSocket heartbeat cost you tool call failures.
- A charger the phone can sit on permanently. Lithium-ion batteries degrade fast if you leave them at 100% under load. More on that below.
- An API key for an LLM provider. See the free and cheap model setup post if you don't want to pay Anthropic.
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.
- Grab the latest APK from the GitHub releases page. Don't install from Play Store knockoffs - there are already two scam clones.
- Enable "Install from unknown sources" for your browser, then install.
- Open the app. First launch downloads Ubuntu and extracts it. Takes 4-10 minutes depending on your phone.
- The app opens a web dashboard automatically. Paste your LLM API key, pick a model, and hit save.
- 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.
- Install Termux from F-Droid, not Play Store. The Play Store version hasn't been updated since 2020 and will break on modern Android.
- Open Termux and run:
pkg update && pkg upgrade -y - Install dependencies:
pkg install -y nodejs git python sqlite openssl ffmpeg - Grant storage access:
termux-setup-storage - Install OpenClaw:
npm install -g openclaw - Hold the CPU awake:
termux-wake-lock - 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.
- Install Termux from F-Droid as above.
- Install proot-distro:
pkg install -y proot-distro - Install Ubuntu:
proot-distro install ubuntu - Launch it:
proot-distro login ubuntu - Inside Ubuntu:
apt update && apt install -y nodejs npm git curl - Install OpenClaw the normal way:
npm install -g openclaw - 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:
- 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.
- Use wakelock.
termux-wake-lockkeeps the CPU from suspending. Without it, your agent will appear to freeze every time the screen turns off. - 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%.
- 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.
- 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:
- Update. Versions 2026.4.8 and later handle this gracefully.
npm install -g openclaw@latest. - Skip it. Add
"skipSystemCommands": trueto your~/.openclaw/openclaw.json. Disables a handful of periodic maintenance tasks but OpenClaw itself runs fine. - 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.
- Pixel 4a, 6 GB RAM - works but tight. Method 2 (native Termux) only. Gets thermally throttled if you stack too many skills. One active skill, heartbeats every 60s, cheap cloud model: fine. Multi-agent or local model: forget it.
- Pixel 7, 8 GB RAM - genuinely usable. All three methods work. Method 3 (Ubuntu proot) adds ~800 ms to tool call latency but everything runs.
- Anything older than 2019 - skip it. Node.js 20+ is the minimum OpenClaw requires, and older chipsets run it too slowly to feel like a real agent.
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:
- Your agent is business-critical. If it's replying to customers, a frozen phone isn't acceptable.
- You have multiple users. Phones can't handle concurrent sessions at scale.
- You need uptime guarantees. Android's OOM killer answers to nobody.
- Your phone is your daily driver. Running OpenClaw on your main device drains battery, throttles performance, and kills other apps.
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.
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 $124h full access. No commitment. Cancel anytime.