OpenAI Codex on Termux for Android ARM64.
Lightweight Bash installer. Debian proot runtime. Clean, repeatable setup.
Codux is a compact installer for running OpenAI Codex on Termux without building a large fork, shipping a custom Rust toolchain, or depending on a long manual setup. It uses proot-distro to place Codex inside Debian, which is the core design decision that makes the install path stable on Android ARM64 devices.
Many "Codex on Termux" approaches are either too heavy or too fragile. Codux is intentionally small:
- one Bash installer
- official Codex Linux ARM64 musl release
- Debian via
proot-distro - helper launcher commands created in Termux
- minimal moving parts compared with larger wrapper stacks
The goal is not to replace upstream Codex. The goal is to get Codex CLI running on Termux with a setup that is easy to inspect, easy to rerun, and easy to adapt.
Codux:
- confirms the device is ARM64 and the shell is Termux
- updates the Termux package layer to avoid partial-upgrade library breakage
- installs
proot-distro,curl,ca-certificates, andopenssl - installs Debian through
proot-distro - downloads the latest Codex Linux ARM64 musl archive
- installs Codex inside Debian
- creates helper commands in Termux
- opens the Debian shell after install so Codex is ready to use
Codex does not run directly in the normal Termux shell in the same clean way it does inside Debian. Codux uses Debian as the runtime boundary because it gives Codex a more predictable Linux userland while still staying fully inside Android user space.
Runtime model:
Android
-> Termux
-> proot-distro
-> Debian
-> Codex
That means the important thing to remember is simple: Codex runs inside Debian, not directly in the base Termux shell.
git clone https://github.com/Clock-Skew/Codux.git
cd Codux
chmod +x codux.sh
./codux.shIf you already have the script locally:
chmod +x codux.sh
./codux.shThe default behavior is opinionated on purpose. Codux upgrades the Termux package stack before installing dependencies because stale or partially upgraded Termux environments are one of the most common causes of broken curl, broken TLS libraries, and failed proot setup.
After the installer succeeds, Codux opens the Debian shell automatically unless you disable that behavior.
Inside Debian, run:
codexIf you leave Debian and later want to start Codex manually, the core command is:
proot-distro login debianThen run:
codexCodux creates these helper commands in Termux:
codex-debianlaunches Codex inside Debiancodex-login-debianstarts Codex device authentication inside Debiancodex-version-debianprints the installed Codex version
For most users, these helpers are the cleanest way to start using Codex after the initial install.
./codux.sh --help
./codux.sh --version
./codux.sh --no-enter-distro
./codux.sh --no-upgrade
./codux.sh --distro debian
./codux.sh --workdir codex-workMost useful flags:
--no-enter-distroskips the automatic Debian shell entry after install--no-upgradeskips the Termux upgrade path--workdirchanges the workspace directory inside Debian--distrochanges theproot-distrocontainer name--codex-urloverrides the release archive URL
Codux is designed for Android ARM64 + Termux + Debian proot. It is intentionally narrow in scope. If the device is not ARM64, or if the local Termux environment is badly outdated, expect install failures or runtime instability.
Run:
termux-change-repoChoose a working mirror, then rerun the installer.
Run:
pkg upgrade -yThen rerun Codux. This is the exact class of failure Codux tries to avoid by upgrading Termux packages first.
Make sure you are inside Debian:
proot-distro login debianThen run:
codexUse:
./codux.sh --no-enter-distroThis keeps the installer from dropping directly into Debian after setup.
This script may take some time to complete, depending upon whether it is a fresh install, a pre-existing version, or has bad/outdated mirrors. Please be patient, and do not exit unless an error presents.
This is barely anything more than a proof of concept, so please go into the endeavor with that mindset. I'm not responsible for breaking or destroying current installs, or for codex wreaking havoc on your device because you chose to use YOLO flags. Good luck travelers.






