Node.js

Free Node.js Minecraft bot hosting.

Mineflayer and the rest of the prismarine ecosystem, running around the clock on hardware that is not your laptop.

Libraries

Libraries that run here

Mineflayer

The headless client almost every Node Minecraft bot is built on. It logs in, sees the world, and gives you an API for everything a player can do.

mineflayer-pathfinder

Movement and navigation on top of Mineflayer. It is also the plugin most likely to push you into the memory ceiling, because pathfinding needs the world loaded.

The prismarine packages

Protocol, chunk, NBT and world handling as separate npm packages. Useful when you want to talk to a server without a full client on top.

Deploying

Getting it running

  1. 1

    Upload your project

    Drag the folder in or push it over SFTP, and leave node_modules behind. The prismarine tree is large, and uploading it would eat most of your 512 MB before your bot exists.

  2. 2

    Dependencies install themselves

    Your package.json is read on deploy and installed before the bot starts. Pin your Mineflayer version there if your server runs a protocol version that matters.

  3. 3

    Point us at your entry file and your credentials

    Usually index.js. The server host, port and any account details belong in environment variables, not in your source, so a screenshot of your code never leaks them.

Memory

What actually fits in 256 MB

A Mineflayer bot that reads chat, responds to commands and stands still is comfortable in 256 MB with room to spare. The world model it keeps is proportional to what the server sends it, and a stationary bot on a small view distance is sent very little.

It gets expensive the moment the bot moves. Pathfinding holds loaded chunks so it can search through them, and a bot crossing terrain at a large view distance will climb past 256 MB and be killed. If you need to travel, cut the view distance first, then look at how much of the world your code is holding references to.

The other Node-specific trap is chunk data accumulating in listeners you never detach. A long-running client that reconnects a hundred times over a week and re-registers its handlers each time will leak, and it will look like a Mineflayer problem rather than yours.

FAQ

Questions

Will Mineflayer run in 256 MB?

For a chat bot, an AFK client or a bridge, yes, comfortably. For a pathfinding bot roaming a large world, expect to tune it: reduce view distance, avoid holding chunk references, and keep the search area bounded.

Do I need to upload node_modules?

No. Upload your source and package.json and the install happens on deploy. This matters more here than on most projects because the prismarine dependency tree is big enough to fill your disk quota on its own.

Can I run several bots on one account?

One process per server, so several bots means several servers. Two Mineflayer clients in a single process share the memory limit between them, and two world models rarely fit where one does.

Can I write it in TypeScript?

Yes. Compile to JavaScript before you upload and point us at the compiled output. What runs is the JavaScript, exactly as it would be anywhere else.

Can the bot host the Minecraft server too?

No. This allocation runs a client that connects out to a server. The server itself needs a game host, and we are not one.

More on Minecraft bots

Hosting something else?