Most people think you need a server or a laptop to run an AI agent. You do not. OpenClaw runs right on your Android phone — and this guide shows you exactly how to set it up.
All you need is your phone and a free terminal app called Termux. No extra hardware. No complicated tools. Just follow the steps and your personal AI agent will be live on your device.
Android Requirements for OpenClaw
| Requirement | Details |
|---|---|
| Android version | Android 10 or newer (older may work but is not recommended) |
| RAM | At least 4 GB (2 GB minimum, but expect slowdowns) |
| Storage | At least 2 GB free for Termux, proot-distro, and OpenClaw |
| Internet | Stable Wi-Fi recommended — mobile data works but may be slower |
| Terminal app | Termux — download and install on your Android phone |
| Linux environment | proot-distro with Ubuntu 22.04 LTS inside Termux |
| API key | An API key from Anthropic, OpenAI, Google, or another provider |
How to Install OpenClaw on Android
Step 1 — Install Termux
Download and install Termux from Google Play Store. Open it after installation and update the package list to make sure everything is fresh.
pkg update && pkg upgradeThis keeps your Termux environment clean and avoids errors when installing packages later.
Step 2 — Set Up a Linux Environment
OpenClaw needs Linux tools to run. Install proot-distro and create an Ubuntu environment inside Termux.
pkg install proot-distro -y
proot-distro install ubuntu
proot-distro login ubuntuAfter running the last command, you will be inside an Ubuntu shell. All the following steps run inside this Ubuntu environment.
Step 3 — Install Node.js
OpenClaw requires Node.js 18 or newer. Install it from the official NodeSource repository to make sure you get a supported version.
apt update
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt install -y nodejsCheck that Node.js installed correctly before moving on.
node -v
npm -vBoth commands should return a version number. If they do, you are ready for the next step.
Step 4 — Install OpenClaw
Run the OpenClaw installer from inside your Ubuntu environment. This downloads and sets up all the required files automatically.
curl -fsSL https://openclaw.ai/install.sh | bashIf curl is not found, install it first and then run the command above again.
apt install -y curlStep 5 — Complete Onboarding
After installation, run the onboarding command to configure OpenClaw. The --install-daemon flag sets up a background service so OpenClaw keeps running even after you close the terminal.
openclaw onboard --install-daemonThe setup wizard will ask you to:
- Accept the disclaimer
- Choose your AI provider (Anthropic, OpenAI, Google, etc.) and paste your API key
- Confirm the default gateway port (18789)
- Choose a messaging app — Telegram, WhatsApp, Discord, or others
- Follow the on-screen steps to connect your messaging account
Step 6 — Check That It Is Running
Once setup is complete, confirm that OpenClaw is active.
openclaw gateway statusYou can also open the control dashboard in your Android browser to verify everything is working.
# Open this in your Android browser
http://127.0.0.1:18789/If the dashboard loads and the gateway shows as running, your agent is live. Send it a message from your connected app to test it.
Best Way to Keep It Stable on Android
Android is built to manage battery life, which means it will try to kill background processes including your agent. Here is how to prevent that.
- Disable battery optimization for Termux — Go to Settings → Apps → Termux → Battery → Unrestricted
- Lock Termux in recent apps — Some Android versions let you lock apps so they are not killed when you swipe away
- Keep the device plugged in — Charging reduces the chance of aggressive battery saving
- Use Wi-Fi instead of mobile data — Wi-Fi is more stable for long-running connections
- Avoid running heavy tasks at the same time — Other apps using CPU or RAM can interrupt the agent
For true 24/7 uptime without these workarounds, a small server or a Raspberry Pi will give you a much more reliable experience.
Common Problems on Android
OpenClaw Does Not Install
This usually happens when the Linux environment is not active or the curl package is missing. Make sure you are inside the proot-distro Ubuntu shell before running the installer.
Confirm you are inside the Ubuntu environment and that curl is installed.
# Re-enter the Linux environment
proot-distro login ubuntu
# Install curl if missing
apt install -y curl
# Then run the installer
curl -fsSL https://openclaw.ai/install.sh | bashNode.js Is Too Old or Not Found
OpenClaw requires Node.js 18 or newer. The default apt version on Ubuntu is usually older and will cause install or runtime errors.
Install Node.js 22 from NodeSource instead of the default apt version.
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt install -y nodejs
node -vThe Gateway Stops When You Close Termux
Android kills background processes when the screen is off or the app is closed. This stops OpenClaw from running.
Disable battery optimization for Termux and lock it in recent apps. Also make sure you ran onboard with the --install-daemon flag.
# Re-run onboarding with the daemon flag
openclaw onboard --install-daemon
# Check the gateway is running
openclaw gateway statusInvalid API Key Error
This means the API key was entered incorrectly, is expired, or was not saved during onboarding.
Copy the key again from your provider dashboard and re-run onboarding.
openclaw onboard --install-daemonIf you are not sure what is wrong, run openclaw doctor inside the Ubuntu environment. It checks your setup and tells you exactly what needs to be fixed.
Android Local Setup vs Ampere.sh
Android works for testing and learning. But if you want your agent running 24/7 without battery limits or background killing, here is how the two options compare.
| Feature | Android (Local) | Ampere.sh |
|---|---|---|
| Setup time | 20–40 min | 60 seconds |
| Works when phone sleeps | ❌ Goes offline | ✅ Always on |
| Errors to debug | Several possible | None |
| Battery drain | High | None |
| True 24/7 uptime | Not reliable | ✅ Yes |
| Free to start | API costs only | ✅ Free credits |
Want Your Agent Running 24/7 Without a Phone?
Running OpenClaw on Android is great for testing. But your agent stops the moment your phone runs out of battery or Android decides to kill the background process.
If you want your agent online all the time without touching your phone, Ampere.sh is built exactly for that:
- Live in 60 seconds — no terminal, no install, no config
- Runs on cloud servers that never sleep
- Free credits to get started, no card needed
- Your agent keeps working even when your phone is switched off