Getting started
Run a Minecraft server in Docker in one command with the prebuilt server images, and switch on the bundled mods and plugins with one environment variable.
Run a prebuilt Minecraft server image with one command. Mods and plugins are already inside the image and are switched on with an environment variable, so the container never downloads anything when it starts.
Pick an image
Each server has its own image. Fabric, NeoForge, Paper and Pumpkin are available:
| Server | Image | Newest tag | Selection variable |
|---|---|---|---|
| Fabric | ghcr.io/hambn/minecraft-server-fabric |
26.3 |
MODS |
| NeoForge | ghcr.io/hambn/minecraft-server-neoforge |
26.2 |
MODS |
| Paper | ghcr.io/hambn/minecraft-server-paper |
26.2 |
PLUGINS |
| Pumpkin | ghcr.io/hambn/minecraft-server-pumpkin |
26.3 |
PLUGINS |
Every image has one tag per Minecraft release, for example ghcr.io/hambn/minecraft-server-paper:26.2. Only the tags listed on the overview and image pages are published. A release marked pending is a newer Minecraft release that server has no stable build for yet, so there is no image to pull. See tags and updates.
Run with Docker
docker run -d --name mc \
-p 25565:25565 \
-v mc-data:/data \
-e EULA=TRUE \
-e MEMORY=4G \
ghcr.io/hambn/minecraft-server-paper:<version>
Replace <version> with a published Minecraft version tag, for example 26.2. The versions differ per image; each image page lists its own.
-p 25565:25565exposes the Minecraft port.-v mc-data:/datakeeps the world, configuration and logs. Without a volume the world is lost when the container is removed.-e EULA=TRUEaccepts the Minecraft EULA. The Java servers (Fabric, NeoForge, Paper) refuse to start without it. Pumpkin does not use it.
The container runs as UID 1000. When you bind-mount a host directory instead of a named volume, make it writable by that user:
mkdir -p ./data && sudo chown 1000:1000 ./data
docker run -d -p 25565:25565 -v "$PWD/data:/data" -e EULA=TRUE ghcr.io/hambn/minecraft-server-paper:<version>
Follow the log and stop the server cleanly:
docker logs -f mc
docker stop -t 120 mc
The server saves the world on SIGTERM, so give it time to stop.
Run with Docker Compose
services:
minecraft:
image: ghcr.io/hambn/minecraft-server-paper:26.2
ports:
- "25565:25565"
environment:
EULA: "TRUE"
MEMORY: "4G"
volumes:
- minecraft-data:/data
stop_grace_period: 2m
restart: unless-stopped
volumes:
minecraft-data:
Save it as compose.yaml and run docker compose up -d. The Docker Compose guide covers mods, memory limits, several servers, updates and backups.
Enable mods or plugins
Everything bundled in an image is inactive until you select it. Fabric and NeoForge read MODS, Paper and Pumpkin read PLUGINS. Both take a comma-separated list of IDs:
docker run -d -p 25565:25565 -v mc-data:/data -e EULA=TRUE \
-e MODS=lithium,ferrite-core \
ghcr.io/hambn/minecraft-server-fabric:<version>
The IDs you can use for each image and Minecraft version are listed on that version’s page, which is linked from the overview. See mods and plugins for the rules.
Next steps
- Configuration lists every environment variable.
- Mods and plugins explains selection, dependencies and rejected entries.
- Tags and updates explains how to follow a version safely.