guide android termux mobile deployment

Running OpenClaw on Android with Termux: Turn Your Old Phone into a 24/7 AI Agent

OpenClaws.io Team

OpenClaws.io Team

@openclaws

March 6, 2026

5 min read

Running OpenClaw on Android with Termux: Turn Your Old Phone into a 24/7 AI Agent

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

MethodComplexityCompatibilityPerformance
Native TermuxEasyMost devicesGood
Ubuntu in TermuxMediumAll devicesBetter

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. 1.Install F-Droid on your Android device
  2. 2.Open F-Droid and search for "Termux"
  3. 3.Install Termux from F-Droid

Method 1: Native Termux Installation

Open Termux and run:

bash
# 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:

bash
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:

bash
# 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

bash
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:

bash
# Find your phone's IP address
ifconfig wlan0 | grep inet

Then open http://[phone-ip]:3000 from your laptop or another phone.

Performance Expectations

DeviceRAMExperience
Budget phone (4GB)TightWorks for cloud-only inference, may be slow
Mid-range (6-8GB)GoodSmooth cloud inference, basic local models (1-3B)
Flagship/Tablet (12GB+)ExcellentCan 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.

Stay in the Loop

Get updates on new features, integrations, and lobster wisdom. No spam, unsubscribe anytime.