server.properties entries can be managed by environment variables. Some mappings provide additional functionality beyond the properties file.
Managing server.properties
If you prefer to manually manage theserver.properties file, set OVERRIDE_SERVER_PROPERTIES to false. Similarly, you can skip the startup script’s creation of server.properties by setting SKIP_SERVER_PROPERTIES to true.
To clear a server property, set the variable to an empty string, such as
-e RESOURCE_PACK="". An unset variable is ignored and the existing server property is left unchanged.server.properties will be used by the server, set DUMP_SERVER_PROPERTIES to true and the contents will be output before the server starts.
Set to
false to manually manage the server.properties fileSet to
true to skip creation of server.propertiesSet to
true to output server.properties contents before server startsControls whether unicode characters are escaped as
\uXXXX. By default, unicode characters are escaped for Minecraft versions less than 1.20.Common Properties
Message of the Day
The message of the day, shown below each server entry in the client UI, can be changed with theMOTD environment variable. By default, a message is computed from the server type and version.
The server message of the day. Supports formatting codes using § symbol and unicode characters.
- docker run
- docker compose
\n:
Difficulty
The difficulty level. Valid values:
peaceful, easy, normal, hardWhitelist Players
Comma or newline separated list of usernames and/or UUIDs to whitelist
URL or container path to a whitelist file to retrieve/copy into the standard location
Behavior when whitelist file already exists. Options:
SKIP: Skip processing when file exists (same as legacyOVERRIDE_WHITELIST=false)SYNCHRONIZE: Sync users with provided list (same as legacyOVERRIDE_WHITELIST=true)MERGE: Merge WHITELIST users into existing fileSYNC_FILE_MERGE_LIST: When WHITELIST_FILE provided, overwrite existing; merge WHITELIST users
Enforce whitelist changes immediately when whitelist commands are used
Set the
white-list property when manually managing the whitelist fileExample
For versions prior to 1.7.3,
white-list.txt is maintained instead. Only usernames are supported for those versions.Op/Administrator Players
Comma or newline separated list of usernames and/or UUIDs to grant operator privileges
URL or container path to an ops file to retrieve/copy into the standard location
Behavior when ops file already exists. Options:
SKIP: Skip processing when file existsSYNCHRONIZE: Sync users with provided list, retaining level and bypassesPlayerLimitMERGE: Merge OPS users into existing fileSYNC_FILE_MERGE_LIST: When OPS_FILE provided, overwrite existing; merge OPS users
API provider for username resolution. Options:
playerdb or mojangExample
RCON
RCON is enabled by default to allow for graceful shutdown and backup coordination.Enable RCON support. Disabling removes some features like interactive and color console support.
RCON password. Randomly generated by default on each startup.
Path to file containing RCON password. Recommended for Docker Secrets.
RCON port within the container. Do not change unless you have a very good reason.
Using Docker Secrets
Query
Enable the gamespy query protocol
Query port (UDP)
Game Settings
Level seed for world generation. Quote negative values.
Game mode. Values:
creative, survival, adventure, spectator (1.8+)World save name. Maps to
level-name server property.World generation type. See Minecraft wiki for valid types.
JSON configuration for world generation. Used with some level types like FLAT.
Superflat Example
Server Icon
URL or container path to server icon image. Automatically downloaded, scaled, and converted.
Replace existing server-icon.png file
Resource Pack
URL to custom resource pack
SHA1 checksum of the resource pack
Enforce the resource pack on clients
Server Port
Server port. Maps to
server-port property.Datapacks
Comma separated list of datapacks to enable before initial world creation (1.19.3+)
Comma separated list of datapacks to disable before initial world creation (1.19.3+)
Custom Properties
Newline delimited
name=value pairs for custom server properties used by some mods/pluginsExample
All Property Mappings
| Environment Variable | Server Property |
|---|---|
| ACCEPTS_TRANSFERS | accepts-transfers |
| ALLOW_FLIGHT | allow-flight |
| ALLOW_NETHER | allow-nether |
| ANNOUNCE_PLAYER_ACHIEVEMENTS | announce-player-achievements |
| BROADCAST_CONSOLE_TO_OPS | broadcast-console-to-ops |
| BROADCAST_RCON_TO_OPS | broadcast-rcon-to-ops |
| BUG_REPORT_LINK | bug-report-link |
| ENABLE_COMMAND_BLOCK | enable-command-block |
| ENABLE_STATUS | enable-status |
| ENFORCE_SECURE_PROFILE | enforce-secure-profile |
| ENTITY_BROADCAST_RANGE_PERCENTAGE | entity-broadcast-range-percentage |
| FORCE_GAMEMODE | force-gamemode |
| FUNCTION_PERMISSION_LEVEL | function-permission-level |
| GENERATE_STRUCTURES | generate-structures |
| GENERATOR_SETTINGS | generator-settings |
| HARDCORE | hardcore |
| HIDE_ONLINE_PLAYERS | hide-online-players |
| LOG_IPS | log-ips |
| MAX_BUILD_HEIGHT | max-build-height |
| MAX_CHAINED_NEIGHBOR_UPDATES | max-chained-neighbor-updates |
| MAX_COMMAND_CHAIN_LENGTH | max-command-chain-length |
| MAX_ENTITY_COLLISION_RADIUS | max-entity-collision-radius |
| MAX_ENTITY_CRAMMING | max-entity-cramming |
| MAX_FUNCTION_CHAIN_DEPTH | max-function-chain-depth |
| MAX_NEIGHBORS | max-neighbors |
| MAX_PLAYERS | max-players |
| MAX_TICK_TIME | max-tick-time |
| MAX_WORLD_SIZE | max-world-size |
| NETWORK_COMPRESSION_THRESHOLD | network-compression-threshold |
| ONLINE_MODE | online-mode |
| OP_PERMISSION_LEVEL | op-permission-level |
| PAUSE_WHEN_EMPTY_SECONDS | pause-when-empty-seconds |
| PLAYER_IDLE_TIMEOUT | player-idle-timeout |
| PREVENT_PROXY_CONNECTIONS | prevent-proxy-connections |
| PVP | pvp |
| RATE_LIMIT | rate-limit |
| REGION_FILE_COMPRESSION | region-file-compression |
| RESOURCE_PACK_ID | resource-pack-id |
| RESOURCE_PACK_PROMPT | resource-pack-prompt |
| SERVER_NAME | server-name |
| SIMULATION_DISTANCE | simulation-distance |
| SNOOPER_ENABLED | snooper-enabled |
| SPAWN_ANIMALS | spawn-animals |
| SPAWN_MONSTERS | spawn-monsters |
| SPAWN_NPCS | spawn-npcs |
| SPAWN_PROTECTION | spawn-protection |
| STATUS_HEARTBEAT_INTERVAL | status-heartbeat-interval |
| SYNC_CHUNK_WRITES | sync-chunk-writes |
| USE_NATIVE_TRANSPORT | use-native-transport |
| VIEW_DISTANCE | view-distance |