Running OpenClaw Locally on Android: The Bionic Bypass
OpenClaw is usually deployed on high-end desktops or cloud servers. This walkthrough demonstrates how to run the complete OpenClaw stack — Gateway, Browser Control, and WhatsApp/Telegram integrations — directly on an Android device using Termux.
OpenClaw on Termux (Sagar Builds)
Requirements
- Android: Version 10 or newer
- Termux: Installed from F-Droid (Play Store builds are not recommended)
- API access: Gemini API key from Google AI Studio (free tier is sufficient)
1. Environment Preparation
OpenClaw depends on native components that do not behave well in standard Termux.
To avoid these issues, an Ubuntu container is created using proot-distro.
pkg update && pkg upgrade -y
pkg install proot-distro -y
proot-distro install ubuntu
proot-distro login ubuntu
2. Dependency Installation
Inside the Ubuntu environment, install Node.js 22 along with required build tools, then install OpenClaw globally.
apt update && apt upgrade -y
apt install curl git build-essential -y
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt install -y nodejs
npm install -g openclaw@latest
3. The “Bionic Bypass” (Mandatory)
Android’s kernel restricts access to os.networkInterfaces(), which leads to a System Error 13.
This workaround patches Node.js before OpenClaw initializes.
Create the override script
cat < /root/hijack.js
const os = require('os');
os.networkInterfaces = () => ({});
EOF
Apply it globally
echo 'export NODE_OPTIONS="-r /root/hijack.js"' >> ~/.bashrc
source ~/.bashrc
4. Initial Configuration Wizard
Because OpenClaw is installed system-wide, the setup wizard can be launched from any directory.
openclaw onboard
Important:
When prompted for the Gateway Bind option, choose 127.0.0.1 (Loopback). Selecting LAN or0.0.0.0will crash the gateway on non-rooted Android devices.
5. Starting the Gateway
Launch the gateway with verbose logging enabled:
openclaw gateway --verbose
Available Chat Commands
Once connected to WhatsApp or Telegram, the following commands are available:
/status— View gateway status/think high— Enable enhanced reasoning mode/reset— Reset the current conversation state
For browser-based access, retrieve the gateway token from:
~/.openclaw/openclaw.json
Paste the token into the local web interface under: Overview → Gateway Access → Gateway Token
Tips & Notes
-
Prevent background kills:
Run
termux-wake-lockin a separate Termux session and disable battery optimization for Termux. -
Web dashboard:
Open
http://127.0.0.1:18789in your browser. You can also fetch the token with:openclaw config get gateway.auth.token - Security reminder: Avoid exposing API keys or gateway tokens publicly. Revoke any keys used for demos once finished.