How to pregenerate your Minecraft world with Chunky
Generating new chunks is one of the heaviest jobs a server does. When several players explore new terrain at the same time, the server can lag. The fix is to generate the world in advance.
Installation
Install the Chunky plugin in the Plugins tab (Paper, Purpur) and restart the server. It is also available as a mod for Fabric and NeoForge.
Generating
Type in the console:
chunky radius 3000
chunky start
This generates a 6000 x 6000 block square around the centre of the world. You can follow the progress in the console. Pause it with chunky pause and resume with chunky continue.
It is best to run it when nobody is online, for example at night.
World border
So that players do not walk past the generated area, set a world border with the same size:
worldborder center 0 0
worldborder set 6000
Frequently asked questions
What radius should I pick?
For a server with friends, 2000-3000 is enough. A bigger world takes more disk space, and a 10000 block radius is already several GB.
Will pregenerating make backups bigger?
Yes, a bigger world means a bigger backup that takes longer to make. Automatic daily backups do not use your plan's disk space though, because they are kept on a separate server (more about backups).
Pepe