How to Properly Pre-generate a World? (Chunky)
Terrain generation is the most CPU-intensive process on a Minecraft server. When a player runs into unexplored regions, a single server thread must perform billions of complex calculations in real time: generate a 3D noise grid, determine biomes, place caves, inject ores, and generate structures. If 5 players do this simultaneously in different directions, the server chokes and immediately drops TPS.
Pre-generation solves this problem at its source. We force the machine to do this titanic work beforehand ("dry run") before you let players in. During normal gameplay, the server no longer calculates any math – it simply reads ready, saved bytes from the disk and sends them to the client.
Requirements and Installation
This guide is based on the free tool Chunky. It is available both as a plugin and a modification (mod). It works strictly server-side – players do not need to install it on their end.
- Download the
.jarfile matching your server software from the official Chunky page on Modrinth. - Place the file in the appropriate server directory:
- For Paper / Purpur / Spigot engines: drop it into the
plugins/folder. - For Fabric / Forge / NeoForge engines: drop it into the
mods/folder.
- For Paper / Purpur / Spigot engines: drop it into the
- Restart the server so Chunky can generate its configuration files.
Enter all the commands below strictly from the Console in the hosting panel (omitting the forward slash / at the beginning). The Chunky engine intentionally blocks regular players from executing these commands via in-game chat for security reasons.
Planning and World Size Math (Crucial!)
Before you enter any command, you must understand the law of non-linear world size growth.
Doubling the world radius does not double its file size – it increases it roughly fourfold. Additionally, in newer versions of Minecraft (due to raising the map height limit to y=320 and dense underground caves), region files weigh several times more than before.
Plan your available hosting disk space based on the averaged data below for versions 1.21+:
| Radius (from 0,0) | Physical map dimensions | Estimated disk size | Estimated CPU time |
|---|---|---|---|
| 1,000 blocks | 2k x 2k | ~0.5 GB | ~2 minutes |
| 2,500 blocks | 5k x 5k | ~1.5 GB | ~11 minutes |
| 5,000 blocks (Recommended) | 10k x 10k | ~3 GB | ~45 minutes |
| 7,500 blocks | 15k x 15k | ~10 GB | ~1.5 hours |
| 10,000 blocks | 20k x 20k | ~17 GB | ~3 hours |
You can check the exact size for custom dimensions using the online calculator: onlinemo.de/world. For standard survival servers, the optimal starting point is a radius of 5,000. This provides players with a massive area to explore, and the border can be safely expanded in the future if needed.
Setting a Physical Border
The best practice is to pair Chunky with Minecraft's default world border. This ensures that players cannot physically go beyond the area you generated.
Mathematical trap: The Minecraft engine takes the value in the /worldborder command as the Diameter (from edge to edge). Chunky and people operate using the concept of a Radius (from the center to the edge).
If you want to generate a world with a radius of 5,000 blocks (left -5,000, right +5,000), you must provide the Vanilla border with a value exactly twice as large (10,000).
Enter the following commands sequentially:
worldborder center 0 0
worldborder set 10000
Verify correctness by entering the command: worldborder get. The console should return: The world border is currently 10000 blocks wide.
(Tip: on Forge/Fabric servers, the console may require the full syntax: execute in minecraft:overworld run worldborder set 10000).
Configuring the Chunky Task and Starting
Now we will tell the Chunky engine to read the newly created border and begin the process.
-
Select the target dimension:
chunky world world(Default names in Paper are:
worldfor the Overworld,world_netherfor the Nether, andworld_the_endfor the End. On Forge/Fabric servers, enter e.g.,chunky world minecraft:overworld). -
Command it to fetch coordinates from the border:
chunky worldborder(The console will return: "Set task to center: 0, 0, radius: 5000.0". Make sure the specified radius is exactly half of your Vanilla border).
-
Start the generator:
chunky start
The server will enter maximum load mode. Progress messages expressed in percentages and estimated remaining time will begin to appear in the console. No players are allowed on the server during this time.
Process Management and Log Optimization
During hours of generation, the console will be flooded with thousands of notifications. You can control this using:
chunky quiet 15– changes the console reporting frequency to one message every 15 seconds (the default is 1 second).chunky silent– completely silences console reports (the process continues generating chunks in the background).chunky progress– displays the current percentage status in the console a single time.chunky pause– pauses the generation (useful if you urgently need to join the server).chunky continue– resumes a paused task.chunky cancel– permanently cancels the current generation task.
Troubleshooting
The Server Shut Down with an "Out of Memory" Error
Generating millions of chunk objects in a short time clogs the Garbage Collector in the Java engine. After a few hours of continuous operation, the machine may bloat in RAM and shut down with an out-of-memory error.
This is completely normal and does not mean the map is corrupted.
Chunky saves its progress to the disk in real time. If the server crashes:
- Turn the server back on.
- Enter the command in the console:
chunky continue. - The process will resume exactly from the blocks where it left off before the crash.
To make the server resume work automatically after every restart, go to the files at plugins/Chunky/config.yml and change the continue-on-restart option to true.