One-command Termux bootstrap for rootless Linux containers.
curl -fsSL https://raw.githubusercontent.com/ivansslo/termuxrd/v1.0.0/install.sh -o install.sh
less install.sh # read it before running it
bash install.shIt installs rootd-fs, downloads a Linux container, and optionally makes new terminals open inside it.
- Installs prerequisites —
python,proot,git,curl. - Installs the rootd-fs engine, pinned to a release tag.
- Downloads and prepares a container (Ubuntu 24.04 by default).
- Optionally adds a marked, reversible block to your shell rc.
It prints this plan and waits for confirmation before touching anything.
bash install.sh # interactive
bash install.sh --yes # no prompts
bash install.sh --distro alpine # a different image
bash install.sh --no-autostart # skip the shell hook
bash install.sh --uninstall # undo everythingAfterwards you use rootd:
rootd enter ubuntu # open a shell in the container
rootd sh ubuntu -- apt update # run one command
rootd ls # list containers
rootd backup ubuntu # archive one
rootd caps # what this kernel supports
rootd purge # remove everythingAvailable images include ubuntu, debian, alpine, arch, fedora,
nextcloud, postgres, and any OCI reference. Run rootd presets for
the full list.
Enabling autostart appends a marked block to ~/.bashrc (or
~/.zshrc) and saves a .termuxrd-bak copy first. The block is written
to fail safe:
- only runs in interactive shells, so
scpandrsyncstill work; - refuses to run when
ROOTD_BOXis already set, so it cannot recurse; TERMUXRD_NO_AUTO=1skips it without editing any file;- if the container is missing or broken it prints a note and leaves you on the Termux host rather than a dead terminal.
If you ever get stuck:
TERMUXRD_NO_AUTO=1 bash
bash install.sh --uninstallYour rc file is only ever modified between the two termuxrd
markers. Nothing outside them is read or changed.
bash install.sh --uninstall # removes the shell block
rootd purge # removes containers and cached layers
pip uninstall rootd-fs # removes the engine- Termux on Android (ARM64 or ARM), or any Linux host
- Python 3.9+
- ~500 MB free for a typical Ubuntu container
Rootless containers are a convenience boundary, not a security boundary. PRoot emulates uid 0 by rewriting syscall arguments; it does not grant kernel privilege and will not contain hostile code.
Docker's daemon cannot run here. dockerd needs real root, cgroups,
overlayfs and veth — none available to an unprivileged Android app. What
does work is the Docker client against a remote daemon:
rootd docker <box> --host ssh://user@server. Run rootd caps to see
exactly which kernel features your device is missing.
Containers share the host network namespace, so a service bound to
:8080 inside a container is reachable at localhost:8080 on the phone.
termuxrd is a thin installer. The container engine is
rootd-fs; the sandboxing is done
by PRoot. Both are separate projects with
their own licences.
This project is not affiliated with, endorsed by, or sponsored by the Termux project. "Termux" appears in the name only to describe where it runs.
Earlier versions of this repository were named termux-rocd and
depended on a repository called rocd, which no longer exists. Version
1.0.0 is a rewrite; see CHANGELOG.md.
MIT — see LICENSE.