How do I change the settings in server.properties?
Which settings are in your Minecraft server's server.properties, what they do and how to change them in the game panel. Also: pvp and game rules.
By Hermie Updated
server.properties holds the main settings of your Minecraft server, such as the difficulty, the number of players and the text in the server list. You edit the file in the game panel under Files; after a restart the new values apply.
How to edit server.properties
- Log in to the game panel, open your server and stop it with Stop.
- Go to Files and click
server.properties. - Change the value after the
=sign. Leave the name in front of it and the=sign in place. - Click Save Content and start your server with Start.
Note
Edit the file while the server is stopped. A running server can overwrite your changes when it stops.
Common settings
| Setting | Default | What it does |
|---|---|---|
motd |
A Minecraft Server |
Text under your server name in the server list |
max-players |
20 |
How many players can be online at once |
difficulty |
easy |
peaceful, easy, normal or hard |
gamemode |
survival |
survival, creative, adventure or spectator for new players |
hardcore |
false |
Hardcore mode; see hardcore |
white-list |
true since 26.3 |
Only players on the whitelist can join |
spawn-protection |
16 |
Area around spawn where only OPs can build; 0 turns it off |
view-distance |
10 |
How far players can see, in chunks |
simulation-distance |
10 |
How far away mobs, crops and redstone work, in chunks |
level-seed |
empty | Seed for a new world; see set a seed |
level-name |
world |
Name of the world folder that is loaded |
allow-flight |
false |
Allow flying in survival, needed for some mods and plugins |
online-mode |
true |
Checks that players have a real Minecraft account |
online-mode
Do not set online-mode to false, except behind a Velocity or BungeeCord proxy that handles it. Otherwise anyone can join with any name, including an OP's.
PvP, Nether and command blocks
Since Minecraft 1.21.9, pvp, allow-nether, spawn-monsters and enable-command-block are no longer in server.properties. They are now game rules, which you set in the console without a restart. On 1.21.11 and newer you use:
| What | Command in the console |
|---|---|
| PvP off | gamerule pvp false |
| Nether off | gamerule allow_entering_nether_using_portals false |
| No monsters | gamerule spawn_monsters false |
| Command blocks | gamerule command_blocks_work true |
On 1.21.8 and older these four are still in server.properties.
Check
After startup, check that the change works, for example the new motd in your server list. Is the value back to what it was after a restart? Then the server was still running when you saved, or the value is invalid. The server resets an invalid value to the default.
Did this article help you?
Related articles
How do I install mods on my Minecraft server?
How to install mods on your Minecraft server: switch your server to Fabric in the client portal, add Fabric API and upload your mods.
How do I install a modpack on my Minecraft server?
How to put a modpack on your Minecraft server with the modpack installer in the game panel: CurseForge, Modrinth, Feed The Beast and more.
How do I change the version of my Minecraft server?
How to switch Minecraft version or server type through the Reinstall tab in the client portal. Your world and plugins stay in place.
Why can't I connect to my Minecraft server?
Cannot connect to your Minecraft server? Go through the most common causes: server off, wrong address, different version, whitelist or mods.