
Docker Minecraft Server: Self-Host Your Java Server in 2026
itzg/docker-minecraft-server
Docker image that provides a Minecraft Server for Java Edition that automatically installs/upgrades versions, modloaders, modpacks and more at startup
View on GitHub ↗Running a personal Minecraft server used to mean wrestling with Java configs, manual version updates, and obscure command-line options. Docker Minecraft Server skips all that nonsense by automating server setup and maintenance. Just run a container and let it handle the rest.
What This Project Does
Docker Minecraft Server is a pre-configured Docker container that handles the tedious parts of running a Java Edition Minecraft server. Instead of downloading the server JAR, manually picking a version, and wrestling with startup scripts, you spin up a container and it does the heavy lifting.
Maintained by itzg with over 13,000 GitHub stars, this project has been refined through years of actual use. The container runs on anything with Docker: your desktop, a cheap VPS, a home server, or even a Raspberry Pi if you're feeling brave.
Here's the thing - it doesn't just start a vanilla server. It can handle modpacks, modloaders like Fabric and Forge, multiple server types (Paper, Spigot, Purpur), and even automatically fetch and install mods from platforms like Modrinth.
Why You'd Actually Host Your Own
Skip the pay-to-play servers if you want full control. Running your own server means no admins nuking your base, no surprise shutdowns, and no mystery fees. Your rules, your world, your terms.
It's practical for friend groups.
You want a reliable place that's always there? Your own server beats hoping some public host stays online. Plus, mods and modpacks become genuinely approachable - no begging an admin to install that one QoL mod everyone wants. For players comparing their options, the Minecraft Server List on minecraft.how shows what public hosting looks like, but self-hosting gives you something those can't: complete autonomy.
For community-focused players, there's also the satisfaction of knowing exactly what's running. You can see the logs, tweak settings, and understand why something's lagging instead of getting vague explanations from a hosting panel.
Getting Started: Installation and Setup
Docker Minecraft Server's setup is surprisingly straightforward. You'll need Docker installed first (that's a one-time thing). After that, you're looking at either a Compose file or a single run command.
Here's the simplest version - just a basic vanilla server:
docker run -d -p 25565:25565 -e EULA=TRUE itzg/minecraft-serverThat's it. It pulls the image, starts the server, and you're live. The -p 25565:25565 maps Minecraft's default port, and EULA=TRUE skips the lengthy agreement step.
If you want something more persistent (surviving container restarts), use Docker Compose. Create a docker-compose.yml:
version: "3.8"
services:
minecraft:
image: itzg/minecraft-server
ports: - "25565:25565"
environment:
EULA: "TRUE"
MEMORY: "2G"
DIFFICULTY: "2"
volumes: -./minecraft-data:/data
restart: unless-stoppedSave that, then run docker-compose up -d. Your server data stays in ./minecraft-data/ so you don't lose progress if the container crashes.
The beauty is that every setting you'd normally hunt through config files for becomes an environment variable. Need a different difficulty? Change DIFFICULTY. Want more RAM? Tweak MEMORY. It's clean.
Features That Actually Matter
Automatic Version Management

Tired of manually upgrading Minecraft? Set VERSION=latest and it pulls the newest stable release on startup. Sounds simple, but it beats the alternative: remembering to check release notes and manually downloading JARs. The recent 2026.4.1 release continues this pattern of keeping things up-to-date with minimal fuss.
Modpack Support Out of the Box
This is where the project gets genuinely interesting. Point it at a modpack and it downloads everything - dependencies, mods, the works:
docker run -d \
-e TYPE=FABRIC \
-e CF_PAGE_INCLUDE_FILE_ALTERNATE_FILES=true \
-e MODPACK=your-modpack-slug \
itzg/minecraft-serverThe exact syntax depends on your modpack platform (Modrinth, CurseForge, etc.), but the principle is the same. No manual zip extraction or dependency hunting. It's one of the best parts of this tool.
Mod Auto-Downloads
Even without a full modpack, you can specify individual mods and it handles them. Add a mod from Modrinth, provide its ID, and it downloads automatically on startup. This saves the usual dance of hunting for compatible versions.
What Actually Trips People Up
Docker itself has a learning curve if you're new to containerization. Port forwarding, volume mounting, and environment variable syntax aren't immediately obvious. But the documentation is thorough, and the community Discord is active enough to help.
Container performance can surprise you. On Windows or Mac, if you allocate too much RAM to Docker, your system might struggle. Start conservative - 2GB is usually enough for a casual server with a few friends.
One gotcha worth noting: world saves live in a volume. If you delete the container but not the volume, your world is safe. Delete both? Gone forever. The documentation warns about this, but it's still worth a careful check before you experiment.
Server properties work differently than traditional hosting. You can't SFTP in and edit files directly. Anyone change environment variables and restart the container. It's actually cleaner once you get used to it, but the first time can feel restrictive.
How It Compares to Your Other Options
If Docker Minecraft Server isn't your style, alternatives exist. Pterodactyl is a full panel-based solution with a web UI - overkill for most people but solid if you're managing multiple servers for a larger community. Aternos offers free hosting with zero setup, but you lose control and you're limited to public servers.
For Bedrock Edition players, the same author maintains itzg/minecraft-bedrock-server using an identical approach. And if you're just looking to join an existing community server rather than run your own, the options are plentiful - plenty of established servers are out there waiting for new players.
Self-hosting isn't for everyone. But if you've ever wanted a server that's genuinely yours - no ads, no monthly fees, no admin drama - this is one of the clearest paths there.
🔗 GitHub: [itzg/docker-minecraft-server](https://github.com/itzg/docker-minecraft-server) - Apache-2.0, ★13496
