torlnk-termux
v0.2.1
Published
Install torlink natively on Termux (Android) — no proot, no containers. The real npm package, made to install where its own postinstall dies.
Maintainers
Readme
Requirements
- Termux from F-Droid (Play Store builds are outdated)
- node.js >= 22 — installed automatically if missing (
pkg install nodejs-lts) - An internet connection for the npm install (~70 MB)
Installation
One line — zero prerequisites:
curl -fsSL https://raw.githubusercontent.com/rexroze/torlnk-termux/main/install.sh | shOr via npm (needs nodejs first):
pkg install nodejs-lts
npm i -g torlnk-termux
torlnk-termux # one-time install, then use `torlnk`[!TIP]
torlnkis on your PATH immediately. Installing torlink the normal way fails on Termux — theip-setdependency's postinstall runsnpx only-allow pnpm, which dies on non-FHS Android. This installer runsnpm i -g torlnk --ignore-scriptsand drops a small launcher into~/bin(already on Termux's PATH) that runs the real torlink entry point with node. Nothing is patched — it's the unmodified upstream package.
Usage
torlnkType to search every source at once, Enter to run, arrows to move, d to
download, ? for the full key list. Paste a magnet, drop a .torrent file,
or run it headless on a server or seedbox:
torlnk watch <dir> download anything dropped into a folder
torlnk serve take magnets over HTTP
torlnk files stream finished downloads over HTTP
torlnk attach keep the TUI alive across ssh sessionsExpected warnings
On first launch you'll see two notices. They're harmless:
torlnk: WebRTC peers unavailable (native module not installed); TCP/UDP peers still work.
WebTorrent: uTP not supported Error: No native build was found ...The WebRTC/uTP native modules (node-datachannel, utp-native) publish no
Android builds, so torlink falls back to TCP/UDP + DHT peers. Downloads and
seeding work normally. Details: docs/FAQ.md.
How it works
torlink is a normal Node package — no binary download, no libc bridge. This
project exists because two Termux-specific quirks break a plain
npm i -g torlnk, and patches them at install time:
- Broken postinstall —
ip-setrunsnpx only-allow pnpm, which dies on Termux. The installer uses--ignore-scriptsto skip build hooks. - Broken shebang — npm's generated
torlnkbinary starts with#!/usr/bin/env, and/usr/bin/envdoesn't exist on Termux. The launcher runsnodeon the realdist/cli.cjsinstead.
Full technical deep dive: docs/HOW-IT-WORKS.md.
Links
- docs/FAQ.md — upgrading, uninstalling, troubleshooting
- docs/HOW-IT-WORKS.md — technical deep dive
- torlink — upstream project (MIT)
- LICENSE
