| name | openclaw-android-setup |
| description | Expert in setting up and running OpenClaw AI agent framework on Android devices via Termux without proot |
| triggers | ["how do I install OpenClaw on Android","set up OpenClaw on my Android phone","run OpenClaw on Android without Linux","configure OpenClaw gateway on Termux","manage OpenClaw Android installation","troubleshoot OpenClaw on Android","backup and restore OpenClaw on Android","keep OpenClaw running on Android"] |
OpenClaw Android Setup Skill
Skill by ara.so — Hermes Skills collection.
Overview
OpenClaw on Android (openclaw-android) enables running the OpenClaw AI agent framework on Android devices through Termux, without requiring a full Linux distribution via proot-distro. It achieves this by installing only the glibc dynamic linker, resulting in ~200MB overhead instead of 1-2GB, with native performance.
Key benefits:
- Single-command installation
- No proot-distro required (saves 1-2GB storage)
- Native performance (no proot layer overhead)
- Automatic path conversion and environment setup
- Built-in CLI for updates, backups, and optional tool installation
Installation
Prerequisites
- Android 7.0+ (Android 10+ recommended)
- ~1GB free storage
- Termux from F-Droid (NOT Play Store version)
Initial Termux Setup
pkg update -y && pkg install -y curl
Install OpenClaw on Android
curl -sL myopenclawhub.com/install | bash && source ~/.bashrc
This installs:
- glibc dynamic linker (glibc-runner via pacman)
- Node.js (official linux-arm64 with ld.so loader)
- OpenClaw framework
- Path conversion and environment patches
oa CLI management tool
Installation takes 3-10 minutes depending on network speed.
Initial Configuration
Onboarding
openclaw onboard
Follow prompts to configure:
- Authentication token
- Gateway port
- Optional tools (code-server, OpenCode, AI CLIs)
Starting the Gateway
Important: Run gateway directly in Termux app, not via SSH (SSH disconnection will stop the gateway).
openclaw gateway
To stop: Press Ctrl+C (NOT Ctrl+Z which only suspends).
Opening New Termux Sessions
Use the hamburger menu (☰) or swipe from left edge to open side menu, then tap "NEW SESSION" to run additional commands while gateway is running.
CLI Reference
oa Management Tool
oa --update && source ~/.bashrc
oa --install
oa --backup
oa --restore
oa --status
oa --uninstall
oa --version
oa --help
OpenClaw Core Commands
openclaw --version
openclaw gateway
openclaw onboard
openclaw --help
Backup and Restore
Creating Backups
oa --backup
oa --backup ~/my-backups/
Backup includes:
- Configuration files
- State and workspace data
- Agent definitions
- All OpenClaw data from
~/.openclaw/
Backup format: Timestamped tar.gz (e.g., 2026-03-14T00-00-00.000Z-openclaw-backup.tar.gz)
Restoring Backups
oa --restore
The restore process:
- Lists all backups in default directory
- Prompts for selection by number
- Validates backup manifest
- Confirms before overwriting existing data
- Extracts to
~/.openclaw/
Configuration
Environment Variables
OpenClaw configuration is stored in ~/.openclaw/. Common environment variables:
export OPENCLAW_PORT=3000
export OPENCLAW_TOKEN=your_token_here
export OPENCLAW_LOG_LEVEL=info
SSH Access and Dashboard
Set up SSH to access dashboard from PC:
pkg install openssh
sshd
ifconfig wlan0 | grep inet
From PC, create SSH tunnel:
ssh -L 3000:localhost:3000 -p 8022 192.168.1.XXX
Managing Multiple Devices
Use Dashboard Connect tool at myopenclawhub.com:
- Save connection settings per device (IP, token, ports)
- Auto-generates SSH tunnel commands
- All data stored locally in browser localStorage
Keeping Processes Alive
Android aggressively kills background processes. Required settings:
Developer Options
Enable in Developer Options:
- Stay awake (while charging)
- Disable Phantom Process Killer (if available)
Battery Optimization
Charge Limit (optional)
For devices used 24/7, limit charge to 80% to extend battery life:
- Settings → Battery → Battery Protection / Charge Limit → 80%
Common Patterns
Running Gateway as Background Service
tmux new -s gateway
openclaw gateway
Checking Gateway Status
pgrep -f "openclaw gateway"
tmux attach -t gateway
Updating All Components
oa --update && source ~/.bashrc
Installing Optional Tools
oa --install
Architecture
Standard Approach (Avoided)
Linux Kernel
└── Android + Bionic libc + Termux
└── proot-distro + Debian/Ubuntu (1-2GB)
└── GNU glibc
└── Node.js → OpenClaw
OpenClaw-Android Approach
Linux Kernel
└── Android + Bionic libc + Termux
└── glibc ld.so (linker only, ~200MB)
└── Node.js → OpenClaw
Benefits:
- 5-10x less storage overhead
- Native performance (no proot layer)
- Automatic path conversion (/tmp, /bin/sh, /usr/bin/env)
- Single-command setup
Troubleshooting
Gateway Won't Start
netstat -tulpn | grep 3000
pkill -f "openclaw gateway"
openclaw gateway --verbose
"Command not found" After Installation
source ~/.bashrc
which openclaw
which oa
Gateway Stops When Screen Locks
Ensure battery optimization is disabled:
- Settings → Apps → Termux → Battery → Unrestricted
- Enable "Stay awake" in Developer Options (while charging)
- Use tmux to persist sessions
Node.js Binary Issues
oa --update && source ~/.bashrc
which node
cat $(which node)
Backup Fails with "Operation not permitted"
oa --backup
SSH Connection Refused
pgrep sshd
sshd
netstat -tulpn | grep sshd
Out of Storage Space
df -h ~
pkg clean
ls ~/.openclaw-android/backup/
rm ~/.openclaw-android/backup/old-backup.tar.gz
Gateway Crashes on Android 7-9
Some older Android versions have issues with certain Node.js features:
oa --update && source ~/.bashrc
getprop ro.build.version.release
Best Practices
- Always run gateway in Termux app (not via SSH) to prevent disconnection issues
- Use tmux for persistent sessions that survive terminal closures
- Regular backups before major updates:
oa --backup
- Monitor storage on devices with limited space
- Keep device charged and plugged in for 24/7 operation
- Update regularly to get latest Android compatibility patches:
oa --update
- Disable phantom process killer on Android 12+ for stability
- Use Wi-Fi for initial installation (faster, more reliable)
Additional Resources