Start from a preset
server.properties
Replace the matching lines in your existing file, or use this as a new file. Leave server-port and server-ip as your host set them. Restart the server afterwards.
What each setting does
| Setting | What it does |
|---|---|
motd | The message under your server's name in the multiplayer list. Supports colour codes. |
gamemode | The game mode new players start in. |
difficulty | Peaceful, easy, normal or hard. Can also be changed in game with /difficulty. |
max-players | How many players can be online at once. It doesn't reserve memory. |
spawn-protection | Radius around spawn that only operators can build in. 0 turns it off. |
view-distance | How many chunks around each player are sent to them. The biggest single factor in memory use. |
simulation-distance | How far from players mobs, crops and redstone keep running. Lowering it is the easiest performance win. |
level-type | The world generator: normal, large biomes, amplified or superflat. Only applies when a new world is generated. |
level-seed | The world seed. Blank picks a random one. Only applies to new worlds. |
white-list | Only players on the whitelist can join. Add them with /whitelist add Name. |
enforce-whitelist | Kicks online players when they're removed from the whitelist. |
online-mode | Checks every player's account with Mojang. Turning it off lets anyone join with any name. Only disable it behind a proxy such as Velocity that handles authentication. |
pvp | Whether players can damage each other. |
hardcore | Players are set to spectator mode when they die, and difficulty is locked to hard. |
allow-flight | Stops the server kicking players for "flying". Turn on if you use plugins or mods that let players fly or glide. |
enable-command-block | Lets command blocks run. Off by default. |
generate-structures | Villages, strongholds, temples and other structures in new chunks. |
Mojang occasionally moves settings between server.properties and game rules in new versions. Unknown keys are simply ignored, so a setting that doesn't take effect is worth checking against your version's changelog.
MOTD colour codes
Use § or & followed by a code. Colours: 0 black, 1 dark blue, 2 dark green, 3 dark aqua, 4 dark red, 5 purple, 6 gold, 7 grey, 8 dark grey, 9 blue, a green, b aqua, c red, d pink, e yellow, f white. Formats: l bold, o italic, n underline, m strikethrough, r reset. In the file itself, the generator writes § as §, which is how Minecraft stores it.
Common questions
Where is the server.properties file?
In the main folder of your Minecraft server, next to the server jar. It's created the first time the server starts.
Do I need to restart after editing server.properties?
Yes. The server reads the file when it starts, so stop and start it after saving your changes.
What is a good view distance for a Minecraft server?
8 to 10 for most servers, with simulation distance 6 to 8. Higher view distance looks nicer but uses much more memory and CPU.