Bun

Free Bun Minecraft bot hosting.

Mineflayer written in TypeScript and started without a build step. Worth knowing first: this ecosystem is built and tested on Node.

Read this before you pick Bun

Mineflayer and the prismarine packages are written for Node.js and tested against it. Much of the stack runs under Bun, but a Minecraft client leans on networking, compression and binary parsing far harder than a chat bot does, and those are exactly the places runtime differences surface.

If you want TypeScript without a compile step and are happy to fall back to Node.js when something misbehaves, Bun is a reasonable choice. If you want the path the Mineflayer maintainers walk every day, the Node.js page is the one for you.

Libraries

Libraries that run here

Mineflayer

The same headless client the Node page describes, installed from the same package. Pin its version in package.json: a protocol bump is when you most want to know which version you were on.

mineflayer-pathfinder

Works as it does elsewhere, and costs what it costs elsewhere. Pathfinding needs chunks loaded, and loaded chunks are memory.

Bundled type definitions

Mineflayer ships its own types, so an index.ts that imports it gets autocompletion on your machine and runs unmodified here.

Deploying

Getting it running

  1. 1

    Upload your project

    Push your source over SFTP or drag it into the file manager, without node_modules. The prismarine tree is large, and your 512 MB of disk is better spent on the bot than on a copy of its dependencies.

  2. 2

    bun install runs on deploy

    Your package.json is installed before the bot starts, and quicker than npm manages on a dependency tree this size. You will notice it every time you change a version.

  3. 3

    Point us at your entry file and your credentials

    index.ts runs directly. The server address, port and account details belong in environment variables rather than your source, so sharing a screenshot of your code never shares them.

Memory

What actually fits in 256 MB

The numbers follow the bot, not the runtime. A Mineflayer client that stands still and reads chat is comfortable in 256 MB, because the world model grows with what the server sends and a stationary bot on a small view distance is sent very little.

Movement is what costs. Pathfinding holds loaded chunks to search through, and a bot crossing terrain at a large view distance climbs past 256 MB whichever engine runs it. Cut the view distance first, then check what your code keeps references to: a reconnect handler that re-registers listeners without removing the old ones leaks just as reliably under Bun.

FAQ

Questions

Does Mineflayer work on Bun?

Largely, but Bun is not where Mineflayer is developed or tested, and we will not promise more than that. If a problem disappears when you run the same code under Node.js, the runtime was the cause rather than your code.

Why run a Minecraft bot on Bun at all?

TypeScript without a build step is the real draw, along with a faster install for a dependency tree this big. If neither matters to you, Node.js is the lower-risk choice for a Minecraft bot.

Will Bun type-check my code?

No. Bun removes the types and runs what is left, so a type error reaches the server as a runtime error or not at all. Run tsc locally before you upload.

Can a Bun bot host the Minecraft server too?

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

Can I host a botnet?

No. Absolutely not, so do not try. A botnet here means an attack network: DDoS tools, stressers, booters, packet flooders, crash exploits, bot swarms that flood a server with fake players, and any "node" or "zombie" that takes attack orders from somewhere else. All of it is banned, whatever the target and whatever you call it. "Stress testing", "it is only my own server" and "it is only a game" are not exceptions.

It is also a serious crime. In the UK, knocking a server, website or network offline is an offence under section 3 of the Computer Misuse Act 1990, with up to 10 years in prison. Making, supplying or even obtaining a DDoS tool to use is a separate offence under section 3A, with up to 2 years. Where an attack causes serious damage to the economy, to people's welfare or to national security, section 3ZA allows up to 14 years, and life imprisonment where lives or national security are put at risk. Most other countries have laws just like these.

People get caught. The Aisuru botnet, built from hijacked routers, cameras and Android TV boxes, set the public record for a DDoS attack at 31.4 terabits per second, and it is tracked by Cloudflare, security researchers and police forces around the world. The three people who created Mirai, the botnet behind the 2016 attack that knocked Twitter, Netflix and much of the web offline for millions of people, pleaded guilty in the United States. The UK's National Crime Agency even runs fake DDoS-for-hire websites to collect the details of everyone who signs up to them.

Here, a server found running any of this is suspended straight away, without a warning first, and deleted. The account behind it is terminated, and so is any account opened to replace it. We can and will pass what we know to the police and the National Crime Agency.

None of this is about ordinary bots. An AFK client, a chat bridge or a helper bot on a server you are allowed to be on is exactly what this page is for. Read the acceptable use policy →