DSM 7.1 Running Minecraft server in Docker

Currently reading
DSM 7.1 Running Minecraft server in Docker

300
54
NAS
DS923+ (16GB)
Router
  1. RT6600ax
Operating system
  1. Windows
I'm trying to run a Minecraft server in Docker (itzg-minecraft-server) for my kids.. I'm a bit of a newbie on this though.. The Minecraft server seems to consume about 30% CPU on my DS918+ even though no player is connected to the server.. Is this behaviour expected?
I've checked the log for the docker image while running it and can't see anything out of the ordinary..

EDIT: Logs says RCON running on 0.0.0.0:25575 which might look a bit strange..?
 
Is this behaviour expected?
pretty much, yes. You are running a server platform so it will have a penalty

Logs says RCON running on 0.0.0.0:25575 which might look a bit strange..?
It only means that its running on your NAS LOCAL IP address on port 25575
 
If the container uses the
  • bridge network:
    • 0.0.0.0 binds to all network interfaces of the container
    • requires a port mapping between host port and container port to be accessible by any ip of the nas:host port
  • host network:
    • 0.0.0.0 binds to all network interfaces of the host
    • container is directly reachable by any ip of your nas:container port
 
The CPU got better after a few minutes. But I can't connect to the server (Minecraft can't find it). I've done some portforwarding but is there more to it (because I'm running this in Docker)?
 
Last edited:
How do I get it running?
I've configured the serversettings in Minecraft to use port: 25575 (19132 was entered here as default).
This port (and 25565) is portforwarded to my NAS (TCP).
Found a guide on youtube using port 19132 but I can't follow the guide cause it won't allow me to use both udp/tcp for that port in the Docker UI... It's a mess really..
Ideas anyone?
 
This stuff is for my kids and they want their pals to be able to connect so, yes, It's on the router.
I've been messing around with this alot so.. I'm not sure about the values anywhere now.
1652112937214.png

1652112956309.png
 
This is the example command from docker-minecraft-server/README.md at master · itzg/docker-minecraft-server:
Code:
docker run -d -it -p 25565:25565 -e EULA=TRUE itzg/minecraft-server

I assume you didn't touch anything except modyifying the port mapping?
Make sure SERVER_PORT is the same ports, as the container port in your port mapping. Please understand this as: revert everything to its defult value unless you fully understand why and how to use custom values.

Additionaly I would add the EULA variable with the value TRUE
 
Last edited:
None of both.
Please use 25565/tcp, as its the port used in the default configuration.
-- post merged: --

Just for the sake of testing I pulled the image and started a container from it.

The port mapping dialog already pre-populates the correct container ports that are declared in the Dockerfile:
1652114866562.png

I am not sure why you changed the container port to something else - this should only be done by experts that actualy understand how to make the application inside the container run on the same port as the modified container port.

Make sure to set the "Local port" from auto to the same port as the container port and things will work. Ofc you still need the EULA=true.
 
Last edited:
Ok, I've done this. there a SERVER_PORT variable in advanced settings/environment. Do I need this and if so, what should it be? Also, RCON_PORT, do I need this?
Which ports should be specified in server settings in Minecraft? 25565 or 25575?
 
You're absolutely right, I don't know what most of them do. :) But since I can't connect to the server, I'm experimenting here if anyone of those are related to the problem.
Most guides I've found related to this, specifies different ports, different protocols (TCP/UDP), it's a mess to follow for a newbie really..
 
Last edited:
Actualy it's better to stick to the image description and understand how to translate the example commands to Syno UI configuration.

The commands generaly follow this format: docker run {container options} imagename.
Usualy translating the -p, -e and -v parameters into Docker UI configuration is sufficient:
  • -p (used to publish container ports to host ports)
    • the left hand side before the colon is the host port (called "Local Port" in the UI) and can be choosen freely
    • the right hand side after the colon is the container port, which should NEVER be changed unless you know why and how. The Syno UI usualy prepoulate those already with the correct values (if EXPOSE is declare in Dockerfile).
  • -e (environment variables used to influence the behavior/configuration of the container)
    • the left hand side before the equal character is the variable name - use them litteraly as written in the description
    • the right hand side after the equal characater is the value - set it according your needs
  • -v ( used to map a host path into a container path - required to permanently persist state ):
    • the left hand side before the colon is the host path and can be choosen freely
    • the right hand side after the colon is the container path, which should take as seen in the NEVER be changed unless you know why and how. The Syno UI usualy prepoluates them with the correct values (if VOLUME is declared in Dockerfile).
Though, the example commands usualy show the most simple command to get a container up and running. So you will have to read what ports and volumes need to be mapped and what environment variables exist to configure the container to not miss out on something.

This is me trying to teach you how to catch a fish.

You picked a container that is very simple to start without customizations and persistance(!), but has a million environment variables in place to configure the container. So it'S probably not the best pick for establishing understanding for docker...
 
Last edited:
Just to add here the 19132 port is for Minecraft Bedrock edition, not the Java edition which uses port 25565.

Use the correct port for the correct Minecraft version - if it doesn't explicitly mention Bedrock it's likely the Java edition. The container itzg/docker-minecraft-server that one-eyed-king mentions above is the Java version. itzg/minecraft-bedrock-server is the Bedrock version.

Generally you'd use one or the other, depending on which devices you are using to play Minecraft. More info at https://www.minecraft.net/en-us/article/java-or-bedrock-edition
 
Thanks alot! I've mixed these up. I use the Bedrock-edition now and everything works almost instantly!

So people can connect to your Minecraft server, running inside a Docker container, on your Synology? Because I cannot connect to any server (minecraft or any other service) running inside of docker on my NAS from the internet. I have firewall enabled and also port forwarding.
 
So people can connect to your Minecraft server, running inside a Docker container, on your Synology? Because I cannot connect to any server (minecraft or any other service) running inside of docker on my NAS from the internet. I have firewall enabled and also port forwarding.
Do you have firewall rule that allows for docker subnet to “talk” to your host (nas) subnet? Or maybe you have a fw rule that blocks it?
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

How did you create the Portainer container in first place? As in exact docker run commands or in case...
Replies
7
Views
1,175
Thank you for this - I'll give it a go and see where I get - worst case I learn something as I go!
Replies
6
Views
1,419
  • Question
1707646023 Old post!! But I have the same isue. To enable the portal, I go into Container Management...
Replies
7
Views
9,665
ye, feels like routing issue. Internet connection is working until tunnel is up. After that tunnel seems...
Replies
26
Views
4,763
I have published result of my research as a blog at SVN для NAS под Synology DSM 7.2. Записки Linux...
Replies
48
Views
14,393
@DeltaGolf Here’s my approach: Docker - NextCloud on Synology NAS using Docker compose (with Portainer)
Replies
18
Views
4,556

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Back
Top