Back to blog

I Got A Minecraft Server Running on My Router

I put a Minecraft server on a device that had no business running one.

Post

I was watching YouTube the other day, and I stumbled upon a video of someone getting a Minecraft server running on a printer. This got me curious. I thought hey! I have an old, retired router. It is not doing anything useful at the moment. So naturally, I decided it should host a Minecraft server.

Getting In (Not a Hack, Sorry)

The target: a Netgear RAX10, my old Wi-Fi 6 router, which has no idea what I'm about to do to it.

I want to kill the drama early: this wasn't some elite exploit. Netgear has an undocumented telnet-enable feature, a magic packet using bkerler's netgear_telnet flips it on. You still need the actual admin password for anything to happen after that. I wouldn't consider it a hack, but more a hidden diagnostic feature Netgear never bothered to put in the manual.

Once in, I had a root shell.

Poking Around

Doing some basic reconnaissance revealed this device is running a BCM6755, an ARM SoC running a customized Buildroot Linux image. Pretty sweet actually. Knowing it's running a full Linux kernel made my life much easier.

I learned the root filesystem is squashfs, and read-only. So no amount of messing about was going to accidentally corrupt the base system. The only writable space is a small UBI volume, about 100MB total, with roughly 76MB free. Tight, but enough for a small project if I kept it lean.

No compiler on the device itself, that's to be expected for something this constrained. Whatever ran here would need to be built elsewhere and shipped over as a finished binary.

So, the plan is: cross-compile, ship the binary over, done. (In theory).

uname -m

armv7l. 32-bit ARM, sweet. Matching the standard arm-linux-gnueabihf toolchain. Building this should be a piece of cake :)

Building the Server

I picked UCraft from the author of the video I watched. This person already did most of the heavy lifting (thanks!). All I had to do was write a toolchain file, and statically linked everything, because the router's tiny Buildroot environment wasn't going to impress me with any shared libraries.

The first build attempt: failed outright, from -Werror over a %ld printed against a size_t. Fair. Swapped it for %zu, the specifier that actually exists for this exact purpose, and moved on.

Second attempt built clean except for a linker warning about gethostbyname, static binaries still need real glibc shared libraries at runtime for DNS to work, there's unfortunately no way around that, NSS just doesn't do fully static. That whole code path was sitting behind ONLINE_MODE in the config. My retired router hosting a server nobody outside my own house will ever touch does not need online mode. So, I turned it off. The warning vanished. Rebuilt cleanly.

It Just... Works‽

1.2MB binary. Shipped it over, chmod +x, ran it.

It came up. I connected, and spawned in. Wow. A router that used to sit in a drawer is now, for reasons that made sense in my caffeine-addled mind, running a Minecraft server on the same chip that used to be an access point. Now there's no practical purpose for this whatsoever. The server has been intentionally kept minimal to the point of being... functional. But this has genuinely been one of the more fun evenings I've had with embedded hardware in a while.