Termux Persistent Gateway
Keep an AI gateway running persistently on Android/Termux using tmux, wake-lock, auto-start on boot, and health monitoring without systemd. Skill: Termux Persistent Gateway Owner: kingofqin2026 Summary: Keep an AI gateway running persistently on Android/Termux using tmux, wake-lock, auto-start on boot, and health monitoring without systemd. Tags: latest:1.1.0 Version history: v1.1.0 | 2026-04-29T01:37:34.666Z | user v1.1.0: Configurable gateway command. No hardcoded data. Archive index: Archive v1.1.0: 7 files, 5632 bytes Files: README.md (812b), scripts
Rank
62
Safety
84
Downloads
1.1k
Updated
Oct 11, 2026
Version
1.1.0
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 11, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 11, 2026
- Adoption signal
- 1.1K downloadsadoption · observed Oct 11, 2026
- Latest release
- 1.1.0release · observed Apr 29, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s17ettags7atqtc9w4wkamex3983s6gj:termux-persistent-gateway- Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-kingofqin2026-termux-persistent-gateway/snapshot"
Run-check
$0.02 USD1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.
Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.
Documentation
CLAWHUB
7,892 characters of source documentation, loaded on request.
Extracted files
4 files captured from the source.
SKILL.md
--- name: termux-persistent-gateway description: "Keep an AI agent gateway running persistently on Android/Termux — tmux + wake-lock + auto-start on boot + health monitor. No systemd needed. Use when: (1) running a gateway on Termux/Android, (2) making gateway survive screen-off or reboots, (3) setting up auto-restart health monitoring on Termux." version: 1.1.0 author: kingofqin2026 license: MIT tags: [termux, android, gateway, persistent, tmux, wake-lock, auto-start] --- # Termux Persistent Gateway Keep your AI agent gateway alive on Android (no systemd), surviving screen-off, app-switching, and device reboots. ## Prerequisites ```bash pkg install tmux termux-api termux-boot ``` - **tmux** — terminal multiplexer, keeps the session alive when you close Termux - **termux-api** — provides `termux-wake-lock` / `termux-notification` - **termux-boot** — auto-start on device boot - **Android setting**: Settings > Apps > Termux > Battery > **Unrestricted** (critical — prevents Android from killing Termux) ## Configuration Before first use, edit the scripts to set: - **`GATEWAY_CMD`** — the command that starts your gateway (e.g. `openclaw gateway run`, `hermes gateway run`) - **`SESSION_NAME`** — the tmux session name (default: `agent-gw`) - **`LOG_DIR`** — where logs are stored (default: `~/.agent/logs`) All configurable values are at the top of each script — look for the `# === CONFIG ===` block. ## Quick Start ### Start the gateway ```bash bash <skill_dir>/scripts/run-gateway.sh ``` This script: 1. Acquires a wake lock (`termux-wake-lock`) so CPU stays alive 2. Kills any old gateway tmux session 3. Starts your gateway command inside a new tmux session 4. Logs output to the configured log directory ### Manage the session | Action | Command | |--------|---------| | Attach (see live output) | `tmux attach -t agent-gw` | | Detach | `Ctrl+B, D` | | Check if running | `tmux ls` | | View recent logs | `tail -f ~/.agent/logs/gateway-termux.log` | | Restart | kill session + run script again | ### Detach after attaching When you attach to tmux, press `Ctrl+B` then `D` (release both, press D) to detach without killing the session. The gateway keeps running. ## Auto-Start on Device Boot ### Step 1: Enable Termux:Boot ```bash pkg install termux-boot mkdir -p ~/.termux/boot/ ``` Open the **Termux:Boot** app from app drawer at least once to register it with Android. ### Step 2: Create boot script Copy the template and adjust paths: ```bash cp <skill_dir>/templates/termux-boot.sh ~/.termux/boot/agent-gateway chmod +x ~/.termux/boot/agent-gateway ``` Edit `~/.termux/boot/agent-gateway` to point `SCRIPT` at your `run-gateway.sh` path. The `sleep 15` gives Wi-Fi time to connect. Now the gateway auto-starts every time you reboot your phone. ## Health Monitoring (Cron) Optional: check on the gateway periodically and restart if it's down. ```bash bash <skill_dir>/scripts/healthcheck.sh ``` To schedule it, add to Termux cron: ```bash crontab -e # Add: */30 * * * * bash ~/.
README.md
# termux-persistent-gateway 📱 Keep your AI agent gateway running persistently on Android/Termux — no systemd needed. ## Features - **tmux session** — gateway survives screen-off and app-switching - **Wake lock** — prevents CPU from sleeping - **Auto-start on boot** — via Termux:Boot - **Health monitoring** — auto-restart if gateway goes down - **Configurable** — set your gateway command, session name, log paths ## Installation ```bash clawhub install termux-persistent-gateway ``` ## Quick Start ```bash # Edit config at top of scripts/run-gateway.sh to set your gateway command bash <skill_dir>/scripts/run-gateway.sh ``` ## Requirements - Termux (Android) - `pkg install tmux termux-api termux-boot` - Android: Settings > Apps > Termux > Battery > **Unrestricted** ## License MIT
_meta.json
{
"ownerId": "kn7c4cp5nwg908rmd83jx66q6581bqq2",
"slug": "termux-persistent-gateway",
"version": "1.1.0",
"publishedAt": 1777426654666
}skill-card.md
## Description: Keeps an AI agent gateway running persistently on Android/Termux using tmux, wake-lock, Termux:Boot, and health monitoring without systemd. This skill is ready for commercial/non-commercial use. ## Publisher: [kingofqin2026](https://clawhub.ai/user/kingofqin2026) ### License/Terms of Use: MIT-0 ## Use Case: Developers and operators use this skill to keep a trusted gateway process running on Android/Termux, including after screen-off, app switching, and device reboot. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: A gateway configured for boot or cron persistence can continue running after reboot or in the background when the user no longer expects it. Mitigation: Enable boot and cron persistence only for a trusted gateway, document the Termux:Boot script and cron entry, and remove them when persistence is no longer needed. Risk: An incorrect GATEWAY_CMD or SCRIPT path can start the wrong command or fail repeated health checks. Mitigation: Review and test GATEWAY_CMD, SESSION_NAME, LOG_DIR, and SCRIPT_PATH before enabling health monitoring or boot startup. Risk: A long-running gateway may expose network services or consume device resources. Mitigation: Restrict network exposure, monitor logs and resource use, and disable the tmux session and wake-lock when the gateway should stop. ## Reference(s): - [ClawHub skill page](https://clawhub.ai/kingofqin2026/skills/termux-persistent-gateway) - [Artifact README](artifact/README.md) - [Skill instructions](artifact/SKILL.md) ## Skill Output: **Output Type(s):** [text, markdown, shell commands, configuration, guidance] **Output Format:** [Markdown with inline bash commands and configuration guidance] **Output Parameters:** [1D] **Other Properties Related to Output:** [Produces setup, persistence, health-check, logging, and troubleshooting guidance for a Termux gateway.] ## Skill Version(s): 1.1.0 (source: server release evidence and skill frontmatter) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/kingofqin2026/skills/termux-persistent-gateway",
"sourceUrl": "https://clawhub.ai/kingofqin2026/skills/termux-persistent-gateway",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T14:11:01.242Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-kingofqin2026-termux-persistent-gateway/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-kingofqin2026-termux-persistent-gateway/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-11T14:11:01.242Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.1K downloads",
"href": "https://clawhub.ai/kingofqin2026/termux-persistent-gateway",
"sourceUrl": "https://clawhub.ai/kingofqin2026/termux-persistent-gateway",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T14:11:01.242Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.1.0",
"href": "https://clawhub.ai/kingofqin2026/termux-persistent-gateway",
"sourceUrl": "https://clawhub.ai/kingofqin2026/termux-persistent-gateway",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-04-29T01:37:34.666Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-kingofqin2026-termux-persistent-gateway/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-kingofqin2026-termux-persistent-gateway/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.1.0",
"description": "v1.1.0: Configurable gateway command. No hardcoded data.",
"href": "https://clawhub.ai/kingofqin2026/termux-persistent-gateway",
"sourceUrl": "https://clawhub.ai/kingofqin2026/termux-persistent-gateway",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-04-29T01:37:34.666Z",
"isPublic": true
}
]
}Record generated Oct 11, 2026.
