Skip to content

Minecraft (Java) Server in Docker on a Synology NAS

Added Docker Compose details03/05/2021
Updated to show which version of the image to download09/06/2021

In this guide I am going to take you through the steps to get a Minecraft server up and running. This applies to both a Vanilla and modded server.

We will be using DSM6 and the latest version of Docker at the time of writing. The server I run is now open to anyone who want’s to play, its usually up and running most of the time. You can see its status in the widget on the left of this page 🙂

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 select the one that you require.

Minecraft VersionTag to Select
v1.17 and upLatest
v1.16 and belowJAVA15
Search and Download

Setting up a Docker User for Minecraft and Obtaining the PGID and PUID

In previous versions of this guide we used your default admin account for each container, this is not very secure so please now follow the separate setup guide and then head back here.

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 Synology machine 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 other parts, 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 your Syno, this is useful if you don’t want to login to manually startup the server.

Advanced Settings


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


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

Environment Variables – PGID , PUID, Server Type and EULA

We are now going to set up the specific options for the server including what type of server you would like to run and even a specific version.

*Please note that you must not change the UID and GID options in the first red box.

First up Click on the + sign at the top of the options page, in the ‘Variable’ box type PGID and enter the value you obtained earlier, repeat this step for the PUID. (See screenshot)

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.

You can now specify the type of server you would like to run by amending the value next to the TYPE variable.


If you want to run a specific version of the server you can amend the VERSION variable from LATEST to for example 1.13

*Please note the screenshot below has been updated, as you can see after you run the server for the first time a lot of additional variables are automatically added. Ignore the GID and UID towards the top of this screenshot we only need to fill in the items at the bottom!

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.

All other server settings can be configured using the standard Minecraft file, I won’t be covering that here as there are extensive other guides out there.

Docker Compose

You can use the below code saved as minecraft.yml to do the entire process above in one quick command via SSH.

version: "3.2"
    image: itzg/minecraft-server:java15
    container_name: minecraft
      - JVM_XX_OPTS=-XX:+UseG1GC
      - MEMORY=2G
      - LEVEL=world
      - PVP=true
      - DIFFICULTY=easy
      - ENABLE_RCON=true
      - RCON_PORT=25575
      - SERVER_PORT=25565
      - ENABLE_AUTOPAUSE=false
      - EULA=TRUE
      - /volume1/docker/minecraft:/data:rw
      - 25565:25565/tcp
      - 25575:25575/tcp
    restart: unless-stopped
sudo docker-compose -f /volume1/docker/minecraft.yml up -d --remove-orphans

Throw me some bits

If you have found my site useful please consider pinging me a tip as it helps cover the cost of running the site, it could even buy me a beer 🙂

  • Bitcoin
  • Ethereum
  • Tether
  • Xrp
  • Polkadot
  • Binance coin
  • Litecoin
  • Bitcoin cash
  • Dogecoin
  • Tron
  • Monero
  • Omisego
Scan to Donate Bitcoin to bc1qfznx5kxad9k9z5t9y79mkm9ukfexan9a6wrzl0

Donate Bitcoin to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin

Scan to Donate Ethereum to 0x162fc7781D3C6c6f27197A3A92567b5DAF258f19

Donate Ethereum to this address

Scan the QR code or copy the address below into your wallet to send some Ethereum

Scan to Donate Tether to 0x162fc7781D3C6c6f27197A3A92567b5DAF258f19

Donate Tether to this address

Scan the QR code or copy the address below into your wallet to send some Tether

Scan to Donate Xrp to rKGpNHetksTn4dgwgpiTkg8JM4uJ3J6pam

Donate Xrp to this address

Scan the QR code or copy the address below into your wallet to send some Xrp

Scan to Donate Polkadot to 153iRH61nXQZUXMveZxCmYyzjf1cWYVnxpHpfifoNchQuXbY

Donate Polkadot to this address

Scan the QR code or copy the address below into your wallet to send some Polkadot

Scan to Donate Binance coin to bnb14ye5rju74u5ythneaum2rjvp8eqep6wq8flghx

Donate Binance coin to this address

Scan the QR code or copy the address below into your wallet to send some Binance coin

Scan to Donate Litecoin to LfNfer3aSqLx4p8KfbbkT96ArXLXLDPxoD

Donate Litecoin to this address

Scan the QR code or copy the address below into your wallet to send some Litecoin

Scan to Donate Bitcoin cash to qrc7scd2drzsd7kywpsjfklvkmm26fqc2vd7uyvdx9

Donate Bitcoin cash to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin cash

Scan to Donate Dogecoin to DCwbNzfYHx22MDSyEVLWgfjxziYHtcgwAM

Donate Dogecoin to this address

Scan the QR code or copy the address below into your wallet to send some Dogecoin

Scan to Donate Tron to TL1Q3vY9mHnDMedHRyU8ERUAY8SzJ4FXiV

Donate Tron to this address

Scan the QR code or copy the address below into your wallet to send some Tron

Scan to Donate Monero to 45qwFr42XiA8egC5z2HdSQ2FzzP9VR1MvD5Sicg4EhGvdvTutx9GsF6DeU8DHAsTZy2ShBERjCB5rdy8iQ9CFnFu9Z6Adgw

Donate Monero to this address

Scan the QR code or copy the address below into your wallet to send some Monero

Scan to Donate Omisego to 0x162fc7781D3C6c6f27197A3A92567b5DAF258f19

Donate Omisego to this address

Scan the QR code or copy the address below into your wallet to send some Omisego

Published inGamingMinecraft


  1. Ash Ninja Ash Ninja

    I may be being stupid here but I can’t for the life of me find the folder with data in it? I’ve gone to where I gave mount folder access and there is nothing there.. Interestingly on the terminal tab “bash” it says “root@MinecraftServer/data”. Is this saved in my root folder which I can’t access with file explorer, and if so why has it not saved in the correct location? Is there anything I can change to fix this

  2. Ash Ninja Ash Ninja

    Hello, I have just tried this and it gives me the error: Unsupported Java detected (60.0). Only up to Java 15 is supported. However I can’t choose a lower version of Java so this doesn’t work? I’ve tried amending the enviromental value to JAVA_VERSION but doesn’t seem to make a difference? Please help

    • Dr_Frankenstein Dr_Frankenstein

      It looks like something has changed with the Docker image as mine is doing the same thing! Give me a mo while I see what changed…

    • Dr_Frankenstein Dr_Frankenstein

      OK fixed it, it looks like you will need to grab the ‘JAVA15’ version when downloading the server image… I have updated the first steps of the guide to show this… I assume the latest tagged version is now using a version of Java we don’t have…

  3. Wayne Wayne

    the artcle is called, “Minecraft (Java) Server in Docker on a Synology NAS (Including Mods)” I dont see any advise on the mods…

    • Dr_Frankenstein Dr_Frankenstein

      You should be able to drop them in to the appropriate folder. Including plugins. I have a few plugins running on my own server.

      • Wayne Wayne

        Would you mind being more specific please? Which folders for plugins and which for mods, also which client do you use to connect to the server?

  4. Daniel Daniel

    I followed this method, but I’m unable to get the server to start. The error message I get in the log is “curl: (6) Could not resolve host:”

    From googling around, I’m aware this may be due to DNS settings. But I cannot find any reliable source of information to resolve the issue.

    • Wayne Wayne

      Set the server to offline mode and try that, it should reuire external DNS if its local.
      Go to Docker folder on your NAS and open “” and and make “online-mode=false”

      • Daniel Daniel

        Just restarting repeatedly generating the same error. I’ve double checked the firewalls and port forwarding settings. DNS set to auto in the router. So I have no clue what else to do.

        • Dr_Frankenstein Dr_Frankenstein

          Have you tried running the container in network host mode… Set it up again and on the Network tab tick the ‘Use the same network as Docker Host’

          • Daniel Daniel

            Thanks, that worked. Almost there. Server is up and running now, but I’m unable to discover it from Minecraft on an iPad connected to the same network. Tried to add it both with local and external IP addresses, and ensured that port 25565 is still forwarded, but not able to ping the server.

          • Dr_Frankenstein Dr_Frankenstein

            The ipad is using the bedrock version not Java. You will have to use a Bedrock server container instead.

    • Patrick Patrick

      I have the same problem “Could not resolve host.” I have Synology DSN Server installed and it seems it may have to do with that, although I am not clear what the problem is.

      There are various answers online where –dns was added to command line invocation of Docker. However, I haven’t found out how I could fix this through the Synology GUI, such as if an equivalent fix would be possible through an environmental variable.

  5. Tim Tim

    I have the forge server running on the NAS and can connect to it directly using my internal IP but I am not sure what the NAS’ external IP is because the external IP I was using from my PC isn’t finding the server anymore. Any ideas on how to either find the NAS’ external IP (if it is in fact somehow different than the one I was using from my PC) or on what the problem is?

    My first thought was port forwarding but that’s already functioning since I was just running the server from this router last night..

    • Tim Tim

      Addendum, I realized maybe the problem was that the server didn’t have a static IP so I fixed that but still no avail. Now when I try to join the server it just more quickly says “cant connect to server”

      • Tim Tim

        And final addendum, I got minecraft to recognize the server through some fiddling with NAS port forwarding and settings (yay!) but it says it is an outdated server so will just try to see what’s going on there but seems like I got it mostly fixed! I’ll keep these up here for others to see.

    • Tim Tim

      OKAY so final step, but actual problem identified: server is successfuly recognized, I can click to join but when I do I get this error message:

      “Authentication servers are down. Please try again later. Sorry!”

      Is that a problem with my docker settings or something out of my control?

      • Dr_Frankenstein Dr_Frankenstein

        Sounds like it’s the auth servers?

        • Tim Tim

          That’s what I thought but I’m able to join other public servers, like Hypixel, so I think it’s something with my docker server? I can also join the server if it’s hosted on my PC :/

          I just don’t know what setting in the properties could be causing the server to be viewable, joinable, but not authenticatable

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.