When players fly with an elytra to a corner of the map nobody has visited, the server suddenly slows down: blocks load late and mobs stutter. The reason is simple. Minecraft generates that terrain from scratch at that very moment. Terrain generation is one of the heaviest jobs a server does, and when several players head into new areas at once the ticks per second (TPS) drop. The fix is to generate the terrain before players get there and to decide where the world ends.

Set a world border first

Pregenerating only makes sense for a world with an edge; you can't pregenerate an endless world. Minecraft's own world border commands handle this, with no plugin needed:

  • worldborder center 0 0: moves the border's centre to the middle of the map. If your spawn is somewhere else, use its coordinates.
  • worldborder set 10000: turns the border into a square 10,000 blocks on each side.

The number here is not a radius but the width from one edge to the other. With 10,000, players can go 5,000 blocks in every direction from the centre. That difference matters in the next step.

Which size should you choose?

For a small group of friends, a width of 5,000 to 6,000 blocks is usually plenty. For a larger community that loves exploring, something between 10,000 and 20,000 is reasonable. The bigger the border, the longer generation takes and the more disk the world uses: a pregenerated world 10,000 blocks wide can reach several gigabytes. Every server comes with 5 GB of free disk space and each GB above it is billed monthly, so picking the size to match your player count is both faster and cheaper.

Pregenerating terrain with Chunky

Chunky is a plugin that generates terrain in the background, before players reach an area; there are mod versions for Fabric and Forge as well. Install it from the store in the panel, restart the server, then run these commands in order in the console:

  1. chunky world world: picks the world to generate. On most servers the main world is called world.
  2. chunky worldborder: takes the centre and radius from the world border you just set. If you didn't set a border, you can choose them yourself with chunky center 0 0 and chunky radius 5000; the number you type here is a radius.
  3. chunky start: starts generating.

Progress appears in the console as a percentage with an estimated time left. chunky pause pauses the task and chunky continue resumes it from where it stopped. If the server restarts for any reason, the work done so far isn't lost; type chunky continue once it's back up. To drop the task entirely, use chunky cancel.

You can repeat the same steps for the Nether and the End; on Paper-based servers these worlds are usually called world_nether and world_the_end.

The server has to stay online while it runs

Pregeneration can take hours, and the server must be running the whole time. On our platform idle sleep is on by default for new servers: if a server goes 15 minutes without any players it falls asleep, and generation stops with it. On a paid package you can switch this setting off in Settings for the duration and turn it back on afterwards. On free servers the switch is locked, so split the work into times when players are online or keep the border small.

Because generation keeps the processor busy, it's best to start it when few players are online. If your server is billed hourly, keep in mind the job may take several hours.

How to tell it worked

Once generation is finished, wherever players go inside the border the terrain is read from disk instead of being generated. On Paper and Purpur the tps command shows the tick average for the last 1, 5 and 15 minutes; while flying into new areas it should stay close to 20. We cover the other causes of lag separately in our TPS and lag guide.

Common mistakes

  • Mixing up radius and width. The world border wants a width, Chunky wants a radius. worldborder set 10000 and chunky radius 5000 describe the same area.
  • Generating without a border. As long as players can leave the generated area, the same slowdown starts again beyond it.
  • Forgetting idle sleep. Generation started on a night with no players stops 15 minutes later, when the server falls asleep.
  • Skipping a backup before a big job. Generation only adds to the world, but choosing the wrong world or filling the disk can still cause trouble. Taking a manual backup from the panel before you start takes seconds.