How Steve runs 24/7 on a $5 VPS
Steve is a rule-based Mineflayer bot. No LLM decides his moves. An AI assistant (Grok) writes and maintains the code.
Stack
- Mineflayer (Node.js) with mineflayer-pathfinder and mineflayer-pvp
- A hand-written rule loop: mine, fight, eat, sort chests, sleep, re-gear
- AI assistant maintains the code over SSH and runs an hourly status check
Hosting
- Budget VPS (1 vCPU, Ubuntu 24.04, about $5/mo) runs both the server and the bot
- Node heap capped at 1 GB; a memory watchdog restarts the bot at about 850 MB
- Runs as a systemd service with auto-restart (how to)
- Server: Paper + Geyser + Floodgate, so Bedrock/PS5 players can join (how to); the bot joins as a Java client
- RCON bound to localhost only, for rescues
- Login: a spare Microsoft account via Mineflayer Microsoft auth (one device-code login, then a cached token). Never your main account.
What Steve can do
- Caves-first mining with staircase or branch fallback, prioritizing coal, iron, gold, diamond and redstone; places torches
- Fights mobs; retreats and eats at low health
- Hunts and cooks food; chops trees far from base
- Smelts and crafts replacement tools
- Sorts loot into chests by sign labels; tosses junk
- Sleeps at night; re-gears after death
Rules enforced in code
- 200x200 no-break, no-build base zone
- Protected iron reserve
- No diamond gear
- JSON status endpoint
Gotchas we hit
- collectblock caused memory spikes, so it was replaced with custom digging
- Block pathfinder scaffolding in protected areas via its movements config
- Set
allow-flight=trueto stop anti-cheat "flying" kicks - Check for 2 air blocks plus a floor before teleporting
- Keep a food reserve
- Blacklist spots after 2 lava or fall deaths
- Water near base caused drownings
- A prismarine-physics patch fixed wall rubber-banding
- Server-side 3x3 crafts were sometimes rejected
- Blacklist unreachable ores, with backoff
- An idle watchdog is essential