server.properties Explained: Every Setting That Matters
server.properties is a plain text file in your Minecraft server folder that controls the basics: game mode, difficulty, player limit, view distance, who can join and more. Each line is key=value. Edit the file, save it and restart the server. This guide explains the settings that matter and the defaults for Java Edition 1.21 and newer.
If you are still setting up, start with how to make a Minecraft server for friends. If you are choosing server software, read Paper vs Purpur vs Fabric first.
How server.properties works
The server writes server.properties the first time it starts. After that it reads the file on every start. Lines that begin with # are comments. A few rules save a lot of confusion:
- Edit the file with the server stopped, or restart right after saving. The server only reads it at startup.
- Use
trueandfalsein lowercase. Numbers have no quotes. - Keep the key names exactly as written. A wrong key is ignored, and a bad value falls back to the default.
- Back up the file before big changes. Copy it to
server.properties.bak.
On Tree Host, open the Files tab and click server.properties to edit it in your browser, or use the Game settings card in the Settings tab for the common options. See the server guide for both.
1. Gameplay settings
These decide how the game feels. Most are safe to change at any time, but remember the restart.
| Setting | Default | What it does |
|---|---|---|
gamemode | survival | The mode new players start in: survival, creative, adventure or spectator. |
force-gamemode | false | If true, players get the default gamemode every time they join, not the one they left in. |
difficulty | easy | peaceful, easy, normal or hard. Most survival servers use normal or hard. |
hardcore | false | If true, players who die are put in spectator mode, and difficulty is locked to hard. |
pvp | true | Whether players can hurt each other. Set false for a peaceful co-op server. |
allow-nether | true | Turns the Nether on or off. |
allow-flight | false | Lets players fly in survival without being kicked. Needed for some mods and plugins. |
spawn-monsters | true | Whether hostile mobs spawn. |
generate-structures | true | Villages, strongholds and other structures in new chunks. |
enable-command-block | false | Lets command blocks run. Turn it on only if you use them. |
2. World settings
| Setting | Default | What it does |
|---|---|---|
level-name | world | The name of the world folder. Changing it makes the server create a new world, or load another folder with that name. |
level-seed | empty | The seed for a new world. Leave empty for a random one. |
level-type | minecraft\:normal | minecraft\:normal, minecraft\:flat, minecraft\:large_biomes or minecraft\:amplified. |
max-world-size | 29999984 | The world border radius in blocks, at most 29999984. A smaller number keeps the world file small. |
A seed only applies to chunks that do not exist yet. If you set level-seed on a server with an old world, nothing changes. To use a new seed you need a new world. Back up the old one first, as in how to change the Minecraft version of your server.
3. Players and access
| Setting | Default | What it does |
|---|---|---|
max-players | 20 | How many players can be online at once. This does not raise your RAM or CPU, so a bigger number can mean more lag. |
white-list | false | If true, only players on the whitelist can join. |
enforce-whitelist | false | If true, players who are not on the whitelist are kicked when the whitelist reloads. |
online-mode | true | Checks every player's account with Mojang. Leave it on. |
op-permission-level | 4 | The op level new operators get, from 1 to 4. |
player-idle-timeout | 0 | Minutes before an idle player is kicked. 0 means never. |
spawn-protection | 16 | Radius around spawn where non-operators cannot build. 0 turns it off. |
The whitelist has its own guide: how to whitelist a Minecraft server. The op levels are explained in how to make yourself op.
4. Performance settings
These are the settings that change how hard the server works. If your server lags, look here first.
| Setting | Default | What it does |
|---|---|---|
view-distance | 10 | How many chunks around each player the server sends to the player. Lower it to save CPU, memory and bandwidth. |
simulation-distance | 10 | How many chunks around each player are ticked: mobs move, crops grow, redstone runs. Lowering it helps lag the most. |
entity-broadcast-range-percentage | 100 | How far away entities are sent to players, as a percentage. Lower values can reduce network load. |
network-compression-threshold | 256 | Packets larger than this many bytes are compressed. Leave it, unless a proxy tells you otherwise. |
max-tick-time | 60000 | How many milliseconds one tick can take before the watchdog stops a frozen server. Slow machines sometimes need more, but a frozen server is still a problem. |
sync-chunk-writes | true | Writes chunks to disk right away. Safer for your world, slightly slower. |
A good start for a small survival server is view-distance=8 and simulation-distance=6. Players will notice a closer horizon before they notice slower crops. The RAM guide covers how memory and these two numbers work together.
Paper and Purpur have more performance options in their own config files, which is one more reason to pick one of them for a survival server.
5. Network and the server list
| Setting | Default | What it does |
|---|---|---|
motd | A Minecraft Server | The text shown under your server name in the multiplayer list. Up to two lines. Use \n for a line break and \u00A7 for colour codes. |
server-port | 25565 | The port the server listens on. Your host usually sets this for you. |
server-ip | empty | Leave empty. Only set it if your machine has several network addresses. |
enable-status | true | Whether the server shows in the server list with its player count. |
hide-online-players | false | If true, the player list in the server list stays empty. |
enable-query | false | Turns on GameSpy4 query, used by some status websites. |
enable-rcon | false | Remote console. Leave off unless you know you need it, and always set a strong rcon.password. |
On Tree Host the port comes from your plan, so you do not change server-port. Leave it as it is.
A sample file for a small friends server
Here are the lines a small survival server for friends might change from the defaults. Everything else can stay as the server generated it.
motd=Our survival worldmax-players=10difficulty=normalwhite-list=trueenforce-whitelist=trueview-distance=8simulation-distance=6spawn-protection=0
spawn-protection=0 is handy on a small server where you trust everyone, because friends can build near spawn without being op. On a public server, keep the default so strangers cannot dig up your spawn.
How to change a setting step by step
- Stop the server, or be ready to restart it straight after saving.
- Open
server.propertiesin the file editor, or over SFTP if you prefer a desktop app (see Connect with FileZilla). - Change the value on the line you want. Keep the
key=valueshape with no spaces around the equals sign. - Save the file.
- Start or restart the server and read the console for warnings.
- Join and check that the change worked, for example the new MOTD in the server list.
6. Settings you should change on day one
- Set
motdto something that tells people what your server is. - Set
max-playersto the number you actually expect, not 100. - Set
difficultyandpvpthe way your group wants to play. - Set
white-list=trueif the server is only for friends. - Drop
view-distanceto 8 if you have more than a handful of players. - Leave
online-mode=true.
7. Mistakes to avoid
- Setting
online-mode=falseto let friends with cracked accounts in. Anyone can then join under any name, including an operator's name. If you use a proxy such as Velocity, the proxy does the check, but the server must not be reachable except through the proxy. - Editing the file while the server runs. The server can overwrite your edit when it stops.
- Raising
max-playersto fix a full server. It does not add RAM or CPU. - Changing
level-nameand thinking the world is lost. The old folder is still there. Change the name back and restart. - Copying a file from an old version. Some keys are removed or renamed between versions. Start from the file your current version generated.
What about Bedrock?
Bedrock Dedicated Server uses a different file, also called server.properties, with different keys such as server-name, level-name, gamemode, difficulty, max-players and server-port (19132 by default). Most of the ideas are the same, but the names and some values are not, so do not paste a Java file into a Bedrock server.
Tree Host lets you edit server.properties in your browser and restart in one click, with a shared demo server to try first. See the plans, or try the demo.