server.properties
The main configuration file of a Minecraft Java server: plain key=value lines for game mode, difficulty, port, whitelist, view distance and more.
server.properties is a plain text file in the root folder of every Minecraft Java server. The server creates it on first start with default values. Each line is a key=value pair; lines starting with # are comments.
Settings worth knowing
motd: the message shown under the server name in the multiplayer list.gamemode,difficulty,hardcore,pvp: the basic rules of the world.max-players: how many players can be online at once.server-port: the port the server listens on, 25565 by default. See port and SRV record.online-mode: whether players are authenticated with Mojang’s servers. Keep ittrueunless the server runs behind a proxy such as Velocity.white-listandenforce-whitelist: restrict access, see whitelist.view-distanceandsimulation-distance: the biggest performance levers in this file.level-nameandlevel-seed: the world folder name and the seed used when a new world is generated.spawn-protection: the radius around spawn that only operators can build in.enable-rcon,rcon.port,rcon.password: remote console access, see RCON.op-permission-level: the default level given by/op, see op.
Why it matters for server owners
Most first questions about a server, such as how to change the difficulty, rename the server in the list or stop people from joining, are answered in this file. Performance issues often start here too.
Editing safely
- Stop the server first. The server reads the file at startup, and some versions rewrite it on shutdown, which can overwrite your edits.
- Keep the exact key names and the
key=valueformat; typos are ignored silently. - Change one thing at a time and restart, so you know which change caused what.
Practical tip
Keep a copy of a working server.properties with your backups. When something breaks after an edit, comparing the two files is the fastest way to find the cause.