Minecraft server.properties Explained: The Key Settings
Minecraft server.properties explained: where the file is, how to edit it safely and what to set for gameplay, world, whitelist, network and performance.

Contents
The Minecraft server.properties file is the main configuration file of a Java Edition server: the game mode and difficulty, the world that gets loaded, who may join, the port the server listens on and how much of the world it processes for each player are all set here. It is a plain text file, but one wrong line can lock players out, load an empty world or open the server to anyone.
This guide covers where the file is and how to edit it safely, the most important settings group by group, a table of the keys people change most, MOTD colour codes, an example and the most common mistakes. If you haven't set up your server yet, start with our How to make a Minecraft server guide.
Where the file is and how to edit it
The file doesn't come with the download. The server creates it the first time it starts, in the folder it is started from, which is normally the folder that holds the server jar and eula.txt. On a Linux server, open it over SSH:
cd ~/minecraft-server
nano server.properties
Every line has the form key=value, one setting per line:
difficulty=easy
max-players=20
level-type=minecraft\:normal
- Keys and
true/falsevalues are lower case. Don't leave spaces around the=or at the end of a line. - Lines that start with
#are comments. The server rewrites the file when it starts, so your own comments are not kept. The backslash before a colon (minecraft\:normal) is normal. - An empty value such as
server-ip=means "not set".
Changes need a restart. The server reads the file only when it starts, and it can write the file back while it runs, for example when you switch the whitelist on with a command. Stop the server with stop, edit the file, then start it again; otherwise your change can be overwritten.
Keys depend on the version. Minecraft adds, renames and removes keys between versions. The defaults below are the ones a vanilla server generates. If a key from this guide is missing in your file, trust the file your own server generated.
Gameplay settings
gamemode(defaultsurvival): The mode new players start in:survival,creative,adventureorspectator.force-gamemode(defaultfalse): Withtrue, players are put back into the default game mode every time they join.difficulty(defaulteasy):peaceful,easy,normalorhard.hardcore(defaultfalse): Withtrue, a newly created world is a hardcore world: the difficulty is hard and players who die can only spectate.spawn-protection(default16): The radius around the world spawn in which only operators can build;16protects a 33 x 33 block square.0turns it off. It only applies once the server has at least one operator, which is why new players sometimes "can't break blocks" near spawn.allow-flight(defaultfalse): This doesn't give anyone flight. Withfalse, the server kicks survival players who stay in the air for several seconds. Set it totrueif a plugin or mod lets players fly, or if players are wrongly kicked for flying.pvp: On older versions this key (defaulttrue) decides whether players can hurt each other. On current versions, since 1.21.9, it is a game rule instead:gamerule pvp false.
The same update moved allow-nether, spawn-monsters and enable-command-block to game rules too. If you can't find such a key in your file, type gamerule in the console and press Tab to see the rules of your version. We cover game rules in Minecraft server commands.
World settings
level-name(defaultworld): The name of the world folder. The server loads the folder with this name; if there is none, it generates a new world. To use an uploaded world, put its folder next to the server jar and enter the exact folder name here.level-seed(default empty): The seed for a new world. Empty means a random seed.level-type(defaultminecraft:normal): The world preset, for exampleminecraft:flat,minecraft:large_biomesorminecraft:amplified.generate-structures(defaulttrue): Whether structures such as villages are generated.max-world-size(default29999984): The largest radius, in blocks, that the world border can have. To limit the area players explore, a world border as in our Minecraft server lag guide is usually the better tool.
level-seed, level-type and generate-structures are used when a world is created. Changing them later does not change an existing world.
Players and access
max-players(default20): How many players can be online at the same time.white-list: Withtrue, only players inwhitelist.jsoncan join. Older versions generatefalse; a fresh install of a current version (26.3 and later) generatestrue, so check your own file. You add players withwhitelist add, as shown in the commands guide.enforce-whitelist(defaultfalse): Withtrue, online players who aren't on the list are kicked when the whitelist is turned on or reloaded.online-mode(defaulttrue): The server verifies every joining player against Minecraft's account servers. Keep it on.op-permission-level(default4): The permission level thatopgives. For ranks with finer permissions, use a plugin; see our LuckPerms guide.player-idle-timeout(default0): Minutes after which idle players are kicked.0means never.
Why online-mode=false is unsafe: Nobody's account is checked any more, so anyone can join with any name, including yours, and inherit that player's inventory and operator rights. Player UUIDs also change, so existing inventories and ranks appear lost. The only normal exception is a backend server behind a proxy: there the proxy verifies the accounts and a firewall keeps players from reaching the backend directly, as described in our Minecraft Velocity network guide.
Network settings
server-port(default25565): The TCP port the server listens on. With another port, players have to add it to the address (example.com:25570) unless you create an SRV record; see connecting a domain to a Minecraft server.server-ip(default empty): Leave it empty so the server listens on all addresses of the machine. Set it only if the machine has several IP addresses and the server should use one of them. A domain doesn't belong here.motd(defaultA Minecraft Server): The text under the server name in the multiplayer list; see below.enable-status(defaulttrue): Withfalse, the server looks offline in the server list but still accepts connections.enable-query(defaultfalse): Opens a UDP query service onquery.portthat hands out server information. Turn it on only if a server list or monitoring tool asks for it.enable-rcon(defaultfalse),rcon.port(default25575) andrcon.password: A remote console over TCP. RCON doesn't start without a password.
The port also has to be open in the firewall: sudo ufw allow 25565/tcp on Ubuntu and Debian, or sudo firewall-cmd --permanent --add-port=25565/tcp followed by sudo firewall-cmd --reload on AlmaLinux.
Don't expose RCON. RCON gives full console access, and the protocol sends the password unencrypted. Use a long random password, never open port 25575 to the internet and connect from the server itself or through an SSH tunnel.
Performance settings
view-distance(default10, range 3–32): The radius, in chunks, of the world sent to each player.simulation-distance(default10, range 3–32): The radius in which mobs, crops and redstone are processed.network-compression-threshold(default256): Packets of at least this many bytes are compressed. Leave the default;-1turns compression off, which only makes sense for backend servers behind a proxy on the same machine or private network.max-tick-time(default60000): If a single tick takes longer than this many milliseconds, the watchdog stops the server as crashed.-1turns the watchdog off, but that hides the problem instead of fixing it.sync-chunk-writes(defaulttrue): Writes chunks synchronously so that a crash doesn't corrupt the world. Leave it on.entity-broadcast-range-percentage(default100, range 10–1000): How far away entities are sent to players.50halves the distance and saves bandwidth, but mobs appear later.
A view-distance of 8–10 and a simulation-distance of 6–8 suit most servers. The lag guide linked above explains how to measure whether these values are your bottleneck.
The most-changed keys at a glance
| Key | Default | Recommendation |
|---|---|---|
motd | A Minecraft Server | Your server name and one short line |
max-players | 20 | A number your RAM and CPU can really carry |
difficulty | easy | normal or hard for survival servers |
white-list | false (true from 26.3) | true for friends and private communities |
online-mode | true | Keep true |
server-port | 25565 | Keep it unless several servers share one IP address |
level-name | world | The exact folder name of your world |
view-distance | 10 | 8–10 |
simulation-distance | 10 | 6–8 |
spawn-protection | 16 | 0 if a plugin such as WorldGuard protects spawn |
enable-rcon | false | Keep false unless a tool needs it, and never expose it |
MOTD formatting with colour codes
The MOTD has up to two lines; \n starts the second one. Colours and styles are set with the section sign § followed by one character: §0–§9 and §a–§f for colours, §l bold, §o italic, §n underlined and §r reset. In the file, write the section sign as the escape \u00A7, which works on every version. Current versions also accept a typed § if your editor saves the file as UTF-8.
motd=\u00A7a\u00A7lMy Survival Server\u00A7r\n\u00A77Friends only \u00A7f| \u00A7eJava Edition
This shows a bold green first line and a grey, white and yellow second line. Keep both lines short so they fit in the server list.
Example server.properties excerpt
A sensible starting point for a private survival server. These are the lines worth checking; leave the rest of the file as the server generated it:
motd=\u00A7aMy Survival Server\u00A7r\n\u00A77Friends only
max-players=20
gamemode=survival
difficulty=normal
white-list=true
enforce-whitelist=true
online-mode=true
server-port=25565
server-ip=
level-name=world
view-distance=8
simulation-distance=6
enable-rcon=false
Paper and Bedrock differences
Paper, Spigot and Purpur still read server.properties, and everything above applies. They add their own files on top: bukkit.yml, spigot.yml and, in the config folder, paper-global.yml and paper-world-defaults.yml. Some of them can override a value per world, for example the view and simulation distance in spigot.yml. If a setting seems to have no effect on Paper, look there. Plugins keep their settings in the plugins folder; see How to install Minecraft plugins.
Bedrock Dedicated Server also has a file named server.properties, but with different keys (for example allow-list and port 19132); we cover it in How to make a Minecraft Bedrock server.
Common mistakes
- Editing while the server runs: The change is not applied and can be overwritten. Stop, edit, start.
- A typo in a key or value: The server doesn't warn you clearly. A misspelled key is ignored and the correct key keeps its default; an invalid value such as
view-distance=tenis replaced by the default. After a restart, open the file again and check that your value is still there. - A wrong
level-name: The server finds no folder with that name and generates a new, empty world. Your old world is not deleted: correct the name, mind upper and lower case on Linux, and restart. online-mode=falseon a public server: Anyone can log in as any player. Turn it back on.- Port conflicts: Two servers with the same
server-portcan't run on one IP address; the second one stops withFAILED TO BIND TO PORT. Check what uses the port and give each server its own, as explained in Address already in use:
sudo ss -tlnp | grep 25565
Before larger changes, keep a copy with cp server.properties server.properties.bak.
A Minecraft server at Nodesty
Nodesty Minecraft server hosting plans run in Frankfurt on an AMD Ryzen 9 9950X processor reaching 5.7 GHz, with NVMe storage and DDoS protection. You can get started with Paper, Forge or Fabric in minutes and edit server.properties and every other file with full admin access. Daily backups on game servers are free and kept for 7 days.
Minecraft is a trademark of Mojang AB. Nodesty is not affiliated with or endorsed by Mojang or Microsoft.
Frequently Asked Questions
Where is the server.properties file?
It is in the folder the server is started from, normally right next to the server jar and eula.txt. The file does not come with the download; the server creates it the first time it starts. On a rented server you reach it over SFTP, SSH or the file manager of your panel.
Do I have to restart the server after editing server.properties?
Yes. The server reads the file only when it starts, so a change has no effect until the next start. The safest order is to stop the server with the stop command, edit and save the file, then start the server again.
Why do my changes in server.properties keep resetting?
There are two usual causes. Either the file was edited while the server was running and the server wrote its own version back, or a key or value was misspelled, so the server ignored it and used the default. Stop the server first, check the spelling, and look at the file again after the restart.
Is it safe to set online-mode to false?
Not on a server that players reach directly. With online-mode off, accounts are no longer verified, so anyone can join under any name, including the name of an operator. The only normal exception is a backend server behind a proxy such as Velocity, where the proxy verifies players and a firewall blocks direct connections.
Why is pvp missing from my server.properties?
Since Minecraft 1.21.9, pvp is no longer a server.properties key. It became a game rule together with a few other settings, so on current versions you turn it off with the command gamerule pvp false. On older versions the pvp line is still in the file.
How do I add colours to the MOTD?
Put a section sign and a code in front of the text, for example the section sign followed by a for green or by l for bold. In the file, the escape \u00A7 stands for the section sign and works on every version. A \n starts the second line of the MOTD.
About the author
Nodesty Team · Infrastructure & Support
The Nodesty team runs our servers, network and DDoS protection day to day and answers customer support requests around the clock. These guides come from that work.
Related articles

How to Install Plugins on a Minecraft Server (Paper, Spigot, Purpur)
How to install Minecraft plugins on a Paper, Spigot or Purpur server: safe downloads, versions and dependencies, the plugins folder, updates and errors.

LuckPerms Guide: Ranks and Permissions on a Minecraft Server
A LuckPerms guide for Paper servers: installation, groups and inheritance, prefixes, temporary ranks, promotion tracks, the web editor and storage options.

How to Connect a Domain to a Minecraft Server: A and SRV Records
Minecraft server domain setup: an A record for play.example.com, an SRV record for a custom port, Cloudflare DNS only, Bedrock ports and checks with dig.