Hosting a Minecraft Server on Synology DSM: Difference between revisions
| (17 intermediate revisions by the same user not shown) | |||
| Line 5: | Line 5: | ||
== Installation == | == Installation == | ||
The Minecraft servers | The Minecraft servers implemented with Docker containers. | ||
The image used to create the container is [https://hub.docker.com/r/itzg/minecraft-server itzg/minecraft-server]. <ref>[https://github.com/itzg/docker-minecraft-server/blob/master/README.md itzg/docker-minecraft-server README] - GitHub</ref> <ref>[https://drfrankenstein.co.uk/2020/08/19/minecraft-java-server-in-docker-on-a-synology-nas-including-mods/ Minecraft (Java) Server in Docker on a Synology NAS (Including Mods)] - Dr Frankenstein's Tech Stuff</ref> <ref>[https://drfrankenstein.co.uk/2020/08/19/minecraft-java-server-in-docker-on-a-synology-nas-including-mods/ Minecraft (Java) Server in Docker on a Synology NAS (Including Mods)] - <strike>Dr Frankenstein's Tech Stuff (blog)</strike> - deprecated</ref> | |||
== Viewing server status == | == Viewing server status == | ||
<p class="alert alert-warning">Note that when using `itzg/minecraft-server` with docker-compose.yml, the container doesn't appear in the list of containers within the Docker package. Servers configured using docker-compose.yml should always be started and stopped on the command line and not through the Docker package.</p> | |||
* '''Synology DSM''' > '''Package Center''' > '''Docker''' > '''Open''' | * '''Synology DSM''' > '''Package Center''' > '''Docker''' > '''Open''' | ||
| Line 20: | Line 24: | ||
Click on a server, then click '''Action''' > '''Details''' at the top to view the server details, e.g. the port on which the server is running. | Click on a server, then click '''Action''' > '''Details''' at the top to view the server details, e.g. the port on which the server is running. | ||
== Connecting to server == | === Stopping and Starting the server === | ||
==== docker-compose.yml ==== | |||
Always start and stop the server on the command line when configuring a server with docker-compose.yml. | |||
<pre> | |||
$ sudo docker-compose up -d | |||
$ sudo docker-compose down | |||
</pre> | |||
==== Docker package ==== | |||
* '''DSM''' > '''Package Center''' > '''Docker''' > '''Open''' | |||
* '''Containers''' > ''[select minecraft container in the list]'' | |||
* Click the on/off toggle to the right | |||
== Connecting to the server in Minecraft == | |||
=== | === Mac OS === | ||
* Open Minecraft and make sure to log in to your Microsoft/Minecraft profile. | * Open Minecraft and make sure to log in to your Microsoft/Minecraft profile. | ||
| Line 36: | Line 57: | ||
[[#Viewing_server_status|View the server container]] in Synology DMS. Stop the server with the icon in the rightmost column, then start the server again. It will upgrade automatically. | [[#Viewing_server_status|View the server container]] in Synology DMS. Stop the server with the icon in the rightmost column, then start the server again. It will upgrade automatically. | ||
== Editing server properties == | |||
=== DSM === | |||
* '''DSM''' > '''Package Center''' > '''Docker''' > '''Open''' | |||
* '''Image''' > ''[Select minecraft server image]'' > '''Launch''' button | |||
* '''Advanced Settings''' button | |||
* '''Environment''' tab | |||
** Add or edit server properties here, e.g. `SERVER_PORT`, `WHITELIST`, `DIFFICULTY` | |||
=== docker-compose === | |||
Follow instruction under [https://github.com/itzg/docker-minecraft-server/blob/master/README.md#using-docker-compose Using Docker Compose] in the itzg/minecraft-server documentation. | |||
== Data files == | |||
By default the data files for the minecraft world are stored in the Docker container. | |||
=== Copying data files from the Docker container === | |||
See [[Docker Cookbook]] for commands to log into the Docker container and copy files from the Docker Container. | |||
=== Storing data files outside of the Docker container === | |||
[TK] | |||
== External access == | == External access == | ||
=== Port number === | |||
Port number is specified in `docker-compose.yml`. | |||
=== External access === | |||
External access is controlled by the wifi router. | External access is controlled by the wifi router. | ||
| Line 51: | Line 104: | ||
When connecting use the public URL of the Synology DSM, e.g. `dbarchowsky.synology.me` and the public port defined in the router. | When connecting use the public URL of the Synology DSM, e.g. `dbarchowsky.synology.me` and the public port defined in the router. | ||
== | === Whitelist === | ||
In `server.properties` set `white-list=true` and `enforce-whitelist=true`. | |||
Add user names to `white-list.txt` (one user name per line.) | |||
Add user names and uuid's to `white-list.txt`. | |||
Restart the server. | |||
As the server starts up it will look up uuid's for the users listed in `white-list.txt` and add those uuid's and user names to `whitelist.json`. `white-list.txt` will then be renamed to `white-list.txt.converted`. | |||
== Notes == | |||
=== See also === | |||
* [[Installing a Minecraft Server on Synology DSM (Legacy)]] | * [[Installing a Minecraft Server on Synology DSM (Legacy)]] | ||
=== References === | |||
<references /> | |||
[[Category:Gaming]][[Category:Minecraft]] | [[Category:Gaming]][[Category:Minecraft]] | ||
Latest revision as of 18:39, 18 May 2021
Overview[edit]
Instructions for hosting a Minecraft server on Synology DSM.
Installation[edit]
The Minecraft servers implemented with Docker containers.
The image used to create the container is itzg/minecraft-server. [1] [2] [3]
Viewing server status[edit]
Note that when using itzg/minecraft-server with docker-compose.yml, the container doesn't appear in the list of containers within the Docker package. Servers configured using docker-compose.yml should always be started and stopped on the command line and not through the Docker package.
- Synology DSM > Package Center > Docker > Open
- Container tab
Containers named minecraft-server serve for Minecraft Java Edition, i.e. desktop, laptop.
Containers named minecraft-bedrock-server serve mobile editions of Minecraft, i.e. iPad.
Nintendo Switch consoles can't connect to either of these servers, I think.
Click on a server, then click Action > Details at the top to view the server details, e.g. the port on which the server is running.
Stopping and Starting the server[edit]
docker-compose.yml[edit]
Always start and stop the server on the command line when configuring a server with docker-compose.yml.
$ sudo docker-compose up -d $ sudo docker-compose down
Docker package[edit]
- DSM > Package Center > Docker > Open
- Containers > [select minecraft container in the list]
- Click the on/off toggle to the right
Connecting to the server in Minecraft[edit]
Mac OS[edit]
- Open Minecraft and make sure to log in to your Microsoft/Minecraft profile.
- Click Play
- Servers tab
- Scroll down to Additional Servers.
- If the server is not listed, click Add Server.
- Server Name: [Name to display in the future under "Additional Servers"]
- Server Address: [IP of Synology DSM]
- Port: [Can be found under Docker container details]
Upgrading server version[edit]
View the server container in Synology DMS. Stop the server with the icon in the rightmost column, then start the server again. It will upgrade automatically.
Editing server properties[edit]
DSM[edit]
- DSM > Package Center > Docker > Open
- Image > [Select minecraft server image] > Launch button
- Advanced Settings button
- Environment tab
- Add or edit server properties here, e.g.
SERVER_PORT,WHITELIST,DIFFICULTY
- Add or edit server properties here, e.g.
docker-compose[edit]
Follow instruction under Using Docker Compose in the itzg/minecraft-server documentation.
Data files[edit]
By default the data files for the minecraft world are stored in the Docker container.
Copying data files from the Docker container[edit]
See Docker Cookbook for commands to log into the Docker container and copy files from the Docker Container.
Storing data files outside of the Docker container[edit]
[TK]
External access[edit]
Port number[edit]
Port number is specified in docker-compose.yml.
External access[edit]
External access is controlled by the wifi router.
Router admin > Advanced tab > Forwarding > Virtual Servers > Add New...
- Service Port: [Public port for server]
- Internal Port: [Minecraft Docker container port (leave blank to mirror public port)]
- IP Address: [LAN IP address of Synology DSM]
- Protocol:
All - Status:
Enabled
When connecting use the public URL of the Synology DSM, e.g. dbarchowsky.synology.me and the public port defined in the router.
Whitelist[edit]
In server.properties set white-list=true and enforce-whitelist=true.
Add user names to white-list.txt (one user name per line.)
Add user names and uuid's to white-list.txt.
Restart the server.
As the server starts up it will look up uuid's for the users listed in white-list.txt and add those uuid's and user names to whitelist.json. white-list.txt will then be renamed to white-list.txt.converted.
Notes[edit]
See also[edit]
References[edit]
- ↑ itzg/docker-minecraft-server README - GitHub
- ↑ Minecraft (Java) Server in Docker on a Synology NAS (Including Mods) - Dr Frankenstein's Tech Stuff
- ↑ Minecraft (Java) Server in Docker on a Synology NAS (Including Mods) -
Dr Frankenstein's Tech Stuff (blog)- deprecated