OpenClaw on Android via Termux: No-Root Setup on Any Phone
About This Guide: This tutorial covers running OpenClaw natively on an Android device using Termux — a free Linux terminal emulator for Android that requires no root access. This is fundamentally different from using the OpenClaw Android companion app; here you run the full OpenClaw server locally on your phone. Best for Android phones with 6+ GB RAM (Samsung Galaxy, Google Pixel, OnePlus, Xiaomi). Estimated time: 25–35 minutes.
What if your Android phone could run a full AI agent server — not just a client app, but the actual OpenClaw process, responding to your messages, executing automations, and managing your digital life, all from the device in your pocket?
With Termux, Android's most powerful Linux terminal emulator, this is completely possible — and requires zero root access. Termux provides a genuine Linux environment on Android, complete with its own package manager (pkg), Node.js runtime, Git, and Python. Modern Android phones with Snapdragon 8 Gen 3, Dimensity 9300, or Google Tensor chips have more than enough processing power to run OpenClaw smoothly.
This guide focuses specifically on running OpenClaw as a local server on your phone, not just as a client connecting to a remote instance. The result: a personal AI agent that runs entirely on your device, with your data staying local, accessible even on offline-capable configurations, and always available as long as your phone has battery.
Termux vs OpenClaw Android App: What's the Difference?
🖥️ OpenClaw via Termux (This Guide)
- ✅ Full OpenClaw server runs locally on phone
- ✅ No separate server/VPS needed
- ✅ Data stays 100% on your device
- ✅ Works with any messaging platform
- ✅ Access full CLI and configuration
- ✅ Run custom skills and automations
- ⚠️ Requires 6GB+ RAM for smooth operation
- ⚠️ Uses more battery (background process)
📱 OpenClaw Android Companion App
- ✅ Simple, no setup required
- ✅ Low battery impact
- ✅ Works on any Android 8+
- ❌ Requires a separate server running OpenClaw
- ❌ Limited configuration options
- ❌ Data goes through remote server
- ❌ Server downtime = app stops working
Android Requirements & Compatible Devices
Minimum Requirements
- Android: 7.0 (Nougat) or newer
- RAM: 4 GB (6 GB strongly recommended)
- Storage: 5 GB free internal storage
- CPU: Any modern ARM64 (Snapdragon/Dimensity/Tensor)
- Termux: Latest version from F-Droid
Best Tested Devices
- • Samsung Galaxy S24 (12GB RAM) — Excellent
- • Google Pixel 9 Pro (16GB RAM) — Excellent
- • OnePlus 13 (12GB RAM) — Excellent
- • Xiaomi 15 Pro (16GB RAM) — Excellent
- • Samsung Galaxy A55 (8GB RAM) — Good
- • Google Pixel 8a (8GB RAM) — Good
Important: Install Termux from F-Droid, NOT Google Play
The Google Play version of Termux is outdated and no longer maintained. Always install from F-Droid (f-droid.org) for the current, functional version. The F-Droid APK is safe and open-source — just allow "Install from unknown sources" in Android Settings.
Step 1: Install Termux from F-Droid
-
1
Enable "Install unknown apps"
Go to Settings → Apps → Special app access → Install unknown apps. Enable it for your browser (Chrome, Samsung Internet, etc.). This is required to install APKs outside the Play Store.
-
2
Download F-Droid
Visit
f-droid.orgin your Android browser and tap "Download F-Droid". Install the F-Droid APK — it's the repository manager for open-source Android apps. -
3
Install Termux from F-Droid
Open F-Droid → search for "Termux" → install. Also install "Termux:Boot" (same developer) to auto-start OpenClaw when your phone boots.
-
4
Grant Storage Permission
Open Termux and run:
termux-setup-storage— tap "Allow" to let Termux access phone storage. This is needed for file operations.
Step 2: Set Up the Termux Environment
Open Termux and run these setup commands:
# Update Termux packages
pkg update -y && pkg upgrade -y
# Install essential tools
pkg install -y nodejs git curl wget python
# Verify Node.js installation
node --version # Should be v18+ or v20+
npm --version
# Install pnpm (optional but recommended)
npm install -g pnpm
Termux's Node.js package is compiled natively for Android ARM64 — no emulation needed. Modern Android phones run Node.js exceptionally well.
Pro Tip: Use a Bluetooth Keyboard
Typing long commands on the touchscreen keyboard can be tedious. Connect a Bluetooth keyboard or use the Hacker's Keyboard app (available on Play Store) which has proper Tab, Ctrl, and arrow keys essential for terminal use.
Step 3: Install OpenClaw in Termux
Method 1: npm Quick Install (Recommended)
# Install OpenClaw globally
npm install -g openclaw@latest
# Create agent directory
mkdir ~/openclaw-agent && cd ~/openclaw-agent
# Run onboarding wizard
openclaw onboard --install-daemon
Method 2: One-Line Installer Script
curl -fsSL https://openclaw.ai/install.sh | bash
The official installer automatically detects the Android/ARM64 environment and configures OpenClaw appropriately.
Method 3: Clone from GitHub
cd ~
git clone https://github.com/openclaw/openclaw.git openclaw-agent
cd openclaw-agent
npm install
npm run setup
Onboarding on Android: Tips
~/openclaw-data (internal Termux storage) for security. Don't use /sdcard as it's unencrypted.Step 4: Keep OpenClaw Running in the Background
Android aggressively kills background processes to save battery. You need to configure it to allow OpenClaw (via Termux) to keep running:
Critical: Disable Battery Optimization for Termux
- 1 Go to Settings → Battery → Battery Optimization (exact path varies by manufacturer)
- 2 Find Termux in the app list → select "Don't optimize" or "No restrictions"
- 3 On Samsung: Settings → Device Care → Battery → Background usage limits → Add Termux to exceptions
- 4 On Xiaomi/MIUI: Settings → Apps → Manage apps → Termux → Battery saver → No restrictions
Run OpenClaw with nohup (Background Mode)
Inside Termux, run OpenClaw so it continues when the terminal is closed:
cd ~/openclaw-agent
# Start in background, redirect output to log
nohup npm start > ~/openclaw.log 2>&1 &
# Get the process ID for later
echo $! > ~/openclaw.pid
# View logs
tail -f ~/openclaw.log
# Stop OpenClaw
kill $(cat ~/openclaw.pid)
Auto-Start with Termux:Boot
With Termux:Boot installed, create a startup script:
# Create boot directory
mkdir -p ~/.termux/boot
# Create startup script
nano ~/.termux/boot/start-openclaw.sh
Add this content:
#!/data/data/com.termux/files/usr/bin/bash
# Wait 30 seconds for network to be ready
sleep 30
# Start OpenClaw
cd ~/openclaw-agent
nohup npm start > ~/openclaw.log 2>&1 &
echo $! > ~/openclaw.pid
# Make it executable
chmod +x ~/.termux/boot/start-openclaw.sh
Real-World Performance on Android
Device-Specific Performance Notes
Google Pixel 9 Pro (Tensor G4, 16GB)
BestGoogle's Tensor chip is optimized for on-device AI. OpenClaw runs smoothly with multiple parallel tasks. ~3% battery per hour when idle. API responses under 1.5s with VPN07.
Samsung Galaxy S24 (Snapdragon 8 Gen 3, 12GB)
ExcellentSnapdragon 8 Gen 3 handles Node.js natively with excellent efficiency. Samsung's "Sleeping apps" setting needs to be disabled for Termux.
OnePlus 13 (Snapdragon 8 Elite, 12GB)
ExcellentOxygenOS has good background app policies. OpenClaw runs stable for 24+ hours. Recommended to disable "Smart Charging" to prevent battery throttling overnight.
Mobile Network Optimization with VPN07
Why Mobile Users Need VPN07 for OpenClaw
Install VPN07 on Android
VPN07 has a native Android app available at vpn07.com/download. For Termux users specifically, you can also configure the VPN07 WireGuard config directly in Termux:
pkg install wireguard-tools
# Configure WireGuard with your VPN07 credentials
# Download your WireGuard config from vpn07.com dashboard
Common Android/Termux Issues & Fixes
OpenClaw stops when phone screen turns off
Cause: Battery optimization killing Termux process
Fix: (1) Disable battery optimization for Termux as described above. (2) Use Termux's termux-wake-lock command to prevent CPU sleep. (3) Enable the Termux "Acquire Wakelock" notification by long-pressing the Termux notification.
"pkg: command not found" or "apt-get" errors
Cause: Using outdated Play Store Termux instead of F-Droid version
Fix: Uninstall Termux from Play Store completely. Install from F-Droid. The F-Droid version has active package mirrors and up-to-date repositories.
npm ENOSPC: No space left on device
Cause: Termux's internal storage quota or actual low phone storage
Fix: Clear Termux cache: pkg clean && rm -rf ~/.npm. Also clear unused packages: pkg autoremove. Ensure at least 3 GB free phone storage.
OpenClaw API timeouts on mobile data
Cause: Carrier throttling sustained HTTPS connections to AI provider APIs
Fix: Install VPN07 Android app from vpn07.com → connect before running OpenClaw in Termux. VPN07's 1000Mbps dedicated channels bypass carrier throttling completely, making OpenClaw API calls reliable even on constrained mobile networks.
Advanced Termux Configurations for Power Users
Once OpenClaw is running stably on your Android phone via Termux, these advanced configurations unlock even more power from your mobile AI agent:
Access Termux via SSH from Your Laptop
Install an SSH server in Termux and manage OpenClaw remotely from any computer on your home network — perfect for editing config files and monitoring logs without typing on a touchscreen:
pkg install openssh
# Generate SSH keys for your phone
ssh-keygen -t ed25519
# Start SSH server (port 8022 by default)
sshd
# From your laptop:
ssh -p 8022 [email protected] # your phone's IP
Sync OpenClaw Data to Cloud Backup
Use rclone in Termux to back up your OpenClaw memories and data to Google Drive or Dropbox automatically:
pkg install rclone
rclone config # Set up Google Drive or Dropbox
# Create a backup script
cat > ~/backup-openclaw.sh << 'EOF'
#!/data/data/com.termux/files/usr/bin/bash
rclone sync ~/openclaw-agent/data gdrive:openclaw-backup/$(date +%Y-%m-%d)
EOF
chmod +x ~/backup-openclaw.sh
# Schedule daily backup with Termux cron
pkg install cronie termux-services
sv-enable crond
echo "0 2 * * * ~/backup-openclaw.sh" | crontab -
Use Termux:API for Native Android Integration
Install Termux:API (from F-Droid) to let OpenClaw access native Android features — camera, contacts, SMS, sensors, notifications:
pkg install termux-api
# OpenClaw can now use these commands as skills:
termux-battery-status # Check battery level
termux-notification --title "OpenClaw" --content "Task done!"
termux-camera-photo /tmp/photo.jpg # Take a photo
termux-location # Get GPS coordinates
termux-sms-send -n +1234567890 "Alert: task completed"
Create OpenClaw skills that use these Termux:API commands to build truly unique mobile-native automations — like photographing your desk when you arrive home, or sending SMS alerts when certain conditions are met.
Multi-Session with tmux
Use tmux to manage multiple terminal sessions inside Termux — keep OpenClaw running in one window while you monitor logs in another:
pkg install tmux
# Start a named session for OpenClaw
tmux new-session -s openclaw
# Start OpenClaw in this session
cd ~/openclaw-agent && npm start
# Detach (keep running): Ctrl+B then D
# Reattach later: tmux attach -t openclaw
# Create a second window for logs
tmux new-window
tail -f ~/openclaw.log
Why Running OpenClaw Locally on Android is Unique
Most people run OpenClaw on remote VPS servers or desktop computers. Running it locally on your Android phone gives you several unique advantages that no other setup offers:
VPN07: Essential for Mobile OpenClaw
Android App Available · 1000Mbps · 70+ Countries
Running OpenClaw on Android via Termux is impressive — but carrier throttling and public Wi-Fi instability can undermine your agent's performance. VPN07's native Android app provides 1000Mbps dedicated bandwidth, protecting your API keys and ensuring your Termux-based OpenClaw agent stays fast and reliable anywhere in the world. Available in 70+ countries, 10 years of proven stability, and just $1.5/month with a 30-day money-back guarantee.
Related Articles
OpenClaw Mobile App: iOS & Android Setup Guide
Configure the official OpenClaw companion app on iPhone and Android to control your OpenClaw agent from anywhere.
Read More →OpenClaw on Raspberry Pi 5: Home AI Server
A dedicated Pi 5 as your always-on OpenClaw server — more powerful than a phone and runs 24/7 without affecting your battery.
Read More →