How to Install Minecraft Java Server on Your Synology NAS

How to Install Minecraft Java Server on Your Synology NAS

Minecraft servers allow players to play online or via a local area network with other people. Internally, the game runs a server for single-player games. If you want to run a Minecraft multiplayer server by yourself, then you have come to the right place. After many requests from Minecraft fans, I’ve created installation instructions for Synology NAS. In this step by step guide I will show you how to install Minecraft Java Server on your Synology NAS using Docker & Portainer.

Note: This guide works perfectly with the latest Minecraft Java Server 1.19.2 release.

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

Install Portainer using my step by step guide. If you already have Portainer installed on your Synology NAS, skip this STEP. Attention: Make sure you have installed the latest Portainer version.

  • STEP 3

Go to File Station and open the docker folder. Inside the docker folder create one new folder and name it minecraftjava. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Minecraft Java Server Synology NAS Set up 1

  • STEP 4

Log into Portainer using your username and password. On the left sidebar in Portainer, click on Stacks then + Add stack. Follow the instructions in the image below.

1 Synology Portainer Add Stack

  • STEP 5

In the Name field type in minecraftjava. Follow the instructions in the image below.

Note: Copy Paste the code below in the Portainer Stacks Web editor.

version: "3.8"
services:
  minecraft:
    image: itzg/minecraft-server
    container_name: minecraftjava
    environment:
      - UID=1026
      - GID=100
      - TYPE=PAPER
      - SERVER_NAME=MARIUSHOSTING
      - JVM_XX_OPTS=-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15
      - MAX_MEMORY=4G
      - EULA=TRUE
    volumes:
      - /volume1/docker/minecraftjava:/data:rw
    network_mode: host
    restart: always

Note: Before you paste the code above in the Web editor area below, change the value numbers for UID and GID with your own values. (Follow my step by step guide on how to do this.)
Note: Before you paste the code above in the Web editor area below, change the value for TYPE and add your favorite Server type from the following list: VANILLA, BUKKIT, SPIGOT, PAPER, TUINITY, MAGMA, MOHIST, CATSERVER, CURSEFORGE, SPONGEVANILLA, FABRIC. In the example above I have used the PAPER server; you have to choose your own favorite server type.
Note: Before you paste the code above in the Web editor area below, change the value for SERVER_NAME and add your own server name. MARIUSHOSTING is an example of a server name; you have to add your own server name.

1 Minecraft Synology NAS Set up

  • STEP 6

Scroll down on the page until you see a button named Deploy the stack. Click on it. Follow the instructions in the image below. The installation process can take up to a few minutes. It will depend on your Internet speed connection.

2 Minecraft Synology NAS Set up

  • STEP 7

If everything goes right, you will see the following message at the top right of your screen: “Success Stack successfully deployed“.

3 Minecraft Synology NAS Set up

  • STEP 8

Go back to STEP 1 or you will deal with karma 🙂

  • STEP 9

Wait approximately 1-2 minutes, then try to access your own server via the Minecraft java edition. Go to Direct Connect, then add your NAS Local IP followed by :25565 and click Join Server. Follow the instructions in the image below.

Minecraft Java Server Synology NAS Set up 6

Note: If you want to run the Minecraft Java Server container over HTTPS, check my guide on How to Run Docker Containers Over HTTPS. Remember to port forward ports on your router pointing to your NAS to make it accessible externally.

Note: Find out how to update the Minecraft Java Server container with the latest image.
Note: Can I run Docker on my Synology NAS? See the supported models.
Note: How to Free Disk Space on Your NAS if You Run Docker.
Note: How to Schedule Start & Stop For Docker Containers.
Note: How to Activate Email Notifications.
Note: How to Add Access Control Profile on Your NAS.
Note: How to Change Docker Containers Restart Policy.
Note: How to Use Docker Containers With VPN.
Note: Convert Docker Run Into Docker Compose.
Note: How to Clean Docker.
Note: How to Clean Docker Automatically.
Note: Best Practices When Using Docker and DDNS.
Note: Some Docker Containers Need WebSocket.

This post was updated on Thursday / September 8th, 2022 at 1:10 PM