openclawd-termux
v1.0.0
Published
OpenClaw AI Gateway for Android Termux with Bionic Bypass
Maintainers
Readme
OpenClawd-Termux
Run OpenClaw AI Gateway on Android using Termux with automatic proot Ubuntu setup and Bionic Bypass fix.
Features
- One-Command Setup - Automatically installs proot-distro, Ubuntu, Node.js 22, and OpenClaw
- Bionic Bypass - Fixes
os.networkInterfaces()crash on Android's Bionic libc - Smart Loading - Shows spinner until gateway is actually ready
- Pass-through Commands - Run any OpenClaw command directly via
openclawdx
Quick Install
One-liner (recommended)
curl -fsSL https://raw.githubusercontent.com/mithun50/openclawd-termux/main/install.sh | bashOr via npm
npm install -g openclawd-termux
openclawdx setupRequirements
| Requirement | Details | |-------------|---------| | Android | 10 or higher | | Termux | From F-Droid (NOT Play Store) | | Storage | ~2GB for Ubuntu + OpenClaw |
Usage
# First-time setup (installs proot + Ubuntu + Node.js + OpenClaw)
openclawdx setup
# Check installation status
openclawdx status
# Start OpenClaw gateway
openclawdx start
# Run onboarding to configure API keys
openclawdx onboarding
# Enter Ubuntu shell
openclawdx shell
# Any OpenClaw command works directly
openclawdx doctor
openclawdx gateway --verboseHow It Works
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Termux │ │ proot-distro │ │ Ubuntu │
│ openclawdx │ ──► │ │ ──► │ OpenClaw │
│ │ │ Bionic Bypass │ │ Gateway │
└─────────────────┘ └─────────────────┘ └─────────────────┘- openclawdx runs in Termux
- Commands are passed through proot-distro with Bionic Bypass
- OpenClaw runs inside Ubuntu environment
Configuration
Onboarding
When running openclawdx onboarding:
- Binding: Select
Loopback (127.0.0.1)for non-rooted devices - API Keys: Add your Gemini/OpenAI/Claude keys
Battery Optimization
Important: Disable battery optimization for Termux
Settings → Apps → Termux → Battery → Unrestricted
Dashboard
Access the web dashboard at: http://127.0.0.1:18789
| Command | Description |
|---------|-------------|
| /status | Check gateway status |
| /think high | Enable high-quality thinking |
| /reset | Reset session |
Troubleshooting
Gateway won't start
# Check status
openclawdx status
# Re-run setup if needed
openclawdx setup
# Make sure onboarding is complete
openclawdx onboarding"os.networkInterfaces" error
Bionic Bypass not configured. Run:
openclawdx setupProcess killed in background
Disable battery optimization for Termux in Android settings.
Permission denied
termux-setup-storageManual Setup
1. Install proot-distro and Ubuntu
pkg update && pkg install -y proot-distro
proot-distro install ubuntu2. Setup Node.js in Ubuntu
proot-distro login ubuntu
apt update && apt install -y curl
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt install -y nodejs
npm install -g openclaw3. Create Bionic Bypass
mkdir -p ~/.openclawd
cat > ~/.openclawd/bionic-bypass.js << 'EOF'
const os = require('os');
const originalNetworkInterfaces = os.networkInterfaces;
os.networkInterfaces = function() {
try {
const interfaces = originalNetworkInterfaces.call(os);
if (interfaces && Object.keys(interfaces).length > 0) {
return interfaces;
}
} catch (e) {}
return {
lo: [{
address: '127.0.0.1',
netmask: '255.0.0.0',
family: 'IPv4',
mac: '00:00:00:00:00:00',
internal: true,
cidr: '127.0.0.1/8'
}]
};
};
EOF4. Add to bashrc
echo 'export NODE_OPTIONS="--require ~/.openclawd/bionic-bypass.js"' >> ~/.bashrc
source ~/.bashrc5. Run OpenClaw
openclaw onboarding # Select "Loopback (127.0.0.1)"
openclaw gateway --verboseCredits
- Based on the guide by Sagar Tamang
- OpenClaw project
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
MIT License - see LICENSE file for details.
