Skip to content

Install Termux Proot

arielaram edited this page Nov 17, 2026 · 2 revisions

Install: Termux and Proot-Distro (Android)

Plain Termux cannot run the Nationdex binaries. Termux is built on Android's own C library (Bionic), not glibc. The Linux binaries and their native libraries (skia, gifsx) are built for glibc Linux, and some modules, including TypeScript 7.0.2's native compiler, have no Android build. You must run everything inside Proot-Distro (Debian), as described below. The same goes for building from source.

Run the bot on an Android phone or tablet with Termux, and Proot-Distro for a full Debian Linux inside it. The Linux ARM64 binary runs there.

Heads up: a phone is a fragile server. Android can stop Termux when the screen is off or the battery is low. Use a dedicated old phone, keep it plugged in, and see Hosting.

1. Install Termux

Install Termux from F-Droid (https://f-droid.org). The Play Store build is outdated and will not update its packages.

Open Termux and update it:

pkg update && pkg upgrade -y
pkg install -y proot-distro

2. Install Debian

proot-distro install debian
proot-distro login debian

You are now inside Debian. Your prompt changes. Everything below runs inside Debian unless stated otherwise.

DNS problems in the proot (curl: (6) Could not resolve host)

If curl or apt cannot reach the internet inside Debian, DNS is the usual cause. Android resolves names through its own services, not /etc/resolv.conf, and Proot-Distro has to guess a nameserver. Some networks (hotspots, school or work Wi-Fi, some ISPs, VPN or Private DNS) block that guess.

Check and fix, inside Debian:

cat /etc/resolv.conf
echo "nameserver 1.1.1.1" > /etc/resolv.conf
echo "nameserver 9.9.9.9" >> /etc/resolv.conf
curl -I https://github.com

Proot-Distro may rewrite that file on the next login, so check it again if the error comes back.

Workaround without touching DNS: download in Termux itself (outside Debian), which uses Android's resolver, then copy the file into Debian:

# in Termux (not Debian)
pkg install -y curl
curl -LO https://github.com/nationdex/bot/releases/download/v1.0.0/nationdex-bot-linux-arm64.tar.gz
cp nationdex-bot-linux-arm64.tar.gz $PREFIX/var/lib/proot-distro/installed-rootfs/debian/root/

Inside Debian the file is then in /root/. Download SHA256SUMS.txt the same way and verify it.

3. Prepare Debian

apt update && apt upgrade -y
apt install -y curl ca-certificates tar nano

4. Download the binary

Phones use ARM64. Check with uname -m, which should print aarch64.

mkdir -p ~/nationdex && cd ~/nationdex
curl -LO https://github.com/nationdex/bot/releases/download/v1.0.0/nationdex-bot-linux-arm64.tar.gz
curl -LO https://github.com/nationdex/bot/releases/download/v1.0.0/SHA256SUMS.txt
sha256sum -c SHA256SUMS.txt --ignore-missing
tar -xzf nationdex-bot-linux-arm64.tar.gz
chmod +x nationdex-bot-linux-arm64

The sha256sum line must print nationdex-bot-linux-arm64.tar.gz: OK.

5. Settings

The archive already holds the native libraries, assets/ and the panel. Create .env (see Configuration):

cp .env.example .env
nano .env        # TOKEN and HOME_GUILD_ID

Nation artwork (assets/spawn_art, assets/window_art) is not shipped: add your own, see Install: Binaries.

6. Start

./nationdex-bot-linux-arm64

To leave it running after you close the terminal, use tmux:

apt install -y tmux
tmux new -s nationdex
./nationdex-bot-linux-arm64
# detach: press Ctrl+B then D. Reattach later with: tmux attach -t nationdex

Leaving and returning

  • exit leaves Debian and returns to Termux.
  • Later, proot-distro login debian gets you back in. Your files stay in ~/nationdex inside Debian.

Notes

  • The API and the panel are reachable from the phone's browser at http://localhost:3000. From other devices on the same Wi-Fi, use the phone's LAN IP and PANEL_PORT, and set PANEL_HOST=0.0.0.0.
  • termux-wake-lock (from the Termux:API app) asks Android not to sleep Termux. Untested here, so check it on your phone.
  • The ARM64 binary was smoke-tested in an emulated ARM64 Debian container (it boots and reaches the Discord login). It was not tested on a real phone. If the binary fails to start, see Troubleshooting.

Clone this wiki locally