What is server.properties?

server.properties holds the settings of a Minecraft Java Edition server: the game mode, difficulty, how many players can join, the port, the world name and seed, and many more. It sits in the server folder next to the server jar. The server creates it with default values the first time it starts and reads it on every start after that.

How to use it

  1. Pick the version your server runs. Each version gets exactly the settings it reads, from 1.16 up to the newest release.
  2. Change what you need. Every setting starts at the value a fresh server writes, so only touch what you want different.
  3. Download the file, or copy it, and put it in your server folder in place of the old one. Then start or restart the server.

Settings that don't add up, like RCON turned on without a password or two services on one port, show a warning above the file. Everything happens in your browser, so passwords you enter aren't sent anywhere.

Settings people change most

Setting Default What it does
motd A Minecraft Server The text under the server name in the multiplayer list.
gamemode survival The game mode players start in: survival, creative, adventure or spectator.
difficulty easy Peaceful, easy, normal or hard.
max-players 20 How many players can be online at once.
white-list true since 26.3 Only players on the whitelist can join.
online-mode true Checks that every player owns the game. With false, anyone can join under any name.
view-distance 10 How many chunks around each player the server sends. Lower it when the server lags.
simulation-distance 10 How far from players mobs move and crops grow.
spawn-protection 16 The area around spawn where only operators can build. 0 turns it off.
level-seed empty The seed of a new world. Empty gives a random one. It only matters before the world is first generated.

Changes in recent versions

  • 1.21.9 moved pvp, allow-nether, spawn-monsters and enable-command-block into game rules, so they are gone from the file. On those versions, type a command such as /gamerule pvp false in the game. Since 1.21.11 the other three rules are called allow_entering_nether_using_portals, spawn_monsters and command_blocks_work.
  • 26.3 turned the whitelist on for new servers. Nobody can join until you add them with /whitelist add <name> or set white-list to false.
  • 1.21.2 removed spawn-animals and spawn-npcs.

Tips

The server rewrites server.properties every time it starts. It puts the keys in its own order, drops comments and adds missing settings with their defaults, so edit the file while the server is stopped.

Values look a little odd at times: minecraft:normal is written as minecraft\:normal, and the § of color codes in the MOTD becomes §. That is how Java stores them, and every version reads them back correctly, including versions before 1.20, which don't read the file as UTF-8.