-
Notifications
You must be signed in to change notification settings - Fork 1k
Termux Guide
OmniRoute can run as a headless server on Android through Termux. The Electron desktop app is not supported in Termux, but the web dashboard and OpenAI-compatible API work from the local browser or from other devices on the same network.
Install Termux from F-Droid or GitHub releases, then update packages and install the build tools required by native dependencies such as better-sqlite3.
pkg update
pkg upgrade
pkg install nodejs-lts python build-essential gitNode.js version: OmniRoute requires Node
>=20.20.2 <21 || >=22.22.2 <23 || >=24.0.0 <27(perenginesinpackage.json). Termux'snodejs-ltstypically ships Node 20 LTS, which is compatible. Ifnode --versionreports an older line, installpkg install nodejs(current) and verify the major matches a supported range.
If native package compilation fails, rerun the pkg install command above and then retry the OmniRoute install.
Run the latest published package directly:
npx -y omniroute@latestYou can also install it globally:
npm install -g omniroute
omnirouteStart OmniRoute in headless server mode:
omnirouteor:
npx omnirouteThe dashboard listens on:
http://localhost:20128
Open that URL in the Android browser. If you run clients inside Termux, use the same host and port as the OpenAI-compatible base URL.
For a simple background process:
nohup omniroute > omniroute.log 2>&1 &To stop it:
pkill -f omnirouteFor automatic startup after device boot, install the Termux:Boot add-on and create a boot script:
mkdir -p ~/.termux/boot
cat > ~/.termux/boot/omniroute.sh <<'EOF'
#!/data/data/com.termux/files/usr/bin/sh
cd "$HOME"
nohup omniroute > "$HOME/omniroute.log" 2>&1 &
EOF
chmod +x ~/.termux/boot/omniroute.shAndroid battery optimization can stop long-running background processes. Disable battery optimization for Termux if the server is expected to stay online.
Find the phone IP address on the WiFi network:
ip addr show wlan0Then open the dashboard from another device:
http://PHONE_IP:20128
For example:
http://192.168.1.50:20128
Keep the phone and client on the same trusted network. If you expose OmniRoute outside the phone, enable API keys and dashboard authentication.
By default OmniRoute stores data under the Termux home directory, following the same server-side data path behavior used on Linux. To place the database somewhere explicit:
export DATA_DIR="$HOME/.omniroute"
omniroute- Electron does not run in Termux.
- There is no system tray or desktop integration.
- This setup is server-only: use the browser dashboard.
- Native dependencies may need local compilation.
- Low-memory Android devices may need fewer concurrent requests.
- MITM/system certificate features may require Android-level trust-store work outside Termux.
Install the Termux build toolchain:
pkg install nodejs-lts python build-essentialThen rerun:
npx -y omniroute@latestCheck what is listening on the default port:
ss -ltnp | grep 20128Stop the old process:
pkill -f omnirouteVerify both devices are on the same WiFi network, then test from Termux:
curl http://localhost:20128If local access works but LAN access does not, check Android hotspot/WiFi isolation and any firewall or VPN profile on the phone.
OmniRoute · Website · npm · Docker Hub
- Setup Guide
- User Guide
- Features
- Quick Start (Docker)
- Electron Desktop App
- Termux (Android)
- PWA Guide
- MCP Server
- A2A Server
- Agent Protocols
- OpenCode Plugin
- Webhooks
- Cloud Agents
- Skills
- Memory
- Evals
- Gamification
- Guardrails
- Compliance
- Error Sanitization
- Public Credentials
- Route Guard Tiers
- Stealth Guide
- CLI Token Auth