Minecraft server.properties: full field reference for 1.21
Every key in server.properties for Java Edition 1.21, what it does, the accepted values, the default, and the fields most commonly misconfigured on community servers.
Every Java Edition server reads a single flat text file at startup: server.properties. This page documents every recognized key in 1.21, grouped by what they actually affect. Defaults match a freshly generated vanilla server. Where a field has historically tripped up community admins, it is called out separately.
Networking and connectivity
| Key | Default | Description |
|---|---|---|
server-port | 25565 | TCP port the server listens on. Match the firewall and router forward. |
server-ip | (empty) | Leave empty to bind every interface. Set to a single IP only when running multiple servers on one host. |
enable-query | false | GameSpy4 query protocol. Required for server list sites that show player counts. |
query.port | 25565 | UDP port for the query protocol when enable-query=true. |
enable-rcon | false | Remote console. Required for any panel or bot that issues commands over TCP. |
rcon.port | 25575 | TCP port for RCON. Never expose to the public internet. |
rcon.password | (empty) | Required when RCON is enabled. Use a 32+ character random string. |
network-compression-threshold | 256 | Packet size in bytes above which the server compresses. Set to -1 to disable; raise to 512 on LAN to save CPU. |
prevent-proxy-connections | false | Drops connections from clients whose ISP differs from their reported Mojang region. Catches some VPN traffic, also false positives. |
Authentication and security
| Key | Default | Description |
|---|---|---|
online-mode | true | Verify clients against Mojang session servers. Disable only behind a trusted proxy. |
white-list | false | Restrict joins to entries in whitelist.json. |
enforce-whitelist | false | Kick existing online players who are not on the whitelist when it changes. |
enforce-secure-profile | true | Require chat signing keys. Disable for unsigned message support on older clients. |
op-permission-level | 4 | Permission level granted to /op. 4 is full operator, 1 is bypass spawn protection only. |
function-permission-level | 2 | Minimum permission level required to run mcfunction files. |
player-idle-timeout | 0 | Minutes of inactivity before a player is kicked. 0 disables the kick. |
hide-online-players | false | Strip the player list from server pings. |
World generation and gameplay
| Key | Default | Description |
|---|---|---|
level-name | world | Subdirectory holding the world data. Change to swap worlds without losing the old one. |
level-seed | (empty) | Numeric or string seed for terrain generation. Only honored on first start. |
level-type | minecraft:normal | Worldgen preset. Other options: minecraft:flat, minecraft:large_biomes, minecraft:amplified. |
generator-settings | {} | JSON object passed to the generator. Most commonly used with flat worlds. |
generate-structures | true | Toggles villages, strongholds, mineshafts, and other structures during generation. |
max-world-size | 29999984 | Half edge length of the world border, in blocks. Lower this to cap the map size before it grows. |
spawn-protection | 16 | Radius in blocks around spawn where only ops can build. Set to 0 to disable. |
difficulty | easy | peaceful, easy, normal, hard. |
gamemode | survival | survival, creative, adventure, spectator. |
force-gamemode | false | Reset every joining player to the gamemode key. Useful for creative-only servers. |
hardcore | false | Set difficulty to hard and ban players on death. One way switch. |
pvp | true | Allow players to damage each other. |
allow-flight | false | Stops the anti cheat from kicking players who hover. Required by most fly plugins. |
allow-nether | true | Disable to prevent nether portal generation. |
Performance and tick budget
| Key | Default | Description |
|---|---|---|
view-distance | 10 | Server side chunk radius sent to clients. Largest single performance lever. |
simulation-distance | 10 | Chunk radius around each player that ticks entities and redstone. Drop to 6 on busy servers. |
entity-broadcast-range-percentage | 100 | Multiplier on the distance at which entities are broadcast to clients. |
max-tick-time | 60000 | Milliseconds a single tick may take before the watchdog crashes the server. Set to -1 in debug. |
sync-chunk-writes | true | Fsync world saves. Safer on Windows; can be set false on ZFS or battery backed RAID for a small write speed gain. |
use-native-transport | true | Use Epoll on Linux. Leave on, faster network IO. |
Player limits and storage
| Key | Default | Description |
|---|---|---|
max-players | 20 | Cap on simultaneous players. Raise carefully, view-distance scales memory per player. |
motd | A Minecraft Server | Message shown in the multiplayer list. Supports section sign color codes. |
resource-pack | (empty) | Optional URL of a resource pack served to joining clients. |
resource-pack-sha1 | (empty) | SHA1 of the pack. Required when resource-pack is set. |
require-resource-pack | false | Disconnect players who decline the pack. |
enable-status | true | Respond to server list pings. Disable to hide from public lists. |
A sane starter config
A 16 player public Paper server, RCON enabled for the panel, whitelist off, performance dialed in for a 4 core 8 GB host:
server-port=25565server-ip=max-players=16motd=Survival - public# Authonline-mode=truewhite-list=falseenforce-secure-profile=true# Gameplaydifficulty=normalgamemode=survivalpvp=truespawn-protection=0# Performanceview-distance=8simulation-distance=6entity-broadcast-range-percentage=80network-compression-threshold=256# RCON for the panel only, never publicenable-rcon=truercon.port=25575rcon.password=CHANGE-ME-TO-A-LONG-RANDOM-STRINGCommon mistakes
Setting server-ip on a public server
server-ip binds the listener to a single interface. On a public server it should be empty. Setting it to127.0.0.1 turns the server into a loopback only listener; setting it to a LAN address breaks every connection coming through the router.
Cranking view-distance past 12
Memory and CPU scale with the square of view-distance. A jump from 10 to 14 nearly doubles the per player cost. Most community Paper servers run comfortably at 8 with simulation-distance at 6, and players cannot tell the difference.
Leaving RCON exposed
RCON has no rate limit and is trivially brute forceable. Bind it to 127.0.0.1 at the firewall, or use a panel that proxies RCON over its own auth layer.
Frequently asked questions
Where is server.properties located?
In the root of the server directory, alongside the server jar and the world folder. It is generated automatically the first time the server starts.
What does view-distance actually control?
The radius, in chunks, that the server sends to each connected client. It is the single biggest knob for server side memory and CPU. Lowering view-distance from 10 to 8 typically cuts tick time by 30 to 40 percent on a busy server.
Is online-mode safe to disable?
Only behind a trusted proxy like Velocity or BungeeCord that handles authentication on its own. Setting online-mode=false on an open server lets anyone log in as any username and is a hard ban on Mojang's terms.
Do I need to restart the server after editing server.properties?
Yes. server.properties is read once at startup. A subset of keys can be changed at runtime with the /gamerule and /worldborder commands, but anything else needs a full restart to take effect.