Where the file is
server.properties sits in the server's working directory, the folder the server was started from. The server regenerates the file on startup, keeping the values you set and filling in anything missing or invalid with defaults. After you change a value, restart the server so it takes effect.
The settings a group of friends actually touches
| Property | Default | What it does |
|---|---|---|
difficulty | easy | peaceful, easy, normal or hard. Affects mob damage and hunger and poison effects. |
gamemode | survival | Default mode: survival, creative, adventure or spectator. |
force-gamemode | false | When true, players join in the default mode instead of the one they left in. |
hardcore | false | Hardcore mode, applied to newly created worlds. |
max-players | 20 | Most players online at once. |
level-name | world | The world's name and its folder. |
level-seed | blank | Seed for generated worlds. A random seed is used if blank. |
spawn-protection | 16 | Side length of the protected spawn square. 0 switches it off. |
allow-flight | false | Lets players fly in survival. It only matters with a fly mod. |
motd | A Minecraft Server | The line shown under the server name in the multiplayer list. |
Changing difficulty
For a first survival world with friends, normal is the usual middle ground; easy is the default and hard is there when the group wants more bite. Change the line, save, restart:
difficulty=normal
gamemode=survival
Hardcore only applies to new worlds
The hardcore property enables hardcore mode on newly created worlds. Setting it on a world you have already been playing in is not the way to convert it; if you want a hardcore run, start a fresh world. See how worlds are named and stored for how to point the server at a new one.
Seed and world name
level-seed decides the terrain of a world that is being generated. Leave it blank for a random seed or type a seed your group has agreed on. It does nothing to a world that already exists, because that world's terrain is already saved. level-name doubles as the folder name, which means changing it makes the server look for (or create) a different world folder, not rename your old one.
Player cap and spawn protection
max-players is the number of players online at once; the default is 20. For a small group, set it near the real number of friends so a stray public listing cannot fill the server. Keep in mind that operators with bypassesPlayerLimit can still join a full server, and they count toward the limit. If you pair it with a whitelist, strangers cannot join at all.
spawn-protection is the side length of the protected square around the world spawn. The default is 16, and 0 switches it off. If your friends build near spawn and cannot place blocks, check this setting first.
Performance settings: view distance and simulation distance
Two properties trade scenery for server load. view-distance is how many chunks of world data are sent to each player, as a radius from the player. simulation-distance is how many chunks around each player have living entities updated. Both default to 10 and accept 3 to 32. Lowering them is the first thing to try if a busy server stutters; see the memory guide for the other half of that question.
PvP is not in server.properties any more
Older guides tell you to set pvp=false. The wiki notes that pvp is no longer a server.properties key: it was removed in snapshot 25w35a and replaced by the pvp game rule. On a current server, use the game rule instead of editing the file.
A sensible starting block for friends
difficulty=normal
gamemode=survival
max-players=8
white-list=true
spawn-protection=0
motd=Our survival world
Change the numbers to suit your group. Everything here is a normal property with the meaning in the table above.