Files
docker-minecraft-server/docs/variables.md

25 KiB
Raw Permalink Blame History

!!! warning

The variables listed on this page are manually documented and may be out-of-date or inaccurate.

All other documentation pages are actively maintained, so please use the search box above to find the desired topic.

General options

NAME DESCRIPTION DEFAULT REQUIRED
UID The linux user id to run as 1000
GID The linux group id to run as 1000
MEMORY The image declares an initial and maximum Java memory-heap limit of 1 GB. 1G
INIT_MEMORY Independently sets the initial heap size 1G
MAX_MEMORY independently sets the max heap size 1G
TZ You can configure the timezone to match yours by setting the TZ environment variable.

alternatively, you can mount: /etc/localtime:/etc/localtime:ro

/etc/timezone:/etc/timezone:ro

UTC
LOG_LEVEL Root logger level (trace, debug, info, warn, error) info
LOG_CONSOLE_FORMAT Log4j2 pattern for console output (what you see in docker logs) [%d{HH:mm:ss}] [%t/%level]: %msg%n
LOG_FILE_FORMAT Log4j2 pattern for file logs (written to logs/latest.log) [%d{HH:mm:ss}] [%t/%level]: %msg%n
LOG_TERMINAL_FORMAT Log4j2 pattern for interactive terminal console (used with docker attach) [%d{HH:mm:ss} %level]: %msg%n
ROLLING_LOG_FILE_PATTERN Pattern for rolled/archived log file names logs/%d{yyyy-MM-dd}-%i.log.gz
ROLLING_LOG_MAX_FILES Maximum number of archived log files to keep 1000
ENABLE_ROLLING_LOGS Legacy option. Rolling logs are now enabled by default via templated log4j2 configuration. This option is maintained for backward compatibility but only used for error reporting false
ENABLE_JMX To enable remote JMX, such as for profiling with VisualVM or JMC, add the environment variable ENABLE_JMX=true false
JMX_HOST If JMX is enabled, set JMX_HOST to the IP/host running the Docker container, and add a port forwarding of TCP port 7091
USE_AIKAR_FLAGS Aikar has done some research into finding the optimal JVM flags for GC tuning, which becomes more important as more users are connected concurrently false
USE_MEOWICE_FLAGS MeowIce has created an updated set of JVM flags based on Aikar's flags but with support for optimizations for Java 17 and above false
USE_MEOWICE_GRAALVM_FLAGS enables MeowIce's flags for GraalVM if USE_MEOWICE_GRAALVM_FLAGS is TRUE true
JVM_OPTS General JVM options can be passed to the Minecraft Server invocation by passing a JVM_OPTS environment variable. The JVM requires -XX options to precede -X options, so those can be declared in JVM_XX_OPTS. Both variables are space-delimited, raw JVM arguments
JVM_XX_OPTS General JVM options can be passed to the Minecraft Server invocation by passing a JVM_OPTS environment variable. The JVM requires -XX options to precede -X options, so those can be declared in JVM_XX_OPTS. Both variables are space-delimited, raw JVM arguments
JVM_DD_OPTS As a shorthand for passing several system properties as -D arguments, you can instead pass a comma separated list of name=value or name:value pairs with JVM_DD_OPTS. (The colon syntax is provided for management platforms like Plesk that don't allow = inside a value.)
EXTRA_ARGS Arguments that would usually be passed to the jar file (those which are written after the filename)
LOG_TIMESTAMP To include the timestamp with each log set to true false

Server

NAME DESCRIPTION DEFAULT REQUIRED
TYPE The server type VANILLA
EULA You MUST set this to true  
VERSION The minecraft version LATEST
MOTD Set the server log in message.
DIFFICULTY The difficulty level. Available values: peaceful,easy,normal,hard easy
ICON The url or file path for the icon image to use for the server. It will be downloaded, scaled, and converted to the proper format.
OVERRIDE_ICON The server icon which has been set doesn't get overridden by default. Set this to TRUE to override the icon FALSE
MODE Minecraft servers are configured to run in Survival mode by default. You can change the mode using MODE where you can either provide the standard numerical values or the shortcut values:
  • creative
  • survival
  • adventure
  • spectator(minecraft 1.8 or later)
LEVEL Maps to the level-name server property. You can either switch between world saves or run multiple containers with different saves by using the LEVEL option world
SERVER_PORT Maps to the server-port server property. Only change this value if you know what you're doing. It is only needed when using host networking and it is rare that host networking should be used.
STOP_SERVER_ANNOUNCE_DELAY To allow time for players to finish what they're doing during a graceful server shutdown, set STOP_SERVER_ANNOUNCE_DELAY to a number of seconds to delay after an announcement is posted by the server.
PROXY You may configure the use of an HTTP/HTTPS proxy by passing the proxy's URL false
CONSOLE Some older versions (pre-1.14) of Spigot required --noconsole to be passed when detaching stdin TRUE
GUI Some older servers get confused and think that the GUI interface is enabled. TRUE
STOP_DURATION When the container is signalled to stop, the Minecraft process wrapper will attempt to send a "stop" command via RCON or console and waits for the process to gracefully finish. 60
SETUP_ONLY If you are using a host-attached data directory, then you can have the image setup the Minecraft server files and stop prior to launching the server process by setting this to true false
USE_FLARE_FLAGS To enable the JVM flags required to fully support the Flare profiling suite.
USE_SIMD_FLAGS Support for optimized SIMD operation false

Server properties

This image maps known server properties as described in this section.

Custom resource pack

NAME DESCRIPTION DEFAULT REQUIRED
RESOURCE_PACK A link to a custom resource pack
RESOURCE_PACK_SHA1 The checksum for the custom resource pack
RESOURCE_PACK_ENFORCE Enforce the resource pack on clients FALSE

Whitelist

NAME DESCRIPTION DEFAULT REQUIRED
ENABLE_WHITELIST Enable the whitelist to manually manage the whitelist false
WHITELIST A list of usernames and/or UUIDs separated by comma
WHITELIST_FILE A url or file path to a whitelist json formatted file.
OVERRIDE_WHITELIST Enforce regeneration of the whitelist on each server startup. false

RCON

NAME DESCRIPTION DEFAULT REQUIRED
ENABLE_RCON Enable/disable RCON support; however, be aware that disabling RCON will remove and limit some features, such as interactive and color console support. true
RCON_PASSWORD You MUST change this value Randomly generated
RCON_PORT The port for RCON 25575
BROADCAST_RCON_TO_OPS Sets broadcast-rcon-to-ops server property false
RCON_CMDS_STARTUP RCON commands to execute when the server starts.
RCON_CMDS_ON_CONNECT RCON commands to execute whenever a client connects to the server.
RCON_CMDS_FIRST_CONNECT RCON commands to execute on the first client connection to the server.
RCON_CMDS_ON_DISCONNECT RCON commands to execute whenever a client disconnects from the server.
RCON_CMDS_LAST_DISCONNECT RCON commands to execute when the last client disconnects from the server.

Auto-Pause

NAME DESCRIPTION DEFAULT REQUIRED
ENABLE_AUTOPAUSE Enable the Autopause functionality FALSE
AUTOPAUSE_TIMEOUT_EST describes the time between the last client disconnect and the pausing of the process 3600
AUTOPAUSE_TIMEOUT_INIT describes the time between server start and the pausing of the process, when no client connects in-between 600
AUTOPAUSE_TIMEOUT_KN describes the time between knocking of the port (e.g. by the main menu ping) and the pausing of the process, when no client connects in-between 120
AUTOPAUSE_PERIOD describes period of the daemonized state machine, that handles the pausing of the process 10
AUTOPAUSE_KNOCK_INTERFACE Describes the interface passed to the knockd daemon. If the default interface does not work, run the ifconfig command inside the container and derive the interface receiving the incoming connection from its output. The passed interface must exist inside the container. Using the loopback interface (lo) does likely not yield the desired results. eth0
DEBUG_AUTOPAUSE Adds additional debugging output for AutoPause false

Auto-Stop

!!! note

AutoStop function is incompatible with the Autopause functionality, as they basically cancel out each other.
NAME DESCRIPTION DEFAULT REQUIRED
ENABLE_AUTOSTOP Enable the AutoStop functionality FALSE
AUTOSTOP_TIMEOUT_EST describes the time between the last client disconnect and the stopping of the server 3600
AUTOSTOP_TIMEOUT_INIT describes the time between server start and the stopping of the server, when no client connects in-between 1800
AUTOSTOP_PERIOD describes period of the daemonized state machine, that handles the stopping of the serve 10
DEBUG_AUTOSTOP Adds additional logging for AutoStop false

CurseForge

!!! tip

Refer to the [main documentation page](types-and-platforms/mod-platforms/auto-curseforge.md) for more details and up-to-date information.
NAME DESCRIPTION DEFAULT REQUIRED
CF_API_KEY YOUR CurseForge (Eternal) API Key.
CF_API_KEY_FILE A path to a file inside of container that contains YOUR CurseForge (Eternal) API Key.
CF_PAGE_URL Pass a page URL to the modpack or a specific file
CF_SLUG Instead of a URL, the modpack slug can be provided.
CF_FILE_ID The mod curseforge numerical ID.
CF_FILENAME_MATCHER Specify a substring to match the desired filename
CF_EXCLUDE_INCLUDE_FILE Global and per modpack exclusions can be declared in a JSON file and referenced with this variable.

By default, the file bundled with the image will be used, but can be disabled by setting this to an empty string. The schema of this file is documented here.
CF_EXCLUDE_MODS Mods can be excluded by passing a comma or space delimited list of project slugs or IDs
CF_FORCE_INCLUDE_MODS Mods can be included by passing a comma or space delimited list of project slugs or IDs
CF_FORCE_SYNCHRONIZE Forces the excludes/includes to be re-evaluated
CF_SET_LEVEL_FROM Some modpacks come with world/save data via a worlds file and/or the overrides provided with the modpack. Either approach can be selected to set the LEVEL to the resulting saves directory by setting this to either:
  • WORLD_FILE
  • OVERRIDES
CF_PARALLEL_DOWNLOADS specify how many parallel mod downloads to perform 4
CF_OVERRIDES_SKIP_EXISTING if set, files in the overrides that already exist in the data directory are skipped. world data is always skipped, if present. false
CF_MOD_LOADER_VERSION Override the mod loader version declared by the modpack