Mapping worlds that are 1.5 times around the Earth
Every world on the server now has a live 3D map you can open in a browser. Getting there meant pre-generating a lot of terrain, a fun detour into just how big a Minecraft world is, and figuring out how to put the maps online without handing out passwords.
Live maps with BlueMap
BlueMap runs on each world's server and draws the world as a 3D map you can spin around in a browser. It watches the world as it's saved, so new builds show up a few minutes after they're placed, and online players appear as live markers. Players can drop their own markers too, with a command or (on Classic) just by placing a sign.
Filling in the map first
A map only shows land that has been generated, and Minecraft only generates land when someone walks near it. So a brand-new world looks like a small island in a sea of nothing. A tool called Chunky fixes that by generating terrain ahead of time. We had it fill a 6,000 × 6,000-block square around each world's spawn:
| World | Chunks | Time | Size on disk |
|---|---|---|---|
| Survival | 142,129 | ~15 minutes | ~1.0 GB |
| Peaceful | 142,129 | ~15 minutes | ~1.2 GB |
| Classic | 142,129 | ~21 minutes | ~1.3 GB |
A nice side effect: exploring that area doesn't cause lag any more, because the server isn't generating terrain on the fly.
Wait, how big is a Minecraft world?
That raised the obvious question: what would it take to generate the whole world? The answer is "no."
- A world runs 30 million blocks out from the centre in every direction: 60 million blocks across.
- At one block per metre, that's 60,000 km, about one and a half times around the Earth's equator.
- The total area is about 3.6 billion km², around seven times the surface of the actual Earth.
- That's roughly 14 trillion chunks. At the speed we measured, generating all of it would take about 2,200 years and something like 100 petabytes of disk.
Nobody has ever done it. The closest anyone has come is a fan project that archived a 1,000,000 × 1,000,000-block area of the famous anarchy server 2b2t. It took a fleet of bots months, and the archive is still about 15 TB compressed (Tom's Hardware has the story). For scale, each of our worlds is a 6 km square: about the size of a small town. Plenty for a group of friends.
Putting the maps online, without passwords
At first the maps only worked on my home network. I wanted friends to see them from anywhere, but only friends. And I really didn't want to run a username-and-password system.
The answer was a small plugin called Auth, which BlueMap's own docs point to. It uses the game itself as the login:
- You open the map site. It shows a short code, like
/auth ABC1234. - You type that command in the game.
- The site now knows you're that player, and keeps you logged in for about a month.
Only people on the server's whitelist can run the command, so the whitelist is the guest list. There are no passwords to forget, share or leak. Everyone is logged in as their real Minecraft name, and taking someone off the whitelist stops them logging in again.
A small dedicated web server sits in front of everything. It handles the secure connection, checks each visitor's login, and only then passes them through to the maps. The map servers themselves never face the internet directly.
Under the hood
- Maps: BlueMap on each world server, each with its own small built-in web server. Those are only reachable from inside the lab, never from the internet.
- Pre-generation: Chunky, at roughly 150 to 200 chunks a second per world, running on two servers in parallel.
- Front end: a small Debian virtual machine in the lab's DMZ running nginx, with Let's Encrypt certificates that renew automatically. Each map lives under a path (
/classic/,/survival/,/peaceful/) instead of a port number. - Login: nginx's
auth_requestasks the Auth plugin, running on the lobby server, whether each visitor has a valid session before passing them through. No session means a redirect to the code page. The plugin's own port only accepts connections from the front end. - Monitoring: the front end, its certificates and both sites are watched by the lab's monitoring server, with email alerts if a site goes down or a certificate gets close to expiring.