How to Run a Node.js WhatsApp Bot on Android with Termux

Published November 19, 2026

You do not need a laptop or a paid server to test a Node.js bot. Termux gives you a Linux terminal on your Android phone, and it is enough to develop and run small bots.

Step 1: Install Termux

Install Termux from F-Droid. The version on the Play Store is outdated and package installs often fail.

Step 2: Install Node.js and Git

pkg update
pkg upgrade
pkg install nodejs git

Check the install with node -v and npm -v.

Step 3: Get your bot and install dependencies

git clone https://github.com/yourname/yourbot
cd yourbot
npm install
node index.js

Before running, you can check a file for syntax mistakes with node -c index.js. It catches typos without starting the bot.

Step 4: Keep it running

Android stops background apps to save battery, which will kill your bot. To reduce this:

Limitations

A phone is fine for development and light use, but it depends on your battery, signal and mobile data. For a bot that must be online around the clock, move it to a VPS or a hosting service once it has real users.