Offer Why us? How it works?
Guide

Minecraft server.properties Explained: Key Settings

server.properties is the main settings file of a Minecraft Java server: it decides who can join, how many players fit, the difficulty, whether PvP is on and how far players can see. We explain the key options with their default values and show how to change them without editing the file by hand.

Updated: 8 min read
Table of contents
  1. What is server.properties and where is it?
  2. The key server.properties options
  3. How do you control who can join?
  4. How do you set up the world: name, seed and map type?
  5. Which options affect performance and lag?
  6. Which options can't you change on a host?
  7. How do you add a server resource pack?
  8. FAQ
  9. Where is the server.properties file?
  10. Why don't my server.properties changes work?
  11. How do you turn off PvP on a Minecraft server?
  12. How do you change the number of player slots?
  13. Will changing level-seed change my world?

What is server.properties and where is it?

server.properties is a text file in the main folder of a Minecraft Java server, where every line looks like option=value. The server creates it on the first start and reads it on every start.

Worth knowing before you begin:

  • Changes take effect after a restart. The server only reads the file on startup, so restart it after editing.
  • Edit with the server stopped, or through the panel. A running server saves this file itself (e.g. after some commands), so manual edits made in the meantime can get overwritten.
  • Values go without quotes and without spaces around =, e.g. white-list=true.
  • This is the Java Edition file. Other editions use their own settings with different options.

On Spot.gg the most common options are under "Configuration" → "Most popular", as fields with descriptions (e.g. sliders for view distance). Everything else is in the "server.properties" tab next to it – with an option search and a "Save changes" button at the bottom. After saving a change that needs a restart, a "Restart now" button appears under the field. You can also open the file in the built-in editor in the "Files" tab.

The key server.properties options

The options people change most are online-mode, max-players, white-list, difficulty, gamemode, pvp, view-distance and motd. The table shows the default values of a Vanilla server.

Option Default What it does
online-mode true true – only players with a Microsoft account that owns the game; false – any username (offline mode)
max-players 20 How many players can be online at once
white-list false Turns on the whitelist – only listed players and operators can join
enforce-whitelist false Kicks players who aren't listed when the whitelist is turned on or reloaded
motd A Minecraft Server The server description in the in-game server list
gamemode survival Game mode for new players: survival, creative, adventure, spectator
force-gamemode false Puts players into the gamemode mode on every join
difficulty easy Difficulty: peaceful, easy, normal, hard
hardcore false Hardcore mode: difficulty "hard", players become spectators after death
pvp true Whether players can damage each other – up to 1.21.8 only; since 1.21.9 it's the pvp gamerule
spawn-protection 16 Spawn protection radius in blocks (0 turns it off); doesn't apply to operators
allow-nether true Whether players can enter the Nether
allow-flight false Whether the server allows flying (mods, plugins) – with false it may kick players for "flying"
enable-command-block false Whether command blocks work – up to 1.21.8 only; since 1.21.9 the command_blocks_work gamerule
view-distance 10 View distance in chunks
simulation-distance 10 Distance in chunks where the world is "alive": mobs, crops, redstone
level-name world Name of the world folder
level-seed empty Seed for a new world; empty = random
op-permission-level 4 Operator permission level (1–4)
player-idle-timeout 0 Minutes of inactivity before a player is kicked (0 – never)

In newer versions Mojang adds, removes or moves some options to game rules (/gamerule). Since Java 1.21.9, pvp, spawn-monsters and enable-command-block are no longer in server.properties – on 1.21.9 and newer use the gamerules pvp, spawn_monsters and command_blocks_work (on 1.21.9–1.21.10 under the older camelCase names, e.g. spawnMonsters); on 1.21.8 and older the file options still work. If another option is missing from your file, check whether it became a game rule in your version – the full list is in Minecraft gamerules.

How do you control who can join?

Access is decided by online-mode (online or offline mode), white-list (selected players only) and max-players (number of slots). These are the first options worth setting on a new server.

  • online-mode=true – the server checks each player's Microsoft account, so usernames can't be faked. It's the default and the safest setting.
  • online-mode=false – players without a paid account can join too, but anyone can type any username, so a login plugin is a must. Switching modes also changes players' IDs (UUIDs). On Spot.gg, when you change "Who can join", the panel offers to convert player accounts so nobody loses their inventory. Details in Minecraft offline mode server.
  • white-list=true – a friends-only server. The whitelist is easier to manage with commands or in "Console" – see Minecraft server commands.

How do you set up the world: name, seed and map type?

level-name points to the world folder, while level-seed and level-type only apply when a new world is created. Changing the seed doesn't rebuild an existing world.

  • level-name – if a folder with that name exists, the server loads it; if not, it creates a new world. That lets you keep several worlds on one server and switch between them by changing the name.
  • level-seed – the seed, e.g. copied from a seed website. Check the current seed with the seed command.
  • level-type – map type, e.g. minecraft:normal (default), minecraft:flat (superflat), minecraft:large_biomes, minecraft:amplified (very tall mountains, heavy on the server).
  • generate-structures – whether villages, temples and other structures generate in new parts of the world.

On Spot.gg, under "Configuration" → "Most popular" → "World", entering a new seed makes the panel point out that it won't change the current world and offer "Create a new world" – the server creates a world under a new name and the old one stays on disk. It's a gentler option than deleting the world.

Which options affect performance and lag?

Mostly view-distance and simulation-distance – the higher they are, the more chunks the server has to load and simulate for every player. Lowering them is the simplest way to reduce CPU load.

Option What it affects Tip
view-distance How much terrain around a player the server sends to the game Usually 8 for modpacks, around 10 for light servers
simulation-distance Where mobs, crops and redstone are active A value higher than view-distance does nothing
max-tick-time After how many ms of a stuck tick the server shuts itself down (-1 – never) Don't lower it unless you know why
pause-when-empty-seconds After how many seconds without players the server pauses the world (0 – off) Available in newer versions
network-compression-threshold Packet size above which packets are compressed Leave the default

On Spot.gg the "Performance" section in "Most popular" has "View distance" and "Simulation distance" sliders with a conversion to blocks and a load rating ("Light load", "Medium load", "Heavy load"). At high distances the panel warns that generating new terrain puts heavy load on the CPU and recommends pre-generating the world beforehand, e.g. with the Chunky add-on, outside play hours.

Which options can't you change on a host?

On a host, server-port and server-ip are set by the system, because they decide whether players can connect at all. On Spot.gg these fields are marked "Locked" with the hint "Set automatically by Spot.gg".

Locked options: server-port, server-ip, query.port and enable-query. On servers running a ready-made modpack, max-tick-time and allow-flight are locked too, because packs need specific values (e.g. flying for jetpack mods). The server's address and port are in the "Network" tab, and players only enter the address, without a port.

A word on RCON (enable-rcon, rcon.password, rcon.port): it's remote console access, but the protocol doesn't encrypt anything, including the password. On Spot.gg the console is in the panel, so you usually don't need RCON.

How do you add a server resource pack?

Put a direct link to the pack's .zip file in resource-pack, and use require-resource-pack to decide whether players must accept it. The game downloads the pack when a player joins.

  • resource-pack – a direct link to the .zip file (not a page with a download button),
  • resource-pack-prompt – the text players see in the download prompt,
  • require-resource-pack=true – a player who declines the pack gets disconnected.

A resource pack only changes how things look and sound for players. For new blocks and mechanics you need mods – see how to make a modded Minecraft server.

FAQ

Where is the server.properties file?

In the server's main folder, next to the server .jar and the world folder. On Spot.gg open it under "Configuration" → "server.properties" or in the "Files" tab.

Why don't my server.properties changes work?

Usually the server wasn't restarted, or the file was edited while the server was running and the server then overwrote the changes. Save the changes, restart the server and check whether the value stuck.

How do you turn off PvP on a Minecraft server?

On Minecraft 1.21.9 and newer type gamerule pvp false in the server console – no restart needed, the pvp line in server.properties no longer has any effect. On 1.21.8 and older set pvp=false and restart the server. Either way players won't be able to damage each other. For PvP only in certain areas you need a plugin, e.g. a land-claim plugin.

How do you change the number of player slots?

Change max-players. On Spot.gg use the "Player slots" field under "Configuration" → "Most popular". Keep in mind that more slots don't give the server more power – with many players you may need more RAM.

Will changing level-seed change my world?

No. The seed only applies when a new world is created. To play on a new seed, also change level-name to a new name – the server creates a new world and the old one stays in its folder.

Other guides