Tree Host

server.properties Explained: Every Setting That Matters

Updated · by the Tree Host team

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:

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.

SettingDefaultWhat it does
gamemodesurvivalThe mode new players start in: survival, creative, adventure or spectator.
force-gamemodefalseIf true, players get the default gamemode every time they join, not the one they left in.
difficultyeasypeaceful, easy, normal or hard. Most survival servers use normal or hard.
hardcorefalseIf true, players who die are put in spectator mode, and difficulty is locked to hard.
pvptrueWhether players can hurt each other. Set false for a peaceful co-op server.
allow-nethertrueTurns the Nether on or off.
allow-flightfalseLets players fly in survival without being kicked. Needed for some mods and plugins.
spawn-monsterstrueWhether hostile mobs spawn.
generate-structurestrueVillages, strongholds and other structures in new chunks.
enable-command-blockfalseLets command blocks run. Turn it on only if you use them.

2. World settings

SettingDefaultWhat it does
level-nameworldThe name of the world folder. Changing it makes the server create a new world, or load another folder with that name.
level-seedemptyThe seed for a new world. Leave empty for a random one.
level-typeminecraft\:normalminecraft\:normal, minecraft\:flat, minecraft\:large_biomes or minecraft\:amplified.
max-world-size29999984The 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

SettingDefaultWhat it does
max-players20How many players can be online at once. This does not raise your RAM or CPU, so a bigger number can mean more lag.
white-listfalseIf true, only players on the whitelist can join.
enforce-whitelistfalseIf true, players who are not on the whitelist are kicked when the whitelist reloads.
online-modetrueChecks every player's account with Mojang. Leave it on.
op-permission-level4The op level new operators get, from 1 to 4.
player-idle-timeout0Minutes before an idle player is kicked. 0 means never.
spawn-protection16Radius 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.

SettingDefaultWhat it does
view-distance10How many chunks around each player the server sends to the player. Lower it to save CPU, memory and bandwidth.
simulation-distance10How many chunks around each player are ticked: mobs move, crops grow, redstone runs. Lowering it helps lag the most.
entity-broadcast-range-percentage100How far away entities are sent to players, as a percentage. Lower values can reduce network load.
network-compression-threshold256Packets larger than this many bytes are compressed. Leave it, unless a proxy tells you otherwise.
max-tick-time60000How 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-writestrueWrites 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

SettingDefaultWhat it does
motdA Minecraft ServerThe 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-port25565The port the server listens on. Your host usually sets this for you.
server-ipemptyLeave empty. Only set it if your machine has several network addresses.
enable-statustrueWhether the server shows in the server list with its player count.
hide-online-playersfalseIf true, the player list in the server list stays empty.
enable-queryfalseTurns on GameSpy4 query, used by some status websites.
enable-rconfalseRemote 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.

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

6. Settings you should change on day one

7. Mistakes to avoid

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.

More guides

← More guides