How do I modify server.properties without breaking the server?
Stop the server, modify the useful keys and check the regenerated values at startup. Some values are rewritten at startup if their format is invalid.
server.properties controls, among other things, the server port, difficulty, whitelist and view and simulation distances. Some values are rewritten at startup if their format is invalid.
Step-by-step procedure
-
Stop cleanly
Send stop in console and wait for offline state before opening the file.
-
Create a backup
Duplicate server.properties before changing multiple parameters.
-
Respect the format
Keep only one key per line, with no spaces around =. Use true or false in lowercase.
-
Restart and check
Start the server then check the file and the console to confirm that the values were accepted.
Example
motd=Serveur ACLClouds
difficulty=normal
white-list=true
view-distance=8
Manage the whitelist from the console
whitelist on
whitelist add Steve
whitelist list
Editing from the Options page
For everyday settings, the "Options" page in the server menu saves you from editing the file by hand. It reads server.properties and groups the keys into sections: Players, World, Generation, Security and network. After "Save", the value is written immediately, but Minecraft only reads it at the next start: restart the server.
If the page says it cannot read server.properties, the server has never started: the file is created on the first launch.
The most used keys
Values are written in English and in lower case, as in the original file.
- motd: the text shown in the server list. For a colour, write \u00A7 followed by the code, for example \u00A7a for green.
- difficulty: peaceful, easy, normal or hard.
- white-list and enforce-whitelist: only accept players added with whitelist add.
- online-mode: leave it at true. With false ("Cracked mode" in "Options"), the server no longer checks accounts and anyone can join under an administrator’s name.
- level-name: the folder of the loaded world. A name that matches no folder creates a new empty world.
- spawn-protection: radius in blocks around spawn where only operators can build; 0 turns it off.
Keys managed by the panel
The panel rewrites server-ip, server-port and query.port at every start with the address assigned to your server. A value changed by hand is replaced at the next launch: do not edit these keys.
Frequently asked questions
Why does my change disappear after a restart?
Three common causes: the key is one the panel rewrites, the value is invalid and Minecraft replaces it with its default (difficulty=moyen, for example), or the key name has a typo and Minecraft ignores it. Compare with the official key list for your version.
The server no longer starts after a change, what should I do?
Put back the copy of server.properties made before the change and restart. If the server starts again, reapply the changes one by one to find the faulty line. Check level-name first: a world saved by a newer Minecraft version can prevent startup.
Why do colours or accented letters in the motd display incorrectly?
Depending on the version, the file may not be read as UTF-8: a § or an accented letter typed by hand then becomes unreadable. Write \u00A7 instead of §, or use the "Options" page, which does this conversion for you.
Why do players keep their game mode despite gamemode=creative?
gamemode only applies to players joining for the first time. To enforce it at every login, add force-gamemode=true, or change one player with gamemode creative Steve in the console.