The $80 AI gateway: a full Hermes install on a Termux phone

Field notes: 24/7 self-hosted AI agent on an $80 Termux phone. Two install traps documented. Zero monthly cost.

The $80 AI gateway: a full Hermes install on a Termux phone

Field notes from running a 24/7 self-hosted AI agent on an $80 phone instead of a VPS. Zero monthly cost, zero inbound ports, and it survives reboots and battery managers.

Why a phone beats a VPS for this

A gateway agent only needs outbound connections: it polls Telegram, calls model APIs, and runs scheduled jobs. It never needs an open inbound port. A phone behind carrier NAT does all of that for free, and its storage is a drawer you physically own. The VPS got demoted to serving websites.

The two install traps, so they cost you nothing

  1. Termux ships Python 3.14 and Hermes wants <3.14. The tur repo carries python3.13, and the venv must be built with that or every pip install fails at the version gate.
  2. pip compiles the Rust and C dependencies from source on the phone. Install clang and rust first, and shim psutil with the Android platform patch, or the build dies an hour in.

Keeping it alive

Android kills background processes aggressively. The working stack: battery unrestricted for Termux and Termux:Boot, the phantom-process killer disabled over wireless ADB, a boot script that starts the gateway on power-on, and a respawn loop with a control file so crashes self-heal.

Full playbook with the bill of materials, the Shizuku setup for shell powers without root, and the honest catches:
https://thethriftydev.com/blog/hermes-ai-gateway-android-phone/


Write a comment