Skip to main content
The VERSION environment variable controls which Minecraft server version is installed and run. This variable is case-sensitive and supports multiple version types.

Version Types

The VERSION variable accepts the following values:
  • LATEST - Latest stable release (default)
  • SNAPSHOT - Latest snapshot version
  • Specific version number (e.g., 1.7.9, 25w35a, 26.1, 26.1-snapshot-1)
  • Alpha/beta versions (e.g., b1.7.3)
When using alpha or beta versions, the server download might not exist for all versions.

Setting the Version

docker run -d -e VERSION=SNAPSHOT \
  -e EULA=TRUE \
  itzg/minecraft-server

Automatic Updates

When using LATEST or SNAPSHOT, the server automatically upgrades when a newer version is available:
1

Stop the container

Stop the running Minecraft server container.
2

Restart the container

Restart the container to trigger the version check.
3

Download occurs

If a newer version is available from the respective release channel, the new server jar file is automatically downloaded and used.

Version Examples

Version TypeExample ValueDescription
Latest releaseLATESTMost recent stable version
Latest snapshotSNAPSHOTMost recent development snapshot
Specific release1.20.4Exact release version
Snapshot25w35aSpecific snapshot build
Modded version26.1Forge/Fabric version number
Beta versionb1.7.3Classic beta version

Managing Old Server Jars

Over time, older versions of the server jar may accumulate in the /data directory. It is safe to remove these old jar files manually.
When upgrading versions, the container preserves old jar files. You can clean them up:
# Enter the container
docker exec -it mc bash

# Remove old server jars (keep the current one)
cd /data
ls -lt *.jar
# Manually remove old versions

Version Compatibility

Different Minecraft versions require different Java versions. See the Java Version Selection page for compatibility information.
Always check that your chosen Minecraft version is compatible with the Java version in your container image tag. Mismatched versions will cause startup failures.

Build docs developers (and LLMs) love