How to run a Minecraft server in Docker
- GamingServers

- Jul 2
- 2 min read
With the popular itzg/minecraft-server image

Running a Minecraft server in Docker is an easy and efficient way to isolate your server without having to install Java and set things up manually. The most commonly used image for this purpose is itzg/minecraft-server, which gives you full control, automatic EULA acceptance, and easy setup.
🪟 How to run Minecraft server in Docker on Windows
If you're using Windows, you can still easily host a Minecraft server with Docker. Here's a quick guide on how to get started:
🔧 Step-by-step: Minecraft in Docker on Windows
1. Install Docker Desktop for Windows
Go to https://www.docker.com/products/docker-desktop and download Docker Desktop. Follow the installation instructions.
📌 Requirements: You must have Windows 10/11 Pro or enable WSL 2 (Windows Subsystem for Linux).
2. Open a PowerShell terminal
Search for PowerShell or Terminal and open it as administrator. 3. Run the following command:
docker run -d -p 25565:25565 --name minecraft-server `-e EULA=TRUE ` -e MEMORY=2G ` -v C:\minecraft-data:/data ` itzg/minecraft-server✅ Remember: You can change the path C:\minecraft-data to another location where you want to save world data.
4. Check that the server is running
Go to Docker Desktop, where you can see the "minecraft-server" container running.
5. Connect to your server in Minecraft
Launch Minecraft and connect to:
🔧 How to get started on Ubuntu
Install Docker
If you don't already have Docker installed on an Ubuntu machine, you can do so with:
sudo apt update
sudo apt install docker.ioStart your server with one command:
sudo docker run -d -p 25565:25565 --name minecraft-server \
-e EULA=TRUE \
-e MEMORY=2G \
-v /minecraft/data:/data \
itzg/minecraft-serverThis command does the following:
Accepts Mojang's license terms (EULA=TRUE)
Gives the server 2 GB of RAM
Stores world data in /minecraft/data on your host
Running Minecraft on port 25565
Customize your server
You can easily add more environment variables such as DIFFICULTY, WHITELIST, OPS, SEED, VERSION, etc. Example:
-e VERSION=1.20.1 -e DIFFICULTY=hardStop and restart:
sudo docker stop minecraft-server
sudo docker start minecraft-serverAdvantages of Docker
Fast and consistent setup
Easy backup and migration of server data
Full isolation from the rest of the system
🎮 Why choose GamingServers instead of hosting yourself?
While setting up your own Minecraft server with Docker is exciting, it requires technical knowledge, time, and maintenance. At GamingServers, we've made it easy for you. We take care of all the hard work so you can focus on playing.
Our hosting is perfect for:
Parents who want to give their children a secure and fast Minecraft server without messing with the technology themselves
Young gamers who just want to play with their friends – without lag and setup issues
Schools and clubs that need stable and user-friendly game hosting in Europe
✅ You get with GamingServers:
100% hosted in Europe for low ping and high speed
No need for technical knowledge – we handle it all
Our own user-friendly control panel , designed specifically for Minecraft and other popular games
Stable servers on dedicated hardware , not shared VPS (Virtual Machine)
No commitment – you only pay one month at a time
Danish support and transparent service
🎯 GamingServers is for you who want the easy and professional choice - without compromising on performance.




Comments