RE:NODE
Обзор хостинга

Minecraft14 мин чтения

Minecraft server.properties explained: every key and default

Every key in a Minecraft server.properties file, its default, and what to actually set it to - view distance, difficulty, whitelist, MOTD, RCON and query.

Эта статья пока на английском. Мы её переводим.

0 прочтений

server.properties is the whole configuration of a vanilla Minecraft server and the first layer of a Paper one. It is a flat list of about sixty-five key-value pairs, written by the server on its first start, read once at startup and never again. Most of them you will never touch. About a dozen decide how the server feels to play on, and three or four decide whether it survives contact with strangers.

This is every key that exists on a current version, grouped by what it does, with its default and the value worth setting instead. Where a key was added or removed in a particular version, that is noted - the file is not the same on 1.16 as it is on 1.21, and a guide that pretends otherwise sends you looking for keys that are not there.

How the file works, and how to edit it safely#

It is a Java properties file. That means one key=value per line, no quotes around values, no spaces around the =, and # for comments. Two consequences bite people:

  • A colon inside a value has to be escaped with a backslash, which is why the default level type is written level-type=minecraft\:normal and not minecraft:normal. Copying the unescaped form in silently gives you a default world on some versions.
  • A backslash in a Windows-style path has to be doubled.

The file is read exactly once, when the server starts. Editing it while the server runs does nothing, and /reload does not re-read it - /reload is a plugin-config reload and nothing else. Change the file, then restart. The reverse also happens: a handful of commands write back to the file, so /whitelist on flips white-list=true on disk. If you edit the file while the server is running, that write can overwrite your change, so stop the server first.

server.properties
#Minecraft server propertiesmotd=§6The Longhouse §8| §fsurvival 1.21max-players=24difficulty=normalview-distance=8simulation-distance=6spawn-protection=0white-list=trueenforce-whitelist=true

§ is the section sign, which is how Minecraft's legacy colour codes are introduced. Writing the literal § character usually works too, but the escape survives every editor and every encoding, so use it. Colour codes in the MOTD are the legacy sixteen only - there is no hex colour and no JSON in this field. The server icon is not a property at all: it is a 64 by 64 PNG named server-icon.png in the server root. MOTD, icon and resource packs covers the formatting in detail.

On RE:NODE you edit this file in the panel's file manager, which has syntax highlighting and saves in place, or over SFTP with credentials generated per server. Either way, restart afterwards for the change to apply.

The keys that change how the server feels#

If you only ever edit eight lines, make them these.

KeyDefaultSet it to
motdA Minecraft ServerSomething that identifies the server in the list
max-players20What your memory and CPU can carry
difficultyeasynormal for a survival server, hard if you mean it
gamemodesurvivalUsually left alone
pvptruefalse on a build or family server
view-distance108 for most servers, 6 when busy
simulation-distance106, sometimes 5
spawn-protection160 unless spawn is a public build

difficulty takes peaceful, easy, normal or hard by name on 1.14 and later; older versions used 0 to 3. It is applied from this file at every startup, so the /difficulty command changes it only until the next restart. peaceful does not just stop hostile spawns, it despawns the ones already there and stops hunger from killing you, which is a bigger change than most people intend.

spawn-protection is a square, not a circle: the value is a radius in blocks, so 16 protects a 33 by 33 area around the world spawn from being built in by anyone who is not an operator. It defaults on and confuses people whose first house cannot be placed. Set it to 0 on a private server. It also has no effect at all until at least one operator exists, which is why it seems to switch itself on the day you op yourself.

allow-flight=false is not an anti-cheat setting despite the name. It controls whether the server kicks a player who is airborne for more than about five seconds without a recognised reason. Any plugin that gives flight, and any elytra-heavy server, needs it set to true, and it does not make cheating easier because real flight hacks are not detected by it in the first place.

player-idle-timeout=0 is minutes before an idle player is kicked, with 0 meaning never. On a busy server with a low slot count, 20 frees seats. It is measured from the last input, not the last movement.

World generation and the world itself#

KeyDefaultWhat it does
level-nameworldThe folder the world lives in
level-seedemptySeed for a world that does not exist yet
level-typeminecraft\:normalGenerator preset
generator-settings{}JSON for flat and single-biome worlds
generate-structurestrueVillages, strongholds, everything generated
max-world-size29999984World border radius cap, in blocks
allow-nethertruefalse closes the Nether entirely
hardcorefalseDifficulty locked to hard, death means spectator
initial-enabled-packsvanillaData packs on for a new world
initial-disabled-packsemptyData packs off for a new world

level-name is the switch people miss. Point it at a folder that does not exist and the server generates a new world there on the next start, leaving the old one untouched on disk. That is how you start a new season without deleting anything, and how you accidentally "lose" a world by typoing the name. Point it back and the original returns.

level-seed only applies when the world is being created. Once level.dat exists the seed is baked in, and changing this line does nothing at all. level-type takes minecraft:normal, minecraft:flat, minecraft:large_biomes, minecraft:amplified and minecraft:single_biome_surface on 1.19 and later; before namespacing they were the bare words default, flat, largebiomes, amplified. Remember the escaped colon.

generate-structures=false is worth knowing about for a specific case: a server where you want caves, ores and biomes but no villages, temples or strongholds to raid. It does not stop the End portal room from existing in the sense that matters - with no strongholds there is no way to reach the End without a plugin or a manually placed portal, so switch it off knowingly.

initial-enabled-packs and initial-disabled-packs apply only at world creation. Data packs added later go in world/datapacks/ and are managed with /datapack - see the datapacks guide.

Game rules are not in this file. keepInventory, doFireTick, randomTickSpeed, mobGriefing and the rest live in level.dat and are set with /gamerule, which means they survive a restart on their own and cannot be set here. The server commands cheatsheet lists the ones worth changing.

Performance keys, and which ones actually matter#

KeyDefaultNotes
view-distance10Chunks sent to each player. The biggest single lever
simulation-distance10Chunks that tick around each player. 1.18 and later
entity-broadcast-range-percentage100How far entities are sent to clients
network-compression-threshold256Packet size above which packets are compressed
max-tick-time60000Watchdog: milliseconds before the server kills itself
max-chained-neighbor-updates1000000Redstone chain cap, cuts update suppression lag
sync-chunk-writestrueFlush chunk writes synchronously
use-native-transporttrueLinux epoll networking. Leave on
region-file-compressiondeflate1.20.5 and later. Also none and lz4
pause-when-empty-seconds601.21.2 and later. Stops ticking when empty
rate-limit0Packets per second before a kick. 0 is off

view-distance is the number people should change first and change last. Every chunk inside the radius is generated, loaded, kept in memory and sent to every player who can see it, so the cost is quadratic: going from 10 to 8 removes about a third of the loaded area, and from 10 to 6 removes nearly two thirds. On a 2 GB server with more than a few players, 8 is the sane default and 6 is what you drop to when the tick rate suffers. Going below 5 starts to feel bad, because fog and pop-in become obvious.

simulation-distance, added in 1.18, split the old single number in two. View distance is what players can see; simulation distance is what actually ticks - mobs, crops, redstone, hoppers, furnaces. It is capped by view distance in practice, and it is the cheaper one to lower, because a player can see for eight chunks while only six of them need to run. The catch is farms: anything beyond the simulation distance of every online player stops running, so a 4 will quietly break the iron farm someone built at the edge of their render.

network-compression-threshold=256 compresses any packet over 256 bytes. Setting it to -1 disables compression entirely, which trades bandwidth for CPU and is the right call only on a local network - behind a proxy on the same host, for example. 0 compresses everything and is almost always worse.

max-tick-time is a watchdog, not a performance setting. If a single tick takes longer than 60 seconds the server assumes it has deadlocked, dumps a thread trace and shuts down. Paper has its own early-warning version of the same thing. Setting it to -1 disables the watchdog, which is occasionally useful while debugging an enormous world load and is a bad permanent state - you lose the crash report that tells you what hung.

pause-when-empty-seconds arrived in 1.21.2 and is genuinely useful on a small server: after the set number of seconds with nobody online the server stops ticking the world, dropping CPU to almost nothing. It resumes instantly when someone joins. It also means scheduled jobs and time-based farms stop, so set it to 0 if you run anything that has to keep going with the server empty.

Everything past this file is Paper's own configuration, and that is where the larger wins are - entity activation ranges, per-player mob spawning, redstone implementation and chunk send rates. The Paper optimisation guide covers those, and why TPS drops covers how to tell which one you need.

Access, authentication and moderation#

KeyDefaultWhat it does
online-modetrueVerify every player with Mojang
white-listfalseOnly listed players may join
enforce-whitelistfalseKick non-listed players already online
enforce-secure-profiletrueRequire signed chat
prevent-proxy-connectionsfalseReject players whose ISP does not match
accepts-transfersfalse1.20.5 and later. Accept transfer packets
op-permission-level4Level /op grants
function-permission-level2Level functions and data packs run at
broadcast-console-to-opstrueShow console commands to operators
broadcast-rcon-to-opstrueShow RCON commands to operators
log-ipstrueWrite player addresses to the log
hide-online-playersfalseHide the player sample in the server list
enable-statustrueAnswer the server list ping at all
text-filtering-configemptyPath to a chat filter configuration

enforce-secure-profile=true requires clients to have a Mojang-signed chat profile. Switching it off allows some cracked and modified clients to connect and is another thing people do for the wrong reason. On a proxy backend it is normally set to false, because the proxy handles it.

white-list and enforce-whitelist are a pair that behaves oddly. Turning on the whitelist stops new arrivals immediately but leaves anyone already connected in place; enforce-whitelist=true is what removes them. Operators bypass the whitelist entirely unless enforcement is on. Whitelists and permissions has the workflow, and the file itself is keyed by UUID, not name.

log-ips=false is worth considering if you would rather not keep player addresses in logs that get shared when someone asks for help debugging. You lose the ability to correlate an alt account by address, which is a real moderation tool, so it is a trade rather than a straight win. Logs worth keeping covers the wider question.

prevent-proxy-connections=true asks Mojang's authentication response whether the player's connection looks like a VPN or proxy and rejects it if so. It produces false positives for legitimate players on some mobile networks and corporate connections, so it is a blunt instrument.

Query, RCON and remote control#

KeyDefaultWhat it does
enable-queryfalseAnswer the GameSpy4 query protocol
query.port25565UDP port for query
enable-rconfalseEnable remote console
rcon.port25575TCP port for RCON
rcon.passwordemptyRequired if RCON is on
enable-jmx-monitoringfalseExpose JVM metrics over JMX

Query is a read-only protocol that answers "who is online, what version, what map" over UDP. Server list websites and status bots use it. Enabling it costs nothing except an open UDP port, and unlike the server list ping it can report the full player list.

RCON is the remote console: a plain TCP connection, a password, and then arbitrary server commands. Two facts follow from "plain TCP" and "arbitrary server commands". The password is sent in clear text, and anyone holding it has level 4 on your server. Never expose 25575 to the internet without something in front of it, use a long random password, and prefer the panel console where you can. RCON safely is short and worth the five minutes. RE:NODE plans include query and RCON allocations when you add them on the Network tab, with the RCON password generated per server rather than chosen by you.

Resource packs#

KeyDefaultWhat it does
resource-packemptyDirect download URL for a .zip
resource-pack-sha1emptySHA-1 of that file, lowercase hex
resource-pack-promptemptyJSON text shown in the accept dialog
resource-pack-idempty1.20.3 and later. A UUID for the pack
require-resource-packfalseDisconnect players who decline

The URL must be a direct link to the file - a Dropbox or Google Drive share page serves HTML, not a zip, and the client silently fails. The SHA-1 is not optional in practice: without it, clients cache by URL and never notice you replaced the pack, so a pack update means either a new filename or a correct hash. Compute it with sha1sum pack.zip and paste the lowercase hex.

require-resource-pack=true turns a decline into a disconnect, which is the right setting for a server whose gameplay depends on custom textures and the wrong one for a server where it is decoration. The prompt field takes a raw JSON text component, the same format as /tellraw, so plain text needs to be wrapped: {"text":"Please accept our pack"}.

Keys you will read about that no longer exist#

Old guides are full of settings the server has dropped, and looking for them wastes an afternoon.

  • max-build-height was removed in 1.17, when world height became a property of the dimension rather than the server.
  • snooper-enabled went away with the telemetry it controlled.
  • announce-player-achievements became the announceAdvancements game rule.
  • difficulty=1 style numeric values were replaced by names in 1.14, though old files are still accepted.
  • resource-pack-hash was superseded by resource-pack-sha1 years ago.

Conversely, some keys are newer than the guide you are reading: simulation-distance is 1.18, enforce-secure-profile is 1.19, accepts-transfers and region-file-compression are 1.20.5, bug-report-link is 1.21, pause-when-empty-seconds is 1.21.2. If a key is not in the file your server generated, your version does not have it, and adding it by hand does nothing.

A worked example: a twenty-player survival server on 4 GB#

Here is the whole of a server.properties that works, with the defaults left out so you can see the decisions:

server.properties
motd=§aThe Longhouse §8» §fSurvival SMPmax-players=24difficulty=normalpvp=trueview-distance=8simulation-distance=6spawn-protection=0allow-flight=trueplayer-idle-timeout=30level-name=worldlevel-seed=white-list=trueenforce-whitelist=trueonline-mode=trueenable-command-block=falseop-permission-level=2enable-rcon=falseenable-query=truenetwork-compression-threshold=256

The reasoning, in order: a readable MOTD; a few more slots than the usual twenty because 4 GB carries it; normal difficulty because easy makes the survival loop trivial; view and simulation distance cut to what a 4 GB heap can hold comfortably; spawn protection off so people can build near spawn; flight allowed because elytra exist and false kicks are worse than the setting; a thirty-minute idle kick; whitelist on and enforced before the address goes anywhere; command blocks off because they are a remote-code-execution hole in the hands of a level 2 op; and op-permission-level=2 so /op hands out build tools rather than /stop.

That combination plus a permissions plugin and a nightly backup is a server you can leave running. Everything after it is tuning, which is the Paper guide, and heap sizing, which is the JVM guide.

FAQ#

Why did my change to server.properties do nothing?

The file is read at startup only. Restart the server. If you edited it while the server was running, check the file again after the restart - the server can rewrite it on shutdown and overwrite what you typed.

What is the difference between view distance and simulation distance?

View distance is how far chunks are sent to the client, so it controls what players see and most of the memory cost. Simulation distance is how far chunks actually tick, so it controls whether mobs spawn, crops grow and redstone runs. Lowering simulation distance is cheaper and less visible, but it stops farms that sit outside it.

Can I set game rules like keepInventory here?

No. Game rules live in the world, not in server.properties. Set them once with /gamerule keepInventory true and they persist across restarts because they are stored in level.dat.

How do I change the world seed on an existing server?

You cannot. The seed is fixed when the world is generated. Change level-name to a new folder and set level-seed, and the server creates a fresh world on the next start while leaving the old one on disk.

Is it safe to raise max-players above 20?

The setting itself enforces nothing except a number. What limits you is memory for the loaded chunks and a single core for the tick. Raise it alongside a lower view distance and watch the tick time, not the player count.

Does Paper ignore any of these settings?

Paper reads all of them and adds its own layers on top in bukkit.yml, spigot.yml and config/paper-*.yml. A few are overridden there - per-world view and simulation distance, mob spawn limits and despawn ranges in particular - so if a change here appears to have no effect on Paper, check whether a Paper file is setting the same thing.


Комментарии

Полностью анонимно: без аккаунта, без почты, без cookie. Мы храним имя, которое вы ввели, текст и время - больше ничего. Количество ссылок ограничено, разметка не отображается.

0/2000