All posts
Install OpenClaw on Android with Termux (2026 Step-by-Step Guide)

Install OpenClaw on Android with Termux (2026 Step-by-Step Guide)

|7 min read

Running OpenClaw directly on your phone sounds appealing -- your AI assistant living right on the device you carry everywhere. On Android, this is genuinely possible through Termux. On iOS, it is not (but there are good workarounds). This guide covers both paths honestly, including the real limitations you will encounter.

The Honest Assessment Before You Start

Let me set expectations. Running OpenClaw on a phone via Termux works, but it comes with trade-offs:

What works well:

  • Sending and receiving messages through the local gateway
  • Running scheduled tasks and cron jobs
  • Telegram bot integration (which is the primary use case anyway)
  • Persistent memory and conversation history

What does not work well:

  • Battery drain -- the gateway process consumes noticeable power
  • Background execution -- Android may kill Termux to reclaim memory
  • Performance -- gateway startup takes 60-90 seconds on most phones
  • Browser automation skills -- no headless Chrome available

If you primarily interact with OpenClaw through Telegram, running it on a phone provides limited benefit over running it on a VPS. The Telegram integration works identically regardless of where the gateway is hosted. That said, there are valid reasons to run it locally: privacy, offline access on local networks, and the satisfaction of self-hosting on hardware you own.

Part 1: Android with Termux

Prerequisites

  • Android 7.0 or later
  • At least 3 GB free storage
  • At least 2 GB RAM (4 GB recommended)
  • Termux installed from F-Droid (not the Play Store -- the Play Store version is outdated and will not work)[1]

Step 1: Install Termux and Update Packages

Download Termux from F-Droid at https://f-droid.org/en/packages/com.termux/

After installing, open Termux and run:

pkg update && pkg upgrade -y

Grant storage access when prompted:

termux-setup-storage

Step 2: Install proot-distro and Ubuntu

OpenClaw needs a full Linux environment that Termux alone cannot provide. The proot-distro tool gives you an Ubuntu installation that runs inside Termux without root access[2].

pkg install proot-distro -y
proot-distro install ubuntu

Enter the Ubuntu environment:

proot-distro login ubuntu

You are now in a full Ubuntu shell. Update it:

apt update && apt upgrade -y

Step 3: Install Node.js

OpenClaw requires Node.js 20 or later:

apt install -y curl wget git
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt install -y nodejs

Verify the installation:

node --version   # Should show v20.x.x
npm --version    # Should show 10.x.x

Step 4: Install OpenClaw

npm install -g openclaw

This takes 2-5 minutes on most phones. Do not worry if it seems slow -- ARM compilation of native modules takes longer than x86.

Verify:

openclaw --version

Step 5: Configure and Start

Set up the basic configuration:

openclaw init

Follow the interactive prompts to set your AI provider API key and preferences. Then configure the gateway:

openclaw config set gateway.mode local
openclaw config set gateway.port 3001

Start the gateway:

openclaw start

Wait for the ready signal (60-90 seconds on a phone):

[gateway] listening on :3001

Step 6: Connect Telegram

If you want Telegram integration (and you probably do -- it is the best way to use OpenClaw on mobile):

openclaw telegram setup

Follow the instructions to create a bot via BotFather and enter the token. Then pair your Telegram account:

# After sending /start to your bot, approve the pairing
openclaw pairing approve telegram <CODE>

Step 7: Keep It Running in the Background

Android aggressively kills background processes. To keep OpenClaw alive:

  1. Acquire a Termux wake lock:
termux-wake-lock
  1. Disable battery optimization for Termux:

    • Go to Settings > Apps > Termux > Battery
    • Select "Unrestricted" or "Don't optimize"
  2. Use a persistent notification: Termux shows a notification while running. Do not dismiss it -- this keeps the process alive.

  3. Consider using tmux for session persistence:

apt install tmux -y
tmux new -s openclaw
openclaw start
# Detach with Ctrl+B, then D

Even with these measures, Android may occasionally kill the process. A cron-based auto-restart helps:

# Create a restart script
cat > /root/restart-openclaw.sh << 'EOF'
#!/bin/bash
if ! openclaw status | grep -q "connected"; then
    openclaw start
fi
EOF
chmod +x /root/restart-openclaw.sh

# Add to crontab (check every 5 minutes)
apt install cron -y
service cron start
crontab -e
# Add: */5 * * * * /root/restart-openclaw.sh

Part 2: iOS -- The Hard Truth

There is no way to run OpenClaw natively on an iPhone or iPad. iOS does not allow terminal emulators with the capabilities Termux provides. There is no proot, no background process execution, and no way to run a persistent Node.js server[3].

Apps like iSH and a-Shell exist but cannot run OpenClaw due to:

  • Missing system call support required by Node.js
  • No background execution (iOS suspends apps within seconds)
  • Insufficient filesystem access

iOS Alternatives That Actually Work

Option 1: VPS + Telegram (Recommended)

Run OpenClaw on a cheap VPS and interact through Telegram. This is actually the ideal setup for any mobile user:

Your iPhone → Telegram app → OpenClaw on VPS → responds via Telegram

A $4-6/month VPS from providers like Hetzner, Vultr, or DigitalOcean runs OpenClaw comfortably. Or use ClawTank for managed hosting that requires zero server management.

Option 2: SSH from iOS

If you have OpenClaw running on a remote server, use an SSH client like Blink Shell or Termius to access it:

  1. Install Blink Shell or Termius from the App Store
  2. Connect to your VPS via SSH
  3. Run openclaw send "your message" from the terminal

This gives you full command-line access but is not practical for daily use.

Option 3: Web Interface from iOS Safari

If your OpenClaw instance has the web UI enabled and is accessible via a domain, simply open it in Safari:

https://your-openclaw-domain.com

Pair the device when prompted and interact through the web chat interface.

Performance Tips for Mobile

If you do run OpenClaw on Android, these optimizations help:

Use a Lightweight Model

Switch to a smaller, faster model to reduce processing time and battery drain:

openclaw config set ai.model "claude-sonnet-4-20250514"
# or for even lower resource usage
openclaw config set ai.model "claude-haiku-4-20250514"

Set Token Limits

Prevent runaway API calls that drain battery while processing long responses:

openclaw config set ai.maxTokens 1024

Disable Unnecessary Skills

Each loaded skill increases memory usage and startup time:

# List loaded skills
openclaw skills list

# Disable resource-heavy ones you do not need on mobile
openclaw skills disable browser-automation
openclaw skills disable code-execution

Monitor Resource Usage

# Inside proot Ubuntu
top -p $(pgrep -f openclaw)

Expect around 150-300 MB memory usage during active conversations.

When a VPS Makes More Sense

For most people, running OpenClaw on a phone is a fun experiment but not the optimal setup. A VPS offers:

  • 24/7 uptime (your phone sleeps, gets restarted, runs out of battery)
  • Better performance (even a $4 VPS outperforms most phones for server workloads)
  • No battery drain on your daily device
  • Proper background execution without Android killing your process

If you want the simplest path to OpenClaw on your phone, the answer is: run it on a server and use Telegram. The experience is identical, and you avoid every limitation listed in this guide. ClawTank gives you a running instance in under a minute with nothing to configure.

But if you want to run it locally on Android because you can -- this guide has you covered.

References

  1. Termux on F-Droid -- Official Distribution
  2. proot-distro -- GitHub Repository
  3. iOS App Sandbox and Background Execution Limits
  4. OpenClaw Installation Documentation

Ready to deploy OpenClaw?

No Docker, no SSH, no DevOps. Deploy in under 1 minute.

Get started free