Why Android?
You probably have an old Android phone sitting in a drawer. It has a CPU, RAM, WiFi, a battery that acts as a built-in UPS, and it draws almost no power. With Termux, it can run OpenClaw 24/7 as a personal AI agent — no cloud server, no monthly hosting bill.
This is not officially supported by the OpenClaw team, but the community has refined the process to the point where it works reliably on most Android devices with 4GB+ RAM.
Two Approaches
| Method | Complexity | Compatibility | Performance |
|---|---|---|---|
| Native Termux | Easy | Most devices | Good |
| Ubuntu in Termux | Medium | All devices | Better |
The native method installs Node.js directly in Termux. The Ubuntu method runs a full Ubuntu environment inside Termux using proot, giving you better compatibility with OpenClaw's dependencies.
Prerequisites
- •Android phone or tablet with 4GB+ RAM (8GB recommended)
- •Android 7.0 or higher
- •Termux from F-Droid — do NOT use the Google Play Store version, which is outdated and unmaintained
- •WiFi connection
- •An AI API key
Install Termux
- 1.Install F-Droid on your Android device
- 2.Open F-Droid and search for "Termux"
- 3.Install Termux from F-Droid
Method 1: Native Termux Installation
Open Termux and run:
# Update packages
pkg update && pkg upgrade -y
# Install Node.js and essential tools
pkg install nodejs-lts git -y
# Verify Node.js version (must be 22+)
node --version
# Install OpenClaw
npm install -g openclaw@latest
# Run onboarding
openclaw onboard --install-daemon
Follow the onboarding wizard to set up your API key and connect a chat platform.
One-Line Install (Community Script)
The community maintains a single-command installer:
pkg update -y && pkg install curl -y && curl -sL https://raw.githubusercontent.com/androidmalware/OpenClaw_Termux/main/install.sh | bash
This handles all dependencies automatically in 3-10 minutes depending on your network.
Method 2: Ubuntu in Termux (proot)
This method gives you a full Ubuntu environment, which provides better compatibility:
# Install proot-distro
pkg update && pkg install proot-distro -y
# Install Ubuntu
proot-distro install ubuntu
# Enter Ubuntu
proot-distro login ubuntu
# Inside Ubuntu: install Node.js
apt update && apt upgrade -y
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt install -y nodejs
# Install OpenClaw
npm install -g openclaw@latest
# Run onboarding
openclaw onboard --install-daemon
Preventing Android from Killing Termux
This is the most important step. Android aggressively kills background apps to save battery. Without these settings, your agent will stop working when you lock the screen.
1. Disable battery optimization
Go to Settings > Battery > App battery usage > Termux and set it to Unrestricted.
2. Acquire a wake lock in Termux
termux-wake-lock
Run this every time you start Termux, or add it to your ~/.bashrc.
3. Pin Termux in Recent Apps
Open the recent apps view, long-press the Termux card, and tap the pin/lock icon. This tells Android not to kill the app.
4. Disable MIUI/OneUI/ColorOS battery savers
On Chinese-brand phones (Xiaomi, OPPO, Vivo, Huawei), the custom Android skin has its own aggressive battery management. You need to disable it specifically for Termux in the manufacturer's battery settings. Search "[your brand] keep app running in background" for device-specific instructions.
Accessing the Web Dashboard
OpenClaw's web UI is available at http://localhost:3000 inside Termux. To access it from another device on the same network:
# Find your phone's IP address
ifconfig wlan0 | grep inet
Then open http://[phone-ip]:3000 from your laptop or another phone.
Performance Expectations
| Device | RAM | Experience |
|---|---|---|
| Budget phone (4GB) | Tight | Works for cloud-only inference, may be slow |
| Mid-range (6-8GB) | Good | Smooth cloud inference, basic local models (1-3B) |
| Flagship/Tablet (12GB+) | Excellent | Can run small local models via Ollama |
All AI inference is done in the cloud (unless you set up Ollama), so the phone's CPU matters less than you might think. It mainly needs enough RAM to run the Node.js gateway.
Limitations
- •No local LLM inference on most phones (unless you have 12GB+ RAM and set up Ollama for Android)
- •Battery drain: Expect 5-10% per hour with active use; less when idle
- •No official support: The OpenClaw team does not officially support Android/Termux. Community support is available on Discord in
#android. - •WhatsApp pairing: WhatsApp Web QR scanning works, but WhatsApp may occasionally require re-pairing
The Old Phone as AI Server
The sweet spot is using an old phone you no longer carry. Plug it in, connect to WiFi, set up Termux with wake lock, and forget about it. It becomes a silent, always-on AI server that costs nothing to run.
Some community members have been running OpenClaw on old phones continuously for weeks without issues. The key is disabling all battery optimization and keeping the phone plugged in.
For detailed setup walkthroughs with screenshots, see the OpenClaw_Termux guide and openclaw-android for a no-proot alternative.