Overview
Turn your old Android phone into a dedicated AI assistant server! This guide shows you how to run OpenClaw on Android using Termux, a powerful terminal emulator that provides a Linux-like environment.
💡 Why use an old phone? Old smartphones have powerful ARM processors, built-in battery backup, and are always-on — perfect for running a lightweight AI gateway 24/7.
Prerequisites
Before you begin, ensure your Android device meets these requirements:
- Android 7.0+ (Nougat or later)
- At least 4GB RAM (8GB recommended)
- 2GB+ free storage
- Stable WiFi connection
- Phone should remain plugged in to power
⚠️ Important: Do NOT install Termux from Play Store — it’s outdated. Use F-Droid instead.
Step 1: Install Termux
Download and install Termux from F-Droid:
- Visit F-Droid on your Android device
- Download the latest Termux APK
- Install the APK (you may need to enable “Install from unknown sources”)
Alternatively, use this direct link:
https://f-droid.org/repo/com.termux_118.apk
Step 2: Configure Termux
Open Termux and run these commands:
# Update package repositories
pkg update && pkg upgrade -y
# Grant storage access (for managing files)
termux-setup-storage
# Install essential tools
pkg install git wget curl -y
Step 3: Install Node.js
OpenClaw requires Node.js 22 or later:
# Install Node.js LTS
pkg install nodejs-lts -y
# Verify installation
node --version
# Should display v22.x.x or higher
npm --version
Step 4: Install OpenClaw
# Install OpenClaw globally
npm install -g openclaw@latest
# Verify installation
openclaw --version
Step 5: Run the Setup Wizard
Launch the interactive setup wizard:
openclaw onboard
The wizard will guide you through:
- AI Provider Setup — Choose Claude, GPT-4, or another model
- API Key Configuration — Enter your API key
- Messaging Channels — Connect WhatsApp, Telegram, etc.
Step 6: Start the Gateway
After configuration, start the OpenClaw gateway:
openclaw gateway
Expected output:
🦞 OpenClaw Gateway v2026.1.24
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✓ Gateway running on localhost:18789
✓ WebChat available at http://localhost:18789
Keep OpenClaw Running 24/7
Android aggressively kills background apps. Here’s how to keep OpenClaw running:
Method 1: Termux Wake Lock (Essential)
Pull down the Termux notification and tap “Acquire wakelock”. This prevents Android from killing Termux when the screen is off.
Method 2: Use tmux for Session Persistence
# Install tmux
pkg install tmux -y
# Start a new tmux session
tmux new -s openclaw
# Run OpenClaw inside tmux
openclaw gateway
# Detach from session: Press Ctrl+B, then D
# Reattach later with: tmux attach -t openclaw
Method 3: Use pm2 Process Manager
# Install pm2
npm install -g pm2
# Start OpenClaw with pm2
pm2 start "openclaw gateway" --name openclaw
# Save the process list
pm2 save
# Check status
pm2 status
Disable Battery Optimization
To prevent Android from killing Termux:
- Go to Settings > Apps > Termux
- Tap Battery
- Select Unrestricted or Don’t optimize
Access from Other Devices
To access OpenClaw from your computer or other devices on the same network:
Find Your Phone’s IP Address
ifconfig
# Look for wlan0 > inet addr
Access the Web Interface
Open a browser on your computer and navigate to:
http://<phone-ip>:18789
Performance Tips
1. Keep Phone Cool
AI processing can generate heat. Place your phone on a cool surface or use a small fan.
2. Use Lightweight Models
For phones with 4GB RAM, use smaller context windows:
# Edit config after onboarding
nano ~/.openclaw/config.yaml
Add:
agent:
maxContextTokens: 4000
3. Disable Unused Apps
Uninstall or disable unused apps to free up RAM for OpenClaw.
4. Use a Dedicated Phone
For best results, use a phone dedicated only to running OpenClaw — no other active apps.
Next Steps
Your old Android phone is now a personal AI server! Continue with:
- Connect WhatsApp — Add AI to your WhatsApp chats
- Connect Telegram — Create a Telegram bot
- Configure AI Providers — Switch or add AI models
Troubleshooting
”Permission denied” Errors
# Fix npm permissions
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
Termux Closes When Screen Off
Make sure you’ve acquired the wakelock (see “Keep OpenClaw Running” section above).
Can’t Connect from Other Devices
- Ensure both devices are on the same WiFi network
- Check if your router blocks local connections
- Try using the phone’s hotspot as a workaround
High Battery Drain
- Keep the phone plugged in at all times
- Reduce screen brightness or turn off the display
- Disable mobile data if using WiFi only