Essential Variables
EULA
You MUST set this to
TRUE to accept the Minecraft End User License Agreement.- docker run
- docker compose
Server Type and Version
The server type to run. See the Server Types documentation for all available options.Common values:
VANILLA- Official Minecraft serverPAPER- Paper serverFORGE- Forge modded serverFABRIC- Fabric modded serverSPIGOT- Spigot serverBUKKIT- Bukkit server
The Minecraft version to install. Can be:
LATEST- Latest stable releaseSNAPSHOT- Latest snapshot- Specific version like
1.20.4 - Version range like
1.20for latest 1.20.x
Example
User and Group Settings
By default, the container runs the Minecraft server as user ID 1000 and group ID 1000.The Linux user ID to run the server as
The Linux group ID to run the server as
User switching is skipped if the
--user/-u argument is passed to docker run or user is set on the compose service.Example
Memory Configuration
By default, the image sets both initial and maximum Java heap limits to 1 GB.Sets both initial (
Xms) and max (Xmx) memory heap settings.Supports formats:- Absolute:
1G,2048M,512M - Percentage:
50%,75%
Independently sets the initial heap size (overrides MEMORY for Xms)
Independently sets the max heap size (overrides MEMORY for Xmx)
- Simple Memory
- Separate Init/Max
- Percentage
Percentage-based heap sizing uses
-XX:InitialRAMPercentage for INIT_MEMORY and -XX:MaxRAMPercentage for MAX_MEMORY.Timezone Configuration
Set the timezone to match your locale. Use standard timezone names like
America/New_York or Europe/London.- Environment Variable
- Volume Mount
Locale Settings
System locale setting. Set in the Dockerfile and generally should not be changed.
Data Directory
The Minecraft server stores all data in the container’s/data directory.
Always mount a volume to
/data to persist your world saves, configurations, and other server data.Logging Options
Include timestamps in init logs (logs before the Minecraft server starts)
Enable debug logging for container startup diagnostics
Example
Server Behavior
Setup server files and stop before launching the server process. Useful for host-attached data directories.
Force re-download of the server file. Works with VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, CURSEFORGE, SPONGEVANILLA types.
Example
Server Shutdown
How long (in seconds) to wait for the server process to gracefully finish after sending the stop command
Number of seconds to delay after posting shutdown announcement to allow players to finish activities
SIGUSR1:
Console Options
Some older Spigot versions (pre-1.14) require
--noconsole when detaching stdin. Set to false for those versions.Explicitly disable GUI. Some older servers get confused and think GUI is enabled.
When RCON is enabled (default) and TTY is enabled, some server types output colorized logs and provide interactive console. Access with
docker attach and detach using Control-P, Control-Q.Network and Proxy
HTTP/HTTPS proxy host:port
Proxy host (alternative to PROXY)
Proxy port (alternative to PROXY)
Pipe-delimited list of hosts to exclude from proxying
Health Monitoring
Host address for health monitoring
Port number for health monitoring (not the same as the server port mapping)
Extra Arguments
Additional arguments passed to the server JAR file (arguments after the filename)
Example
Custom Server JAR
URL or container path to a custom server JAR. Requires
TYPE=CUSTOM.Example
The JAR is only downloaded if it doesn’t exist in
/data. To upgrade, stop the container, remove the file, and restart.Complete Example
compose.yaml