# How to Set a World Border on Your Minecraft Server (/docs/minecraft/add-world-border)



A world border restricts how far players can travel in your world. This is useful for keeping players in a defined area, reducing server load from chunk generation, and creating unique gameplay experiences.

Setting a World Border [#setting-a-world-border]

<div className="fd-steps">
  <div className="fd-step">
    Open the Console [#1-open-the-console]

    Access the [XGamingServer panel](https://panel.xgamingserver.com) and go to `Console`.
  </div>

  <div className="fd-step">
    Set the border center [#2-set-the-border-center]

    ```
    worldborder center 0 0
    ```

    Replace `0 0` with the X and Z coordinates for the center of your border.
  </div>

  <div className="fd-step">
    Set the border size [#3-set-the-border-size]

    ```
    worldborder set 10000
    ```

    This sets the border diameter to 10,000 blocks (5,000 blocks from center in each direction).
  </div>
</div>

World Border Commands [#world-border-commands]

| Command                                  | Description                            |
| ---------------------------------------- | -------------------------------------- |
| `/worldborder center [x] [z]`            | Set the center point                   |
| `/worldborder set [diameter]`            | Set the border size instantly          |
| `/worldborder set [diameter] [seconds]`  | Gradually change size over time        |
| `/worldborder add [blocks] [seconds]`    | Expand the border                      |
| `/worldborder warning distance [blocks]` | Red warning distance from edge         |
| `/worldborder warning time [seconds]`    | Warning time when border is shrinking  |
| `/worldborder damage amount [dps]`       | Damage per block outside border        |
| `/worldborder damage buffer [blocks]`    | Safe zone outside border before damage |
| `/worldborder get`                       | Show current border size               |

> 💡 **Tip:** After setting a border, use [Chunky](/docs/minecraft/pregenerate-chunks) to pre-generate all chunks within the border. This eliminates lag from terrain generation during gameplay.

> 📝 **Note:** The world border is per-world. If you have a Nether or End dimension, you may want to set borders there too (Nether border should be 1/8 the Overworld size).

Shrinking Border (Hunger Games Style) [#shrinking-border-hunger-games-style]

To gradually shrink the border for events:

```
worldborder set 100 3600
```

This shrinks the border to 100 blocks over 3,600 seconds (1 hour).

See also: [Pre-generate Chunks](/docs/minecraft/pregenerate-chunks) | [Performance Guide](/docs/minecraft/optimize-server)

If you need help, join our [Discord](https://discord.xgamingserver.com/).
