I spent a a day getting OpenClaw running on my Android phone inside Termux. It has been in my mind for a while while i mostly use Clude code as my daily drive. I believe that the AI gateway interface where any chat interface can be plugged in and is model agnostic what motivated me to use OpenClaw.
OpenClaw is a model-agnostic AI gateway. You bring your own model (Claude, Groq, Gemini, whatever), plug in any messaging channel (Telegram, WhatsApp, Discord), and it routes between them. Swap the model without touching your Telegram setup. Add a new channel without changing your API keys. Claude code on the other hand is tied to Anthropic models.
I’m not walking you through what OpenClaw is in detail. The official docs do that fine. This is about running it on Android, which isn’t officially supported and requires some tricks.
Step 0: choose a distro of choice
It works. But there’s an immediate gotcha — proot-distro on Android installs Arch Linux ARM (ALARM), not standard Arch. Standard mirrors don’t have alarm.db. You’ll hit 404s on every pacman -Syu until you fix this.
ALARM has its own mirror network. Set this before doing anything else:
cat > /etc/pacman.d/mirrorlist << 'EOF'
Server = http://sg.mirror.archlinuxarm.org/$arch/$repo
Server = http://mirror.archlinuxarm.org/$arch/$repo
EOF
I’m in India, so Singapore (sg.) is the closest. Pick whatever’s geographically close to you from archlinuxarm.org/about/mirrors.
If you hit this:
HTTP server does not seem to support byte ranges. Cannot resume.
Clear the cache and retry:
rm -rf /var/cache/pacman/pkg/*
pacman -Syu --noconfirm
We’re going to need a linux distro and Proot into it since i could not find a native way of setting this up in Termux. But, please let me know if it comes to that point.
Here’s what Proot looks like if you don’t know.
Android
└── Termux (host)
└── proot-distro login archlinux
└── pacman, Node.js, OpenClaw
installation and setup
pkg update && pkg upgrade -y
pkg install proot-distro -y
proot-distro install archlinux
proot-distro login archlinux
After you login, proceed with below base-devel and nodejs. Finally the openclaw itself.
pacman -S curl git base-devel nodejs npm --noconfirm
npm install -g openclaw@latest
That’s it for the install part.
The Bionic Bypass FIX
I stuck at this issue for an hour. This is the thing that actually makes it work on Android. Without it, OpenClaw crashes immediately every single time.
The problem: Android’s kernel blocks os.networkInterfaces() — a Node.js call OpenClaw uses for Bonjour/mDNS. In proot it throws SystemError: uv_interface_addresses returned Unknown system error 13 and kills the gateway as an unhandled promise rejection.
I tried patching the compiled module directly. Bad idea — fragile, gets overwritten on updates. The community fix is cleaner: monkey-patch os before OpenClaw even starts.
# create the hijack script
cat > /root/hijack.js << 'EOF'
const os = require('os');
os.networkInterfaces = () => ({});
EOF
# load it automatically on every proot login
echo 'export NODE_OPTIONS="--require /root/hijack.js"' >> /root/.bashrc
echo 'export NODE_OPTIONS="--require /root/hijack.js"' >> /root/.profile
source /root/.bashrc
Why both .bashrc and .profile? proot doesn’t always source .bashrc on login depending on how the shell is invoked. I wasted time debugging NODE_OPTIONS being empty before figuring this out. Adding it to both files just works.
Openclaw onboarding
I’m not explaning Openclaw onboarding as its out of the scope of this article – we’re finished with the core setup including the Bionic Bypass fix (which is the reason why i wrote this article)
openclaw onboard --install-daemon
The wizard asks for:
- API provider — I set up Anthropic (Claude Sonnet 4.6)
- Search provider — I picked Grok (xAI). Key from console.x.ai, they give $25 free credits on signup. Brave is the official default with 2,000 free queries/month
- Messaging — Telegram. Create a bot via @BotFather, get the token, paste it in
- Skills — I enabled
summarize,session-memory,command-logger - Hooks —
session-memoryis the important one. Without it every conversation starts fresh
When it asks for Gateway Bind — select 127.0.0.1 (Loopback). Keeps the gateway accessible from your phone’s browser at http://127.0.0.1:18789.
The daemon install step will throw a systemd error. systemd doesn’t work in proot. Ignore it.
WebUI Login
Opening http://127.0.0.1:18789 shows an unauthorized error. So, Get your token:
openclaw config get gateway.auth.token
Then navigate to: http://127.0.0.1:18789/#token=YOUR_TOKEN
Telegram Pairing
First message to your bot returns a pairing code:
Your Telegram user id: XXXXXXXXX
Pairing code: T5N2L886
Ask the bot owner to approve with:
openclaw pairing approve telegram T5N2L886
Run that in the proot terminal. Done.
API Keys — The Gotcha
Claude Pro is not = API access. I mean this is easy to miss — a Claude.ai subscription does nothing for the API. The Anthropic API is billed separately at console.anthropic.com.
If you want a free fallback, Groq works well. Its not in OpenClaw’s provider list by default, but you can add it as a custom OpenAI-compatible provider via openclaw configure → Model:
- Endpoint compatibility: OpenAI-compatible
- Endpoint URL:
https://api.groq.com/openai/v1 - API Key: from console.groq.com (free tier, generous limits)
- Model ID:
llama-3.3-70b-versatile
Set as default:
openclaw config set agents.defaults.model.primary groq/llama-3.3-70b-versatile
This sets groq as default agent (if you want)
If you’re plan is to keep it running (i run mostly in debug mode), you can use the tmux background run (tested and works fine).
I suggest that you run it with --verbose flag always.
The session-memory hook makes all of this actually useful. OpenClaw accumulates context about you over time instead of starting fresh every message.
I think interms of performace, It works okay-ish. But even after Termux wake lock is enabled and battery saver disables for Termux, i saw the app is closed after couple of hours.
The storage it took really depends on the size of Archlinux proot. For me its 2.4GB for the Archlinux proot for just Openclaw. But somebody suggested me to try Alpine (I’d rather spend the size over something very lite which has just bare minimum).
I’m not honestly going to use it to that scale as of now. But if it comes to that point, I’ll definitly write another article of it.
I’ll keep on following how others are running it on their Termux. I’ve already seen couple of projects in Github worth trying as well. So check that.