Having your own Minecraft server with Docker is great for going on online ad­ven­tures with friends in the popular block world. All you need is the right hosting en­vir­on­ment and the Docker image ‘Docker-minecraft-server’. Once you’ve got these, the in­stall­a­tion and con­fig­ur­a­tion can easily be done with Docker Engine.

Should I host a Minecraft server with Docker on my own PC or in a data centre?

If you want to play Minecraft online with others, having your own server is the best solution. By hosting the game yourself, you have total freedom when it comes to the map, game mode, dif­fi­culty, mods, etc.

In theory, you can run a Minecraft server with Docker directly on your own private computer. This will, however, put a strain on your device’s per­form­ance and comes with its own set of dis­ad­vant­ages. One of the major dis­ad­vant­ages is that the server will only be online when your computer is switched on. As soon as you turn it off, nobody else will be able to access the game’s world. On top of this, the server’s per­form­ance depends heavily on your internet con­nec­tion.

With a hosting provider, you won’t need to worry about such problems. Data centres operated by pro­fes­sion­al providers have excellent broadband con­nec­tions and modern, reliable hardware. Hosting in a data centre also means your Minecraft Docker server will be ac­cess­ible 24/7.

What are the system re­quire­ments for a Minecraft server with Docker?

The re­quire­ments for a Minecraft server with Docker are split into three parts: the re­quire­ments for the base operating system; the re­quire­ments for the Docker software and the re­quire­ments for the Minecraft server itself. While the re­quire­ments for the first two are fairly clear, the server’s re­quire­ments depend a lot on how the game is being used (number of players, size of the map, mods, etc.).

The minimum re­quire­ments are:

  • Processor: 2.8 GHz or higher (4 vCores+)
  • Memory: 8 GB
  • Hard drive: 80 Gigabyte

The typical Linux dis­tri­bu­tion (64-bit) operating systems can be used. Docker runs on CentOS 7, Debian 8 and Ubuntu 16.04 in addition to other operating systems. Microsoft systems have supported the container software (Docker En­ter­prise Engine) since 2016, however, the image ‘Docker-minecraft-server’ is currently only available for Linux dis­tri­bu­tions.

Note

The Minecraft developer Majong re­com­mends the following bandwidth 5 Mb/s for 1–2 players and up to 45 Mb/s for 6 or more players. If you decide to host your server with a provider, this shouldn’t be a problem. IONOS, for example, guar­an­tees an external broadband con­nec­tion with up to 400 Mb/s (re­gard­less of server type).

Which Minecraft Docker server options does IONOS offer?

With IONOS, you have three different options available for Minecraft Docker server hosting. These vary, among other things, in terms of their pricing and level of vir­tu­al­isa­tion.

If you rent a cloud server or a vServer (VPS) from IONOS, you will gain access to hardware resources that are com­pletely vir­tu­al­ised. The dif­fer­ence between the two is pre­dom­in­antly how you pay. With the cloud server you pay by the minute for the services you’ve used. With a vServer, you pay a fixed monthly rate for the option you’ve chosen.

On the other hand, if you choose a dedicated server, you will have access to dedicated hardware, which is just for you. This model is also billed by the minute and is, therefore, higher than the virtual al­tern­at­ives.

Tip

Rent a dedicated server from IONOS now. This will give you the perfect hardware setup to host Minecraft and Docker as well as other ap­plic­a­tions, gaming servers, online projects and more.

Three Minecraft Docker scenarios and com­pat­ible IONOS options

Before we start, all three servers from IONOS are suitable for hosting both a Minecraft Server and Docker. Which version and which pricing option is best for you depends on how you plan on using it: How many players will be logged in to the server at the same time? Will the server be online 24/7? How big is the map and are there any mods?

The table below will give you three different use cases and a suitable IONOS server option.

Minecraft Docker server use case The best IONOS option (with a Linux operating system)
Small map for 1–2 players, always online VPS Linux XL
Medium-sized map for 3–9 players, using mods, always online VPS Linux L
Large map for 10+ players, using mods, oc­ca­sion­ally or always online Dedicated Server AR6-32 SSD
Tip

New to the world of server hosting and still not sure how often and how long you want to use your dock­er­ised Minecraft setup? Rent a cloud server from IONOS and benefit from scalab­il­ity and flex­ib­il­ity.

How to set up a Minecraft server on Docker: a step-by-step tutorial

As soon as you have your hosting en­vir­on­ment set up, you can start in­stalling your own Minecraft server on Docker. In this section, we’ll explain how IONOS customers (cloud server, vServer, dedicated server) can do this. In the following example, we’ll be using the Ubuntu 20.04 operating system.

Step 1: connect to the server

The first step is to set up a remote con­nec­tion to your server. IONOS customers can easily set up a remote con­nec­tion from the Cloud Panel in their personal area using the KVM console. Here’s how to do it:

  1. Log in to the IONOS login page using your personal data.
  2. Open the section Servers & cloud.
  3. Select the server you want to use for your Minecraft Docker server.
  4. Click on Actions and Start KVM console.
  5. Log in with your per­son­al­ised server login data. You can find this on your server’s overview page under Login data (user and initial password).
Image: IONOS Cloud Panel: start KVM console
Other actions you can carry out in your IONOS Cloud Panel include re­start­ing and switching off software and hardware as well as re­in­stalling the operating system image.

Step 2: prepare the Docker index

Once you’ve logged in to your Linux server, you can open the terminal to prepare the Docker index. First, update the package index of the package manager.

sudo apt-get update
bash

The next step is to install packages that allow indexes to be opened via HTTPS:

sudo apt-get install \
	ca-certificates \
	curl \
	gnupg \
	lsb-release
bash

Use the following command to then add the official GPG key from Docker:

sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.Docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/Docker.gpg
bash

You can then prepare the index for the Docker engine:

echo \
    "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/Docker.gpg] https://download.Docker.com/linux/ubuntu \
    $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/Docker.list > /dev/null
bash

Step 3: install the Docker engine

You can now use the index to install the Docker software on your server. However, you first need to update the package index again:

sudo apt-get update
bash

The latest version of the engine (including con­tainerd and Docker Compose) can be found using the following command:

sudo apt-get install Docker-ce Docker-ce-cli containerd.io Docker-compose-plugin
bash

You can check whether the in­stall­a­tion was suc­cess­ful by running the ‘Hello world’ container:

sudo Docker run hello-world
bash

You should get a message that says the in­stall­a­tion was suc­cess­ful.

Image: Ubuntu terminal: Docker success message
Ubuntu terminal: Docker success message
Tip

You can find more in­form­a­tion about in­stalling and setting up Docker via Linux in our Docker tutorial.

Step 4: start Minecraft server on Docker container

Now that the Docker engine is running, you can start your Minecraft server using the ‘Docker-minecraft-server’ container. You can do this using the pull command for the image:

Docker pull itzg/minecraft-server
bash
Image: Pulling the Minecraft Docker container via Ubuntu terminal
Pulling the Minecraft Docker container via Ubuntu terminal

You now need to enter the following command to start the container, giving it the name ‘mc’ and setting the port number to 25565.

Docker run -d -p 25565:25565 -v /home/minecraft:/data --name mc -e EULA=TRUE --restart always itzg/minecraft-server
bash
Note

Want to host a Minecraft bedrock server? Then use the following Docker image minecraft-bedrock-server.

Step 5: enable port

Com­mu­nic­a­tion between your Minecraft Docker server occurs via the TCP port 25565. Therefore, you need to open the port so that you and other players can connect to the server. As an IONOS customer you can open ports directly in the Cloud Panel by doing the following:

  1. Log in to your IONOS login page.
  2. Click on Servers & cloud.
  3. Select the hardware which you have installed Minecraft and Docker on.
  4. In the menu on the left-hand side, click on Network and then Firewall rules.
  5. Under Advanced, set up a new rule for TCP port 25565.
  6. Click on Add rule to save the changes.
  7. Following a short setup (1–2 minutes), the port will be enabled.
Image: Port enabling in the IONOS Cloud Panel
Enabling ports in the IONOS Cloud Panel

Step 6: configure the server

Your server is now active, and you can access it at any time. The first time it’s started, it will use the standard setup saved in a file that has been auto­mat­ic­ally created. The file is named server-prop­er­ties. If you want to make any changes to the server prop­er­ties, such as the maximum number of players, dif­fi­culty or the size of the map, you can do so using this file. If you’ve started the Minecraft Docker container, as explained in step 4, you will find the file in the index ‘/home/minecraft’.

Use the following command to find this index:

cd /home/minecraft
bash

You can then open the file with the nano editor:

sudo nano server-properties
bash

From here you can edit the con­fig­ur­a­tion as you please. You can find an overview of the available para­met­ers in the following official Minecraft Wiki entry about server prop­er­ties.

Image: Minecraft server.properties file
Minecraft server.prop­er­ties file

Step 7: restart the server from the Minecraft server console

To apply the changes from the new server con­fig­ur­a­tion, you need to end your current session. You can easily do this using the Minecraft server console. This is where you can, for example, kick other players off the server, send general messages or otherwise influence the game and map.

To access the Minecraft console remotely the remote protocol RCON is activated as standard. You can use the following command to manage the console:

Docker exec -i mc rcon-cli
bash

To end the current server session, use the command ‘stop’. Your Minecraft Docker server will then restart auto­mat­ic­ally with the new settings.

Tip

You can get an overview of all the commands used in the Minecraft console by using the command ‘help’. The article on commands in the Minecraft Wiki also provides a good overview.

Step 8: connect the Minecraft Docker server

As soon as the server has restarted, you can begin your online adventure. Start your Minecraft client and select Mul­ti­play­er. Click on Direct con­nec­tion and enter your personal server address into the field. Enter your port number, sep­ar­at­ing the two with a colon. It should look as follows:

IP-Address:25565
bash

Then click on Join Server.

Image: Minecraft screenshot (Java Edition): Join server
Minecraft screen­shot (Java Edition): Join Server

After a short load time, the server will be active, and you and your buddies can develop your colourful, blocky world to your hearts’ content.

Image: Minecraft screenshot (Java Edition): new map
Minecraft screen­shot (Java Edition): on your new server, you can begin the game as usual without items, etc.
Tip

Want to have a Minecraft server for lots of players or run parallel servers? Or maybe you want to use your hosting en­vir­on­ment for more than just Minecraft and host other programs too? If you choose a dedicated server from IONOS, you’ll always have enough computing power for a large range of projects.

Go to Main Menu