Install Node.js on Android with Termux

Posted: 4/20/2026 | Updated: April 20, 2026

This guide shows how to install Node.js on Android using Termux, with a few practical notes from real-world mobile development.

Step 1: Install Termux

Download Termux from Google Play, F-Droid, or the Termux GitHub releases page.

Step 2: Update packages

Open Termux and run:

pkg update && pkg upgrade

This refreshes the package list and brings your Termux environment up to date.

Step 3: Install Node.js

Run:

pkg install nodejs

When the prompt appears, type y and press Enter.

Step 4: Verify installation

Check that Node.js and npm are installed:

node --version
npm --version

It should return the installed Node.js version and the npm version.

Additional setup

  • npm is available automatically after installing Node.js.
  • If you need to compile native modules, install build tools first:
pkg install build-essential

I install build-essential only when a package fails to compile, because it adds extra disk usage on mobile.

Storage access

To allow Node scripts to read and write files on your phone's internal storage, run:

termux-setup-storage

I usually do this right after installing Node. It avoids surprises later when a script tries to save logs or output to /sdcard.

See also

Frequently asked questions

Yes. Installing the `nodejs` package in Termux also provides npm, so you can use it immediately.