hosting:hardware:termux_server
Table of Contents
Termux Server Stack
What an Android device can serve with Termux, Caddy, and sshd. Applies to small ARM devices in the 3-4 GB RAM range: a Retroid Pocket and a Lenovo tablet both run this stack.
The Baseline Stack
- Caddy static file server on
:8080(file_serverover~/www) - sshd on
:8022(Termux's non-root SSH port) - cron + watchdog + Termux:Boot for boot persistence
- A Debian
proot-distrocontainer alongside for anything Termux lacks
Everything below installs with one pkg install from the Termux main repo and runs directly under Termux, so the existing watchdog can supervise it. Versions rotate; check pkg show <name> for what is current.
What It Can Serve
| Category | Packages | Notes |
|---|---|---|
| Web platforms | pocketbase, gitea/forgejo, miniflux, shiori, hugo/zola, kiwix-tools | PocketBase is a whole backend in one binary. Miniflux needs PostgreSQL. |
| Media | navidrome, jellyfin-server, minidlna, icecast, mpd+mympd, snapcast-server, transmission | Navidrome runs ~50-100 MB. Jellyfin direct-play fine; transcoding is impractical on ARM. |
| Sync and files | syncthing, rclone, restic+restic-server, aria2 | Encrypted backup backends work headless. |
| Databases | mariadb, postgresql, redis/valkey, sqlite, openldap | MariaDB needs tuning to ~300-500 MB. No MongoDB server package. |
| Monitoring | uptime-kuma, netdata | Keep netdata's retention small. |
What It Cannot
- Anything needing Docker or systemd services: proot is not a VM
- Heavy transcoding (Jellyfin/Plex)
- Browser-dependent automation (no headless Chrome worth running on 3 GB)
Practical Notes
- Termux's
wake_lockmatters:termux-wake-lockkeeps the CPU alive with the screen off - Battery is a built-in UPS. Keep charge cycling between ~40-80% for longevity
- Static files plus sshd plus cron is the practical workload; run heavier apps on an x86 box like the vivobook
- Control the device headless from a laptop with adb: Android ADB Control
See Also
hosting/hardware/termux_server.txt · Last modified: by 127.0.0.1
