Skip to main content
This page provides a comprehensive reference for all environment variables supported by the itzg/minecraft-server Docker image.

General Configuration

UID
integer
default:"1000"
The Linux user ID to run the server process as. Useful for matching file permissions with the host system.
GID
integer
default:"1000"
The Linux group ID to run the server process as. Useful for matching file permissions with the host system.
TZ
string
default:"UTC"
Configure the timezone for the container. Accepts standard timezone identifiers like America/New_York or Europe/London.Alternatively, you can mount /etc/localtime:/etc/localtime:ro and /etc/timezone:/etc/timezone:ro.
PROXY
string
default:""
Configure an HTTP/HTTPS proxy by passing the proxy’s URL. Used for downloading server files and mods.

Memory Configuration

MEMORY
string
default:"1G"
Sets both the initial and maximum Java heap size. Accepts values like 1G, 2048M, 4G, etc.
INIT_MEMORY
string
default:"1G"
Independently sets the initial heap size (-Xms). Overrides the value from MEMORY.
MAX_MEMORY
string
default:"1G"
Independently sets the maximum heap size (-Xmx). Overrides the value from MEMORY.

Logging Configuration

LOG_LEVEL
string
default:"info"
Root logger level. Available values: trace, debug, info, warn, error.
LOG_TIMESTAMP
boolean
default:"false"
Include timestamps with each log entry when set to true.
LOG_CONSOLE_FORMAT
string
default:"[%d{HH:mm:ss}] [%t/%level]: %msg%n"
Log4j2 pattern for console output (what you see in docker logs).
LOG_FILE_FORMAT
string
default:"[%d{HH:mm:ss}] [%t/%level]: %msg%n"
Log4j2 pattern for file logs written to logs/latest.log.
LOG_TERMINAL_FORMAT
string
default:"[%d{HH:mm:ss} %level]: %msg%n"
Log4j2 pattern for interactive terminal console used with docker attach.
ROLLING_LOG_FILE_PATTERN
string
default:"logs/%d{yyyy-MM-dd}-%i.log.gz"
Pattern for rolled/archived log file names.
ROLLING_LOG_MAX_FILES
integer
default:"1000"
Maximum number of archived log files to keep before deletion.
ENABLE_ROLLING_LOGS
boolean
default:"false"
Legacy option. Rolling logs are now enabled by default via templated log4j2 configuration. Maintained for backward compatibility.

JVM Configuration

USE_AIKAR_FLAGS
boolean
default:"false"
Enable Aikar’s optimized JVM flags for GC tuning, which helps with performance when many users are connected.
USE_MEOWICE_FLAGS
boolean
default:"false"
Enable MeowIce’s updated JVM flags, based on Aikar’s flags but optimized for Java 17 and above.
USE_MEOWICE_GRAALVM_FLAGS
boolean
default:"true"
Enable MeowIce’s flags for GraalVM when USE_MEOWICE_FLAGS is also enabled.
USE_FLARE_FLAGS
boolean
default:"false"
Enable JVM flags required to fully support the Flare profiling suite.
USE_SIMD_FLAGS
boolean
default:"false"
Enable support for optimized SIMD operations.
JVM_OPTS
string
default:""
Space-delimited, raw JVM arguments passed to the Minecraft server invocation. Use for -X options.
JVM_XX_OPTS
string
default:""
Space-delimited JVM -XX options. The JVM requires -XX options to precede -X options.
JVM_DD_OPTS
string
default:""
Comma-separated list of name=value or name:value pairs for system properties (-D arguments). The colon syntax is provided for platforms like Plesk that don’t allow = in values.
ENABLE_JMX
boolean
default:"false"
Enable remote JMX for profiling with VisualVM or JMC.
JMX_HOST
string
default:""
If JMX is enabled, set this to the IP/host running the Docker container. Also add port forwarding for TCP port 7091.

Server Configuration

EULA
boolean
required
You MUST set this to true to accept the Minecraft EULA. The server will not start without this.
TYPE
string
default:"VANILLA"
The server type to run. Available values:
  • VANILLA - Official Minecraft server
  • PAPER - PaperMC server
  • SPIGOT - Spigot server
  • BUKKIT - Bukkit server
  • FORGE - Forge modded server
  • NEOFORGE - NeoForge modded server
  • FABRIC - Fabric modded server
  • QUILT - Quilt modded server
  • PURPUR - Purpur server
  • PUFFERFISH - Pufferfish server
  • FOLIA - Folia server
  • MAGMA - Magma hybrid server
  • MOHIST - Mohist hybrid server
  • ARCLIGHT - Arclight hybrid server
  • CURSEFORGE - CurseForge modpack
  • AUTO_CURSEFORGE - Auto CurseForge installation
  • FTBA - Feed The Beast modpack
  • CUSTOM - Custom server jar
VERSION
string
default:"LATEST"
The Minecraft version to run. Can be:
  • LATEST - Latest release version
  • SNAPSHOT - Latest snapshot version
  • Specific version like 1.20.4, 1.19.2, etc.
MOTD
string
default:""
The server message of the day shown in the multiplayer server list. Supports formatting codes using the section symbol (§).For multi-line MOTD, embed newline as \n.
DIFFICULTY
string
default:"easy"
The difficulty level. Available values: peaceful, easy, normal, hard.
MODE
string
default:"survival"
The game mode. Available values: creative, survival, adventure, spectator.
LEVEL
string
default:"world"
The world/level name. Maps to the level-name server property.
SERVER_PORT
integer
default:"25565"
The server port. Only change this if using host networking (rarely needed).
ICON
string
default:""
URL or file path for the server icon image. Will be downloaded, scaled, and converted to proper format.
OVERRIDE_ICON
boolean
default:"false"
Set to true to override an existing server icon.
CONSOLE
boolean
default:"true"
Some older versions (pre-1.14) of Spigot required --noconsole when detaching stdin.
GUI
boolean
default:"false"
Disable the GUI interface (should remain false for Docker).
EXTRA_ARGS
string
default:""
Additional arguments passed to the server jar file.

Server Operations

STOP_DURATION
integer
default:"60"
How long (in seconds) to wait for the server to gracefully stop before forcing termination.
STOP_SERVER_ANNOUNCE_DELAY
integer
default:"0"
Delay in seconds after announcing server shutdown before actually stopping. Gives players time to finish.
SETUP_ONLY
boolean
default:"false"
Set to true to setup server files but stop before launching the server process.

RCON Configuration

ENABLE_RCON
boolean
default:"true"
Enable/disable RCON support. Note: Disabling RCON removes some features like interactive console support.
RCON_PASSWORD
string
default:"randomly generated"
The RCON password. You should change this from the default randomly generated value.
RCON_PORT
integer
default:"25575"
The port for RCON connections.
BROADCAST_RCON_TO_OPS
boolean
default:"false"
Sets the broadcast-rcon-to-ops server property.
RCON_CMDS_STARTUP
string
default:""
RCON commands to execute when the server starts.
RCON_CMDS_ON_CONNECT
string
default:""
RCON commands to execute whenever a client connects.
RCON_CMDS_FIRST_CONNECT
string
default:""
RCON commands to execute on the first client connection.
RCON_CMDS_ON_DISCONNECT
string
default:""
RCON commands to execute whenever a client disconnects.
RCON_CMDS_LAST_DISCONNECT
string
default:""
RCON commands to execute when the last client disconnects.

Whitelist

ENABLE_WHITELIST
boolean
default:"false"
Enable the whitelist to manually manage allowed players.
WHITELIST
string
default:""
Comma-separated list of usernames and/or UUIDs to whitelist.
WHITELIST_FILE
string
default:""
URL or file path to a whitelist JSON file.
OVERRIDE_WHITELIST
boolean
default:"false"
Enforce regeneration of the whitelist on each server startup.

Resource Pack

RESOURCE_PACK
string
default:""
URL to a custom resource pack.
RESOURCE_PACK_SHA1
string
default:""
SHA1 checksum of the custom resource pack for verification.
RESOURCE_PACK_ENFORCE
boolean
default:"false"
Enforce the resource pack on clients (kick players who decline).

Auto-Pause

ENABLE_AUTOPAUSE
boolean
default:"false"
Enable the Auto-Pause functionality to pause the server when no players are connected.
AUTOPAUSE_TIMEOUT_EST
integer
default:"3600"
Time in seconds between last client disconnect and pausing the server.
AUTOPAUSE_TIMEOUT_INIT
integer
default:"600"
Time in seconds between server start and pausing when no client connects.
AUTOPAUSE_TIMEOUT_KN
integer
default:"120"
Time in seconds between port knock (e.g., server list ping) and pausing when no client connects.
AUTOPAUSE_PERIOD
integer
default:"10"
Period in seconds of the state machine that handles pausing.
AUTOPAUSE_KNOCK_INTERFACE
string
default:"eth0"
Network interface for the knockd daemon. Run ifconfig inside container to find the correct interface.
DEBUG_AUTOPAUSE
boolean
default:"false"
Enable additional debugging output for Auto-Pause.

Auto-Stop

Auto-Stop is incompatible with Auto-Pause as they cancel each other out.
ENABLE_AUTOSTOP
boolean
default:"false"
Enable the Auto-Stop functionality to stop the server when no players are connected.
AUTOSTOP_TIMEOUT_EST
integer
default:"3600"
Time in seconds between last client disconnect and stopping the server.
AUTOSTOP_TIMEOUT_INIT
integer
default:"1800"
Time in seconds between server start and stopping when no client connects.
AUTOSTOP_PERIOD
integer
default:"10"
Period in seconds of the state machine that handles stopping.
DEBUG_AUTOSTOP
boolean
default:"false"
Enable additional debugging output for Auto-Stop.

CurseForge

CF_API_KEY
string
required
Your CurseForge (Eternal) API Key. Required for CurseForge modpack installation.
CF_API_KEY_FILE
string
default:""
Path to a file inside the container containing your CurseForge API Key.
CF_PAGE_URL
string
default:""
Page URL to a CurseForge modpack or specific file.
CF_SLUG
string
default:""
The CurseForge modpack slug instead of full URL.
CF_FILE_ID
string
default:""
The CurseForge numerical file ID.
CF_FILENAME_MATCHER
string
default:""
Substring to match the desired modpack filename.
CF_EXCLUDE_INCLUDE_FILE
string
default:""
Path to JSON file declaring global and per-modpack exclusions/inclusions. Set to empty string to disable defaults.
CF_EXCLUDE_MODS
string
default:""
Comma or space-delimited list of project slugs or IDs to exclude.
CF_FORCE_INCLUDE_MODS
string
default:""
Comma or space-delimited list of project slugs or IDs to force include.
CF_FORCE_SYNCHRONIZE
boolean
default:"false"
Force re-evaluation of excludes/includes.
CF_SET_LEVEL_FROM
string
default:""
Set LEVEL from modpack world data. Values: WORLD_FILE or OVERRIDES.
CF_PARALLEL_DOWNLOADS
integer
default:"4"
Number of parallel mod downloads to perform.
CF_OVERRIDES_SKIP_EXISTING
boolean
default:"false"
Skip files in overrides that already exist in data directory.
CF_MOD_LOADER_VERSION
string
default:""
Override the mod loader version declared by the modpack.

Build docs developers (and LLMs) love