Skip to content

Setting up a Minecraft Server in Docker on a Synology NAS

In this guide I am going to take you through the steps to get a basic Minecraft server up and running. We will be using DSM6 and the latest version of Docker at the time of writing.

Downloading the Container

Open up Docker within DSM and navigate to the ‘Registry’ tab and search for ITZG in the keyword box.within the results right click and download the ‘ITZG|Minecraft-Server’, When it asks which version number to download choose whichever version you want for the server. It allows you to choose ‘latest’ to pull the latest and greatest server version, or has some specific versions if you want them.

Search and Download
Select the version

PUID and PGID

In order for the Docker container to access the shares on the NAS we need to give it the same permissions as a user who has access to those shares, we achieve this by associating the correct Personal User ID and Personal Group ID to the container.

You will need to SSH into your Diskstation using ‘Putty’ or an equivalent program.

Open up Putty, the only thing you need to enter is the IP address of your NAS and select the SSH radio button.

SSH into your Synology to find out your ID’s

Click on open, you will get a prompt asking if you trust the key, if this is the first time you have used SSH, just press OK or accept.

Enter the login information for your Synology user account, you will not be able to see the password as you type it, I use a very long one so I just paste it in from my password manager. (right click acts as paste in Putty)

Once logged in type ‘id’ without the quotes and this will show your UID(aka PUID) which in my case is 1026 and the GID(aka PGID) which is 101 for an administrator. Make note of these values as we will need them later.

Command to get the ID’s

Setting up the container

Now we have downloaded the container and got hold of our user IDs we can move onto the next stage, where we will configure the Docker container. First go back into Docker and click on the ‘Image’ tab, in the list of your containers select the ITZG minecraft server, and click on ‘Launch’

Time to start

You will be greeted with the initial setup screen, this is where you can start specifying some of your preferences. As this is a Minecraft server it will likely use as much memory and CPU usage as you allow it, if you are running the server on a lower specification NAS you will probably want to set limits around the CPU priority and memory usage to ensure DSM is still usable when the server is running. In this case I am leaving this as the defaults, you can always come back and tweak these settings later once the server is setup.

The initial setup screen

Next up we are going to setup some of the ‘advanced’ settings so click on the ‘Advanced’ button.

Advanced Tab

On this first tab you can decide if you want to create a shortcut to the server on the DSM desktop and also if you want the server to start up automatically if you ever restart the NAS, this is useful if you don’t want to login to manually startup the server.

Advanced Settings

Volume(s)

In the next tab we need to setup where we want the various Minecraft world files to reside, having these outside of the container will mean you can make backups of the entire server, great if someone decides to flood the map with Lava.

Personally, I setup folders for each of the  containers I am running in the default Docker directory as this keeps things nice and tidy. We are  going to mount a single directory for this container, the internal “/data” directory to the NAS “/docker/minecraft” seen the screenshot to see exactly how this is laid out.

Specify where you world files should reside

Network

You do not need to adjust and settings in this tab.

Port Settings

By default docker will automatically assign external ports to your Docker container, however we will never know what they are until the container is launched and also they may change upon a reboot, so we will need to assign some specific ports. In the case of this container Minecraft uses high value port number so it’s unlikely to clash with any other containers or ports already used by DSM. So we are just going to enter the same port numbers on the left hand column.

Assign your ports

Enviroment Variables – PGID , PUID and EULA

We can now enter the details obtained earlier on in the guide for the PGID and PUID, if these settings are incorrect it will result in the Docker containers internal user not being able to see the shares we specified and the world files and other server settings will not appear in the folder.

In addition to this we have to accept the Minecraft EULA so you will add an additional variable called EULA with the value set to TRUE.

Setting your variables

You have now completed the hard part of the guide, click on OK and you will be taken back to an overall summary screen, this is just a summary of the settings you have entered, just do a quick sanity check to make sure they are correct. if you want to launch the server immediately check the box and click on finish.

Final summary page

Server startup time

The first time the server is launched it may take a few minutes to start as the files are downloaded and the world in generated, this time will depend on how fast your Synology performs, you can track the progress by going into the ‘Containers’ tab and clicking on details, and then either viewing the terminal or log tabs.

You will just need to enter your server settings into your Minecraft settings screen and join, you can make amendments to the servers settings from within the folder you used to store it’s files as well as installing any mods you want.

If you get something setup ping me an invite and I will come and play!

Published inDockerGamingMinecraft

12 Comments

  1. Pedz Pedz

    Ugh… Docker fails to start the container properly. 🙁 The LOG says that we must accept the EULA. Any idea how do we do this?!

    • Pedz Pedz

      Must add another environment variable:

      EULA variable must be set to TRUE

      Then it works! 🙂

      Thanks for the tutorial!

      • Dr_Frankenstein Dr_Frankenstein

        Hey, not sure how I managed to miss this. Now I know why I couldn’t update my son’s server! the guide has been updated.

  2. Pete Pete

    Excellent thanks!! I managed to setup a server without too much hassle. Now to the next thing.
    Any guide available on how to install mods with this setup? Having severe issues figuring it out…

  3. Kevin Kevin

    Thank you for the tutorial! Was very informative and easy to follow with no problems during setup. I’m using the DS1815+ NAS and this was able to run. My kids will appreciate it!

  4. George Staver George Staver

    I also have this up and running. However, I cannot locate the config files. I have the mount point setup but I cannot see any folders or files. Can you help? Thanks.

  5. David Hahn David Hahn

    Just wanted to hop in here and give you a HUGE “thank-you” for the walkthrough, Dr_Frankenstein. Docker has definitely been the most confusing thing to learn while playing with my DS916+ and you made it a breeze to get everything set up. Running a very happy little server for my pals now.

  6. L-Dub L-Dub

    Ok, I will admit it, I am a rookie and I am missing something. I believe that I have set everything up ok on the server side 916+ (I think). However I cannot get logged on to the game. I have tried connecting via my windows 10 computer and via ipad, and I get the same “unable to connect to world” error Truth be told we really want to connect using Ipads using PE. So I hope this is possible.

    Logs on the server seems to indicate that the world is prepared, as the logs report that it completes preparing the spawn area and logs states that they are “starting remote control listener”

    Keeping it simple, when attempting to log in, the server name is just the server name correct? The server address is just the local server IP address, and the Port is 25565?

    Also, to get Putty to work, I needed to enable the SSH service on port:22 is that the right thing to do? till I get some answers I have disabled it.

    Any constructive ideas or comments would be most appreciated.

    Cheers

    • Dr_Frankenstein Dr_Frankenstein

      Hey L-Dub it sounds like you are trying to connect with versions of the game that are not compatible with the server, this version of the server is for the original Java PC version of Minecraft, you will find the ‘Windows 10 Edition’ on the windows store is actually a port of Minecraft pocket used on iPad/Android.

      You are doing everything correctly.. try using the Java version of the game

      • L-Dub L-Dub

        Great feedback says the rookie. I think we have to much invested in the other versions….Win10/ X-Box, and I-pads. I will socialize with the project manager (my 8 year old), see what she says. Even though I haven’t tried with the X-box I assume that it will have the same issues.

        The only feedback I can give is that I needed to find some basic info on the use of putty, otherwise this was a great instruction set.

        Thank you

  7. elHacko elHacko

    Hi,
    how about performance of MC server on synology?
    Anyone already had about 6 to 10 players online running?
    I think about using my 216+ (8GB RAM).
    Regards,

    Michael

  8. Matt Matt

    Thanks very much for the thorough explanation! I am a complete Docker/NAS noob, so apologies in advance. I have the server up and running on a 713+, but am having issues with timeout on the client side. In the server logs, I note messages along the following that eventually lead to the server shutdown:
    [Server thread/WARN]: Can’t keep up! Did the system time change, or is the server overloaded? Running 31499ms behind, skipping 629 tick(s)
    Any ideas on how to remedy? Thanks again.

Leave a Reply

Your email address will not be published. Required fields are marked *