A simple, robust AFK bot designed to keep Aternos Minecraft Bedrock servers online. It supports both automatic movement and randomization to avoid AFK detection.
- Anti-AFK: Randomly rotates, looks around, sneaks, and swings arm.
- Auto-Connect: Automatically resolves Aternos dynamic IPs.
- Auto-Reconnect: Retries connection if kicked or if the server is offline.
- Cross-Platform: Runs on Windows, Linux, and Android (via Termux).
- Node.js (Version 16 or higher recommended).
-
Install Node.js
- Download and install from nodejs.org.
-
Download the Bot
- Download this folder to your computer.
-
Install Dependencies
- Open a terminal (Command Prompt or PowerShell) in the folder.
- Run:
npm install
-
Configure
- Open
bot.jsin a text editor (like Notepad). - Edit the
configsection at the top with your Aternos address:const config = { host: "your-server.aternos.me", port: 12345, // Port from the "Connect" button username: "AFK_Bot", offline: true, // Set to false if you need Microsoft Auth };
- Open
-
Run
node bot.js
-
Install Termux
- Download Termux from F-Droid (avoid the Play Store version as it is outdated).
-
Setup Environment
- Open Termux and run the following commands one by one to install Node.js and necessary build tools:
pkg update && pkg upgrade pkg install nodejs python make clang git
- Open Termux and run the following commands one by one to install Node.js and necessary build tools:
-
Get the Bot Code
- You can transfer the files from your PC to your phone, or use
gitif you have the code on GitHub.
- You can transfer the files from your PC to your phone, or use
-
Install Dependencies
- Navigate to the bot folder:
cd path/to/afk-bot - Install the packages (this may take a few minutes):
npm install
- Navigate to the bot folder:
-
Run
node bot.js
Note: If using Microsoft Auth (
offline: false), Termux will show a link. Copy and paste it into your browser to authenticate.
Type these in the terminal while the bot is running:
!start- Enable Anti-AFK movement (Default).!stop- Disable movement (Bot stands still).