termux

Manages Termux Android devices via SSH, runit services, and Termux:Boot autostart.

1|Updated Aug 24, 2026
One-click install
npx skills add https://github.com/CliffVale/opencode-free-setup --skill termux-cliffvale
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: termux
Source: https://github.com/CliffVale/opencode-free-setup/tree/main/skills/termux
Command: npx skills add https://github.com/CliffVale/opencode-free-setup --skill termux-cliffvale

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running persistent services on an Android phone via Termux is tricky: SSH sessions have a broken PATH, Android aggressively kills orphaned background processes, and nohup/setsid do not survive session disconnects. This Skill provides the correct patterns for SSH access, persistent daemons, and boot autostart on Termux. ## Core Features & Use Cases - Persistent services with termux-services (runit): Create, enable, start, and stop runit services under $PREFIX/var/service/sv/ so daemons survive SSH disconnects. - Termux:Boot autostart: Write boot scripts in ~/.termux/boot/ that source the profile, acquire a wake lock, and delay network services until WiFi is up. - SSH access and file transfer: Connect through cloudflared proxy commands, use full binary paths in SSH sessions, and transfer files with scp. - Use Case: Deploy a long-running Python bot on an Android phone by creating a runit service from the Termux app, enabling it with sv-enable, and verifying it survives reboots via a Termux:Boot script. ## Quick Start Set up a persistent Python service on my Termux device using termux-services so it keeps running after my SSH session closes.

Frequently Asked Questions about termux

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep a process running on Termux after SSH disconnects?▼

Use termux-services (runit) instead of nohup or setsid, which Android kills when the SSH session ends. Create a run script in $PREFIX/var/service/sv/myservice/, then run sv-enable and sv up from the Termux app.

How do I run scripts automatically when Android boots with Termux?▼

Install the Termux:Boot app and place scripts in ~/.termux/boot/. The script should call termux-wake-lock, source $PREFIX/etc/profile for PATH, and add sleep 15 before network-dependent services since WiFi takes time to connect.

Why are commands like python3 or pkg not found over SSH to Termux?▼

SSH sessions on Android get a limited PATH that excludes the Termux bin directory. Always use full paths such as /data/data/com.termux/files/usr/bin/python3 or /data/data/com.termux/files/usr/bin/apt in SSH commands.

Does Termux support systemd for managing services?▼

No, Termux is a user-space app without systemd. It uses termux-services, which provides runit-based service supervision similar to Void Linux, with sv up, sv down, and sv status commands.

When should I not use this Termux approach?▼

Do not use it for generic Linux server work unrelated to Android or Termux. The PATH quirks, process-killing behavior, and runit setup described here are specific to the Termux user-space environment on Android devices.