Aternos 24 7 Online Bot
A lightweight Node.js Minecraft bot that keeps your server online and rotates through a list of bots.
概要
README.md
目次
Aternos 24/7 Hosting Bot
A lightweight Node.js Minecraft bot that joins your server, keeps your farm chunks loaded, and rotates through a list of bots (BlueNugget_1 to BlueNugget_100) every 20 minutes. It reconnects automatically if kicked or if the server restarts, tracks live server uptime, and can be hosted for free on bot-hosting.net and other Node.js platforms.
How It Works
The bot uses Mineflayer to join your Minecraft server as an offline player.
- 20-minute bot rotation: Only one bot stays online at a time. Every 20 minutes, the active bot leaves cleanly and the next bot from your list joins after a 3-second gap (
BlueNugget_1->BlueNugget_2-> ... ->BlueNugget_100-> loops back toBlueNugget_1). - Safe Anti-AFK: Every 45 seconds, the bot gently turns its head and swings its arm without walking, so it stays right on your farm without triggering idle kicks.
- Auto-Reconnect & Auto-Respawn: If the bot dies, it respawns automatically. If it gets kicked or disconnected, it reconnects on its own after a configurable delay.
- Live Uptime Meter: Prints how long the server has been online every minute in the console (without resetting during planned bot rotations). Any player can also type
!uptimein Minecraft chat to see the current uptime.
Requirements
- A Minecraft server (see compatibility section below)
- A hosting account for the bot — bot-hosting.net (free, recommended) or Node.js 18+ on your PC / VPS
- Offline (cracked) mode enabled on the server
Minecraft Server Compatibility
Not all servers are the same. Here is an honest breakdown of how well the bot works on each host and server software.
By Hosting Provider
Aternos (Free)
Survival rating: Low to Medium
Aternos shuts servers down when no players are online, and platform-level inactivity rules can still stop a server after extended idle periods. The bot handles vanilla idle-kicks and keeps your farm chunks loaded while the server is running.
What you can do: set player-idle-timeout=0 in server.properties (or Aternos Options) to stop the vanilla idle kick, and use the bot to keep farms running while you or your friends step away.
Minehut / Ploudos (Free)
Survival rating: Medium
Less aggressive than Aternos about shutting servers down, so the bot lasts longer here. However, free hosts still have platform hibernation rules, so set player-idle-timeout=0 and expect occasional restarts.
Your own VPS or Oracle Cloud Free Tier (Recommended)
Survival rating: Very High
If you run your own Paper, Fabric, or Vanilla server on a VPS, no third party shuts it down. Set player-idle-timeout=0 and the bot stays connected permanently as long as the bot host is running.
Bisect Hosting / Apex / Shockbyte (Paid shared hosting)
Survival rating: High
Paid hosts do not have aggressive inactivity shutdowns. Combined with bot-hosting.net or a VPS, uptime stays consistently high.
Hypixel, public servers, large networks
Survival rating: Very Low
Large public servers use strict anti-bot systems and ban AFK/offline bots quickly. This bot is built for private SMPs and personal farm servers, not public networks.
By Server Software
| Server Software | Minecraft 1.8 – 26.1 | Newer than 26.1 |
|---|---|---|
| Vanilla | Supported | Not supported until library updates |
| Paper / Spigot / Purpur | Supported | Supported with ViaVersion + ViaBackwards |
| Fabric | Supported | Supported with ViaFabric |
| Forge / NeoForge | Server-side mods only | Not supported |
- ViaVersion, ViaBackwards, and ViaRewind are server-side compatibility plugins (installed in your Paper/Spigot/Purpur
plugins/folder, not inside this bot). Their compatibility depends on your server software and Minecraft version. If your Paper server runs a newer version (like26.3), install ViaVersion + ViaBackwards on the server and set"version": "26.1"inconfig.json. - Forge / NeoForge: Because the bot joins as a vanilla client, it can only connect if all mods on the server are server-side only. Servers requiring client-side mods will reject headless bots.
Setup
Step 1 - Configure your Minecraft server
- Use Vanilla, Paper, Spigot, Purpur, Fabric, Forge, or NeoForge (Paper is recommended for best plugin support).
- Enable offline / cracked mode so the bots can join without paid Microsoft accounts:
- Aternos:
Options-> Cracked ->ON - Other servers: set
online-mode=falseinserver.properties
- Aternos:
- (Optional, Paper/Spigot only) Install ViaVersion, ViaBackwards, and ViaRewind if you want the bot to connect across different Minecraft versions.
- Set
player-idle-timeout=0inserver.propertiesso Minecraft does not kick the bot for being idle. - Put the world spawn at your farm so every rotating bot spawns in the exact right spot:
/setworldspawn <x> <y> <z> /gamerule spawnRadius 0 - If your server has a whitelist, add the bot names (see Whitelist All Bots at Once).
Step 2 - Configure the bot
Open config.json and fill in your server details:
{
"host": "your-server.aternos.me",
"port": 25565,
"version": false,
"auth": "offline",
"namePrefix": "BlueNugget_",
"botCount": 100,
"usernames": [],
"rotateIntervalMs": 1200000,
"switchDelayMs": 3000,
"reconnectDelayMs": 10000,
"uptimeLogIntervalMs": 60000,
"uptimeChatCommand": true,
"antiAfk": true,
"antiAfkIntervalMs": 45000
}
Deployment Options
Pick one platform to host the bot. No Docker setup is required.
bot-hosting.net (Recommended - Free, Easy Panel)
Best for: people who want free 24/7 Node.js hosting with a simple web console.
Important (Disk Space Tip): Free
bot-hosting.netcontainers have limited disk space. Running a normalnpm installdownloads ~495 MB of Minecraft data (including ~390 MB of unused Bedrock Edition files) and can fail withENOSPC: no space left on device. Useminecraft-farm-bot-final.zipinstead — it is only ~14.7 MB, already includes a slimmednode_modules, and skipsnpm installautomatically.
- Go to bot-hosting.net and create a free Node.js server.
- Open the Files tab in the panel and delete any old files (
node_modules,.npm,package.json, old zips). - Upload
minecraft-farm-bot-final.zipand click Unarchive / Extract. - Delete
minecraft-farm-bot-final.zipafter extracting to keep disk space free. - Open
config.json, set yourhostandport, and click Save. - Go to the Startup tab and confirm the startup file is set to:(Startup command:
index.jsnode index.js) - Go to Console and click Start. You will see live connection logs and the 1-minute uptime meter directly in the console.
Local PC or VPS (Node.js 18+)
Best for: testing locally or running on your own machine/VPS.
- Install Node.js 18+ from nodejs.org.
- Extract the project or clone the GitHub repository:(The
git clone https://github.com/Rudra-Sarkarr/minecraft-farm-bot.git cd minecraft-farm-bot npm installpostinstallscript automatically removes ~390 MB of unused Bedrock data.) - Edit
config.jsonwith your serverhostandport. - Start the bot:
node index.js
Oracle Cloud Free Tier (Best Long-Term Option - Truly Free Forever)
Best for: maximum uptime and full control at zero cost.
- Create a free ARM VM (Ubuntu) at cloud.oracle.com.
- SSH into your VM and install Node.js 20:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt-get install -y nodejs - Clone the repo and install dependencies:
git clone https://github.com/Rudra-Sarkarr/minecraft-farm-bot.git cd minecraft-farm-bot npm install - Edit
config.jsonwith your server IP and port. - Keep it running 24/7 with
pm2:sudo npm install -g pm2 pm2 start index.js --name aternos-bot pm2 save pm2 startup
Useful pm2 commands:
- Check status:
pm2 status - View logs:
pm2 logs aternos-bot - Restart:
pm2 restart aternos-bot
config.json Reference
| Key | Default | What it does |
|---|---|---|
host |
"your-server.aternos.me" |
Your Minecraft server IP or hostname. |
port |
25565 |
Your server port (copy from Aternos Connect button). |
version |
false |
false = auto-detect. Set an exact version like "26.1" or "1.21.4" if needed. |
auth |
"offline" |
Keep "offline" for cracked servers. |
namePrefix |
"BlueNugget_" |
Prefix used to generate bot names (BlueNugget_1, BlueNugget_2, ...). |
botCount |
100 |
Total rotating bots to generate. Set to 1 for a single bot. |
usernames |
[] |
Optional custom list (e.g. ["BotOne", "BotTwo"]). Overrides namePrefix and botCount when non-empty. |
rotateIntervalMs |
1200000 |
Time each bot stays online before switching (ms). 1200000 = 20 minutes. |
switchDelayMs |
3000 |
Wait time between old bot quitting and next bot joining (ms). |
reconnectDelayMs |
10000 |
Wait time before reconnecting after a disconnect (ms). |
uptimeLogIntervalMs |
60000 |
How often the uptime meter logs to console (ms). 60000 = 1 minute. |
uptimeChatCommand |
true |
Lets players type !uptime in Minecraft chat to check server uptime. |
antiAfk |
true |
Turns the bot's head and swings its arm without walking. |
antiAfkIntervalMs |
45000 |
Interval between anti-AFK actions (ms). |
Username rules: Minecraft usernames must be 3–16 characters using only letters, numbers, and underscores (
_). Hyphens (-) are not allowed — useBlueNugget_1, notBlueNugget-1.
Whitelist All Bots at Once
If your server has a whitelist enabled, generate an offline-mode whitelist.json for all configured bot names in one command:
node scripts/generate-whitelist.js
- Merge the generated entries into your server's
whitelist.json(keep your existing players in the list). - Run
whitelist reloadin your server console, or restart the server.
On Aternos, if
whitelist.jsonis not editable in the Files tab, add names via Players -> Whitelist or lowerbotCountto5or10(the bot loops forever, so a small list works just as well).
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
ENOSPC: no space left on device |
Free host disk filled up during npm install. |
Upload minecraft-farm-bot-final.zip (pre-slimmed, skips npm install). |
No data available for version 26.x |
Server version is newer than minecraft-data supports (up to 26.1). |
Switch server to 26.1 or older, or install ViaVersion + ViaBackwards on Paper and set "version": "26.1". |
write ECONNRESET / ECONNREFUSED |
Server is offline, starting up, or port changed. | Make sure the server is Online and verify the port in config.json. |
You are not whitelisted |
Whitelist is ON. | Add bot names with /whitelist add BlueNugget_1 or generate-whitelist.js. |
Failed to verify username |
Server is in online (premium) mode. | Enable Cracked (Aternos) or set online-mode=false. |
Kicked mentioning mods / FML |
Server requires client-side mods. | Only servers with server-side-only mods allow vanilla/bot clients. |
Connection throttled |
Reconnecting too fast. | Increase switchDelayMs and reconnectDelayMs in config.json. |
Notes
- Do not use the same username as a real player on your server.
- On Aternos and similar free hosts, platform-level shutdowns can still happen regardless of what the bot does.
player-idle-timeout=0only stops the vanilla idle kick. - This project is not affiliated with Aternos, Mojang, or Microsoft. Use it responsibly and follow your server's rules.
Credits
Developed by Rudra Sarkar
License: MIT
デプロイの手順
- 1 デプロイページを開くデプロイに名前を付けます。確定するときにログインします。
- 2 変数を入力テンプレートが求める値を入力します。デプロイの環境変数として保存されます。
- 3 リソースを確認プランの共有プールから割り当てられ、そのまま起動します。どのアカウントも無料から始められます。