Turn an Android handset into a portable OpenClaw host, dev box, and messaging gateway.
The path is simple: install the Android-side tools, bootstrap a Linux userland, expose SSH, and drive the workflow from a laptop with standard remote-dev tooling.
Deployment chain
Android stays the host OS. Termux provides the first shell, `tmux` keeps services alive, `proot-distro` adds Debian, and SSH gives the laptop a normal remote target.
Think of the phone as a compact server: Android underneath, Termux as the host shell, Debian for the application runtime.
We start with the Android-side package source and shell. This is the only part that feels like phone setup; everything after this is standard terminal work.
1. Download the F-Droid APK from f-droid.org and install it 2. Install Termux from F-Droid 3. Launch Termux 4. termux-setup-storage
Before Debian exists, we set up the host shell that will keep sessions alive and expose access to the laptop.
pkg update && pkg upgrade pkg install tmux openssh proot-distro git tmux new -s claw
The outer shell stays in Termux. That is where the long-running session and SSH service should live.
Now we add a standard Linux environment for packages, build tools, and application dependencies. This is where the OpenClaw app stack can look like a regular server setup.
proot-distro install debian proot-distro login debian apt update apt install build-essential git python3 nodejs npm
Instead of connecting from a laptop, some phones can project to an external screen. With a monitor, keyboard, and mouse, the phone can act as both the server and the development machine.
# connect phone to monitor over USB-C # attach keyboard and mouse proot-distro login debian npm install -g code-server npm install -g @openai/codex code-server --bind-addr 127.0.0.1:8080 # on the phone browser open http://127.0.0.1:8080
On phones with a good desktop projection mode, this turns the device into a small all-in-one development machine, not just a remote host.
The laptop stays the main development machine. The phone is just another remote server, which means we can use standard SSH and VS Code Remote workflows.
# on Termux ip addr show wlan0 # get <phone-ip> whoami # get <termux-user> passwd sshd -D -d -p 2222 # connect from the ssh termux
This is the comfort win: your editor, Git tooling, terminals, and debugging stay where you already want them.
Debian runs inside Termux and `proot`, but the SSH server lives inside Debian. Use public key auth, point the host alias at the current `wlan0` address, and connect either through VS Code Remote SSH or plain `ssh -T`.
# inside Debian ip addr show wlan0 mkdir -p ~/.ssh && chmod 700 ~/.ssh nano ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keys /usr/sbin/sshd -D -e -f /etc/ssh/sshd_config -p 2223 # terminal fallback ssh -T debian
Public key authentication works reliably here. The main edge case is PTY allocation inside `proot`, which is why VS Code Remote SSH or `ssh -T` are the practical options.
Treat this as an operator handoff, not a conceptual overview. Start the OpenClaw process, confirm the gateway port, and turn that into the exact URL you will open for the admin page.
# inside tmux + Debian mkdir openclaw cd openclaw curl -fsSL https://openclaw.ai/install.sh | bash openclaw onboard --install-daemon openclaw gateway start # discover the gateway open http://127.0.0.1:18789/
The output of this step is one thing: a reachable gateway URL, usually `http://<phone-ip>:18789`, that you can open from the phone or from a laptop on the same LAN.
After OpenClaw is installed, edit the channel config, pair WhatsApp with the QR flow, then start the gateway and allow only approved senders before testing.
openclaw onboard --install-daemon nano ~/.openclaw/openclaw.json openclaw channels login --channel whatsapp openclaw gateway --port 18789
The setup path is clear. The interesting questions now are mostly about production shape, security, and product behavior at the messaging layer.