Skip to content

The agent that grows with you

docs(termux): Android/Termux install guide

ethernet8023ff62d5c085ee
diff --git a/website/docs/getting-started/platform-support.md b/website/docs/getting-started/platform-support.md
index cf5ac4b3f32..10d19b1c6f3 100644
--- a/website/docs/getting-started/platform-support.md
+++ b/website/docs/getting-started/platform-support.md
@@ -33,6 +33,7 @@ PRs will be accepted to fix issues with them, but they will take precedence belo
| OS / Architecture | Installation methods | Notes |
| ------------------------------ | -------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| **Nix** (MacOS, Linux, NixOS) | [`install.sh`](./nix-setup.md) | Breaks often due to node.js packaging woes. Best of luck~! <3 |
+| **Android / [Termux](./termux.md)** (aarch64) | [APT package](./termux.md) (`pkg install hermes-agent`) | Self-contained package — bundles its own Python and Node. No service manager: run the gateway in a Termux session. |
## Unsupported
@@ -41,7 +42,7 @@ We suggest that you migrate to a supported distribution method or platform.
They may be broken right now, they may break more in the future.
PRs to fix them will _not_ be accepted, and any code that keeps compatibility with them may be removed at any point.
-- Android / Termux (support was removed)
+- Android / Termux on non-aarch64 devices (aarch64 is [supported](./termux.md) via our APT package)
- installs via the AUR (we might upstream patches if it helps out <3)
- macOS on x86 (Intel) processors
- installs via `pypi` (e.g. `uv tool install hermes-agent`, `pip install hermes-agent`, etc.)
diff --git a/website/docs/getting-started/termux.md b/website/docs/getting-started/termux.md
new file mode 100644
index 00000000000..d87bfaf473c
--- /dev/null
+++ b/website/docs/getting-started/termux.md
@@ -0,0 +1,149 @@
+---
+sidebar_position: 3
+title: "Android / Termux"
+description: "Install Hermes Agent on Android via Termux using our signed APT package"
+---
+
+# Hermes on Android with Termux
+
+Hermes Agent runs on Android through [Termux](https://termux.dev/) as a native
+APT package, served from our own signed package repository.
+
+:::info Supported configuration
+Termux on **aarch64 (arm64-v8a)** devices is the supported configuration. Other
+architectures are not packaged yet.
+:::
+
+## How the install works
+
+The package is fully self-contained: it ships its own Python and its own Node,
+and the entire dependency set is pre-validated at build time. Nothing is
+compiled or downloaded on the device during install, and it does not depend on
+Termux's `python` or `nodejs` packages.
+
+The package is distributed through our signed APT repository (hosted on our
+release storage). Installing means:
+
+1. Telling `pkg` about the repository for the channel you want
+ (see [Channels](#channels) below).
+2. Importing the repository's GPG public key so `pkg` can verify the
+ packages.
+3. Installing the package:
+
+ ```bash
+ pkg install hermes-agent
+ ```
+
+The `hermes` command is a symlink in `$PREFIX/bin`, so it is available from any
+Termux shell immediately after install.
+
+### Installing step by step
+
+For the **canary** channel (aarch64 devices):
+
+```bash
+# 1. Import the repository signing key (published by the repo itself).
+mkdir -p $PREFIX/etc/apt/keyrings
+curl -fsSL \
+ https://hermes-assets.nousresearch.com/releases/termux/canary/key.asc \
+ -o $PREFIX/etc/apt/keyrings/hermes-agent.asc
+
+# 2. Add the repository.
+echo "deb [signed-by=$PREFIX/etc/apt/keyrings/hermes-agent.asc] https://hermes-assets.nousresearch.com/releases/termux/canary hermes-canary main" \
+ > $PREFIX/etc/apt/sources.list.d/hermes-agent.list
+
+# 3. Install.
+pkg update
+pkg install hermes-agent
+```
+
+For the **stable** channel, use `stable` in place of `canary` in both URLs
+(and the suite name `hermes-stable` in the `deb` line).
+
+:::tip Verify the key by fingerprint first
+If you prefer to check what you are trusting, fetch the key, inspect it with
+`gpg --show-keys <keyfile>`, and compare the fingerprint against the one we
+publish on the [releases page](https://github.com/NousResearch/hermes-agent/releases).
+:::
+
+## What gets installed
+
+Everything lives in a single dpkg-owned directory, with one symlink outside
+it:
+
+| What | Where |
+| --------------------------- | ------------------------------ |
+| The app (Python, Node, venv) | `$PREFIX/lib/hermes-agent/` |
+| The `hermes` launcher | `$PREFIX/bin/hermes` (symlink) |
+| Your data | `~/.hermes/` |
+
+`$PREFIX` is Termux's install prefix (typically `/data/data/com.termux/files/usr`).
+
+Your data - configuration, sessions, skills, memories - lives in `~/.hermes/`
+and is separate from the package.
+
+## Channels
+
+Two channels are published, mirroring the desktop release channels:
+
+- **stable** - tagged releases.
+- **canary** - built from the latest development state.
+
+Point the repository `sources.list` entry at the channel you want
+(`hermes-stable` or `hermes-canary` distribution). Version strings for
+nightlies sort below stable, so switching back to stable always upgrades.
+
+## Updating
+
+Updates come through the package manager:
+
+```bash
+pkg upgrade hermes-agent
+```
+
+`hermes update` on a Termux install refuses to self-update and prints exactly
+this command instead - the package manager owns the install.
+
+## Running the gateway
+
+Termux has no service manager, so the messaging gateway runs as a foreground
+process in a Termux session:
+
+```bash
+hermes gateway run
+```
+
+Or in the background with `nohup`:
+
+```bash
+hermes gateway stop
+nohup hermes gateway run >> ~/.hermes/logs/gateway.log 2>&1 &
+```
+
+:::warning Android phantom process killer
+Android may suspend or kill background processes, including Termux jobs. To
+keep a background gateway alive, exclude Termux from battery optimization
+(Android Settings -> Apps -> Termux -> Battery -> Unrestricted) and keep the
+Termux session alive (a wake lock via `termux-wake-lock` helps). Treat
+background gateway persistence on a phone as best-effort.
+:::
+
+## Uninstalling
+
+```bash
+pkg uninstall hermes-agent
+```
+
+This removes the package and the `$PREFIX/bin/hermes` symlink. Your data in
+`~/.hermes/` is left untouched.
+
+## Troubleshooting
+
+| Problem | Solution |
+|---------|----------|
+| `Unable to locate package hermes-agent` | The repository `sources.list` entry is missing or the channel name is wrong - re-check it, then run `pkg update`. |
+| Signature / GPG errors during `pkg update` | The repository public key isn't imported (or is stale) - re-fetch it from the channel's `key.asc` URL and re-run `pkg update`. |
+| `hermes: command not found` | Reinstall the package, or check that `$PREFIX/bin` is on your `PATH`. |
+| Gateway dies when the screen turns off | See the [phantom process killer note](#running-the-gateway) - battery-optimization exemption plus `termux-wake-lock`. |
+
+For general diagnostics, run `hermes doctor`.
diff --git a/website/sidebars.ts b/website/sidebars.ts
index 38f8c2f76e5..aa2d42ed02c 100644
--- a/website/sidebars.ts
+++ b/website/sidebars.ts
@@ -11,6 +11,7 @@ const sidebars: SidebarsConfig = {
'getting-started/quickstart',
'getting-started/installation',
'getting-started/platform-support',
+ 'getting-started/termux',
'getting-started/nix-setup',
'getting-started/updating',
'getting-started/learning-path',