Stop, edit, start: the restart rule
The Minecraft Wiki is plain about it: after changes are made to the file, the server must be restarted for them to take effect. Saving the file while the server runs changes nothing in the game until the next start.
The startup itself rewrites the file. The server keeps the values it understands, drops every comment line, fills in any missing or invalid key with its default, and writes the result back. That is why your own notes after a # sign disappear, and why a value you mistyped quietly turns back into the default.
So make it a habit to stop the server, edit, save and start it again. On a rented server you edit the file through the panel's file manager or over SFTP, and how game server hosting works covers both.
- Changes apply only after a restart
- The server rewrites the file on every start
- Comments are removed when it does
- Missing or invalid keys are reset to their defaults
Keys that only matter when a world is created
level-name is the world folder the server loads. The wiki states that if a directory at that path exists and is a valid world, the server loads it. Only when there is no world there does the server generate one, and that is the only moment the generation keys are read.
So changing level-seed or level-type on a server that already has its world does nothing visible. The same goes for hardcore, which the wiki describes as applying to created worlds, and for initial-enabled-packs and initial-disabled-packs, which apply to data packs on world creation.
To use a different seed, either change level-name to a folder name that does not exist yet, so the server generates a fresh world beside the old one, or stop the server and move the old world folder somewhere safe first. Never delete a world you might want back. To bring in a world made elsewhere, follow our guide to uploading a Minecraft world.
- level-seed: the seed for a world that does not exist yet
- level-type: the generation preset, minecraft:normal by default
- hardcore: applies to worlds created after it is set
- initial-enabled-packs and initial-disabled-packs: read on world creation
gamemode is a default, force-gamemode makes it stick
The wiki describes gamemode as the default game mode, survival unless you change it. A player who has already been on the server keeps the mode they left in, because force-gamemode is false by default. So switching the file to creative gives creative only to players joining for the first time, and your existing players stay in survival.
Set force-gamemode=true and the server switches every player to the default mode when they join. That is the fix when you want the whole server in one mode. Leave it false when you want operators to keep a different mode from everyone else.
For a single player, use the gamemode command, for example gamemode creative Steve, which needs permission level 2. The defaultgamemode command changes the default while the server runs: with force-gamemode on it also switches everyone online, and with it off it only affects players joining for the first time.
- gamemode: the default mode, survival by default
- force-gamemode=true: every player is switched to the default on join
- gamemode <mode> <player>: one player, permission level 2
- defaultgamemode <mode>: changes the default without a restart
Keys that became game rules
If you copied a server.properties from an older guide, some keys in it may no longer exist. In Java 1.21.9 Mojang removed four keys and replaced each with a game rule, which is set in the game with the gamerule command and belongs to the world rather than the file. On 1.21.9 or later, editing the old keys in server.properties has no effect.
The rule names changed once more in Java 1.21.11, when game rules moved to names in snake case. Use the current names below on a current server, typed in the console or in game by an operator, for example gamerule pvp false. Run gamerule with just the name to see the current value.
Two more keys, spawn-animals and spawn-npcs, were removed in Java 1.21.2 without a replacement key in the file.
- pvp became the game rule pvp
- allow-nether became allow_entering_nether_using_portals
- enable-command-block became command_blocks_work
- spawn-monsters became spawn_monsters
- spawn-animals and spawn-npcs: removed in 1.21.2
Typos, values and the file format
The file is plain key=value pairs, one per line. Booleans are true or false. Lines starting with # are comments. The wiki says the server reads the file as UTF-8 first and falls back to ISO-8859-1, and that when it rewrites the file it escapes some characters in values, such as a colon, with a backslash. That is normal and not a fault.
Because invalid keys and values are replaced by defaults, a misspelt key name never produces an error. gamemod=creative is not gamemode, and survivial is not a game mode. If you would rather not hand edit, the Minecraft server.properties generator writes a file with valid keys and values that you can paste in.
Check what the server really loaded
Since the server rewrites server.properties on startup, the file after a restart shows what it accepted. Stop editing for a moment, restart, then open the file again. A value that turned back into its default was not valid, and a key that appeared was missing and has been filled in with its default. If a key you rely on is one of the four that became game rules, set it with the gamerule command instead.
Two defaults explain a lot of confused first days. From Minecraft 26.3, white-list is true by default, so a fresh server turns away anyone not on the whitelist; the can't connect guide covers that and the other join errors. And spawn-protection, which stops players who are not operators from building near spawn, is only written to the file once the first player joins.
- Value back to default: it was invalid
- pvp, allow-nether, spawn-monsters or enable-command-block: use game rules on 1.21.9 and later
- Key added: it was missing and now has its default
- white-list=true on 26.3 and later: add players or switch it off