How the file works

  • It sits in the folder the server is started from and is created with default values on the first start.
  • Each line is key=value. Lines starting with # are comments.
  • On every start the server rewrites the file: missing settings are added with their defaults, invalid values are replaced by the default, and your comments are removed.
  • The server writes some characters with a backslash, so level-type=minecraft:normal appears as minecraft\:normal. Both mean the same.

Settings most servers change first

SettingDefault (Java Edition 26.3)Why you might change it
motdA Minecraft ServerThe message in the server list. See how to create a MOTD.
difficultyeasyMost survival servers use normal or hard.
gamemodesurvivalThe mode new players start in.
max-players20Match it to what your hardware handles.
white-listtrueOn by default since 26.3. Turn it off for a public server.
view-distance10Lower it if the server struggles with many players.
simulation-distance10How far from players mobs, crops and redstone keep working.
spawn-protection16Set 0 if players should be able to build at spawn.

Leave online-mode=true unless a proxy in front of the server checks accounts. Without it, anyone can join with any name. server.properties settings to check before you open a server covers the security side.

Settings that are now game rules

Older guides mention settings that no longer exist in server.properties. Since Java Edition 1.21.9 they are game rules, changed in game or from the console:

Old settingGame rule nowExample
pvppvp/gamerule pvp false
allow-netherallow_entering_nether_using_portals/gamerule allow_entering_nether_using_portals false
enable-command-blockcommand_blocks_work/gamerule command_blocks_work true
spawn-monstersspawn_monsters/gamerule spawn_monsters false

Game rules are saved in the world, not in server.properties. The names use underscores since Java Edition 1.21.11. The old spawn-animals and spawn-npcs settings were removed in 1.21.2.

World settings only apply to new worlds

level-seed, level-type, generate-structures and generator-settings are only used when the world is generated. To use new values, point level-name at a new folder name, or move the old world folder out of the way after making a backup.

Paper, Spigot and Fabric servers

They read the same server.properties. Their extra options live in their own configuration files, so a setting you can’t find here is probably in one of those.

Every vanilla setting, with its default and allowed values, is listed in the server.properties settings reference.