server.properties is the main config file for a Minecraft server — one line per setting, editable in any text editor or your control panel. Here is what the settings that actually matter do, grouped by what you are trying to change.
Quick answer
server.properties is the main Minecraft server config. The settings that matter most are max-players, server-port, online-mode, white-list, view-distance and simulation-distance (for performance), difficulty, gamemode and motd. Change one value per line, save and restart the server. On Java 1.21.9 and newer, PvP and monster spawning are no longer in this file: they are game rules you set from the console.
Edit server.properties in the server folder (or the config editor in your panel), change one value per line, save, and restart the server. Values are case-sensitive: true/false, or plain text and numbers.
Gameplay settings
gamemode— the default mode (survival, creative, adventure, spectator).difficulty— peaceful, easy, normal or hard.hardcore— true locks difficulty to hard with permanent death.force-gamemode— reset players to the default gamemode on join.
Settings that moved to game rules (Java 1.21.9+)
Older guides, and older server files, still list pvp, spawn-monsters, allow-nether and enable-command-block. Java Edition 1.21.9 removed all four from server.properties and turned them into game rules, and 1.21.2 had already removed spawn-animals and spawn-npcs without a replacement. On a current server those lines are simply ignored, so editing them changes nothing.
Set them from the server console instead (or in-game as an operator). Game rules are saved with the world and apply immediately, with no restart:
- PvP:
/gamerule pvp false(same name on every version since 1.21.9). - Monster spawning:
/gamerule spawn_monsters falseon 1.21.11 and newer,/gamerule spawnMonsters falseon 1.21.9–1.21.10. - Nether portals:
/gamerule allow_entering_nether_using_portals false(1.21.9–1.21.10:allowEnteringNetherUsingPortals). - Command blocks:
/gamerule command_blocks_work true(1.21.9–1.21.10:commandBlocksEnabled).
Servers on 1.21.8 and older, which includes most modpacks, still read these lines from server.properties. 1.21.11 renamed every game rule to snake_case; typing /gamerule in the console lists the exact names your version accepts.
Access & security
online-mode— verify players against Mojang/Microsoft. Keep this true.white-list/enforce-whitelist— restrict who can join. See whitelisting.max-players— the player slot limit.server-port— the port players connect to (default 25565).motd— the text shown for your server in the multiplayer list.
World settings
level-name— the world folder to load.level-seed— the seed for a new world.level-type— normal, flat, large biomes, amplified.generate-structures— villages, temples and the rest.spawn-protection— a block radius near spawn only ops can build in.
Performance settings
These two lines affect performance more than any others:
view-distance— how many chunks are sent to players. High values hit TPS and RAM hard.simulation-distance— how far entities and ticks actually run — often the bigger lever for lag.max-tick-time— the watchdog timeout before the server considers itself hung.network-compression-threshold— packet compression tuning.
Lowering view-distance and simulation-distance is the quickest way to fix a laggy server — see settings to reduce lag and the "Can't keep up" fix.
The settings people change most
- gamemode and difficulty — see this guide.
- max-players, motd and server-port.
- view-distance and simulation-distance for performance.
- white-list and online-mode (PvP is a game rule on 1.21.9+).
Common mistakes
- Editing the file but not restarting the server.
- Setting
online-mode=falsewithout meaning to — a real security risk. - Cranking
view-distancetoo high and causing lag. - A typo or stray space breaking a line so it is ignored.
- Editing
pvporspawn-monsterson a 1.21.9+ server, where the lines no longer do anything.
server.properties is just one setting per line. Change what you need, keep online-mode on, and restart — most of running a server comes down to these lines.
Editing server.properties is simpler from a browser. Our Minecraft server hosting includes a web file manager and console, running on NVMe storage in Frankfurt.
Minecraft is a trademark of Mojang Synergies AB / Microsoft. ESAGAMES is an independent hosting provider, not affiliated with or endorsed by Mojang or Microsoft.