etharis/minecraft
More info here: https://github.com/davidsauro/docker-papermc-geyser-floodgate
111
Originally the above image was a great starting point but the shell script was a bit out of date and the jar files specified to be downloaded were returning 404s. This was also not setup to run in a kubernetes cluster which I am trying (my brain hurts) to get working. There is a work in progress kubernetes.yaml file in this repo that you SHOULD be able to deploy to a cluster, but I make no promises of it working at this time. I am still trying to figure some of this out. See the Kubernetes section for more info
This is a Linux Docker image for the PaperMC Minecraft server, GeyserMC, and Floodgate.
PaperMC is an optimized Minecraft server with plugin support (Bukkit, Spigot, Sponge, etc.). This image provides a PaperMC server with the Geyser and Floodgate plugins, which allow Bedrock players to join a Java server. Floodgate allows a user to log in with their Microsoft Account
This image is available here: docker pull etharis/minecraft:latest
If you want to build it yourself. This is a very simple process.
git clone https://github.com/davidsauro/docker-papermc-geyser-floodgate.git
cd papermc-geyser-docker
docker build . -t etharis/minecraft:latest
Don't run the following commands as the root user or with root privileges. That isn't needed if docker is set up correctly along with your file permissions. This applies to any command that says docker run
With this image, you can create a new PaperMC Minecraft server with one command (note that running said command indicates agreement to the Minecraft EULA). Here is an example:
docker run -p 25565:25565 -p 19132:19132/udp etharis/minecraft
While this command will work just fine in many cases, it is only the bare minimum required to start a functional server and can be vastly improved by specifying some...
There are several command line options that users may want to specify when utilizing this image. These options are listed below with some brief explanation. An example will be provided with each. In the example, the part that the user can change will be surrounded by angle brackets (< >
). Remember to remove the angle brackets before running the command.
Port
25565
and 19132
if you don't know what this is.25575
.-p <12345>:25565 -p <23456>:19132/udp
-p <12345>:25565 -p <23456>:19132/udp -p <34567>:25575
/udp
after 19132
. It is essential for Bedrock support.Volume
-v <my_volume_name>:/papermc
-v </path/to/files>:/papermc
Detached
-d
Terminal/Console
docker attach
.-t
and -i
in any order-ti
or -it
Restart Policy
--restart on-failure
Name
--name "<my-container-name>"
User
--user 1000:1000
The command I would recommend using goes something like this:
docker run -p 25565:25565 -p 19132:19132/udp -v /home/minecraft/server:/papermc -d -ti --restart on-failure -e MC_RAM="4G" -e TZ="America/Toronto" --name "minecraft" --user 1001:1001 smcbride/papermc-geyser-floodgate
Replace the timezone, uid, and allocated ram with the correct values for your system.
There is one more command line option, but it is a bit special and deserves its own section.
Environment variables are options that are specified in the format -e <NAME>="<VALUE>"
where <NAME>
is the name of the environment variable and <VALUE>
is the value that the environment variable is being set to. Please note that setting an evironment variable with no value does not leave it at default; instead, this sets it to an empty string, which may cause issues. This image has four environment variables:
Minecraft Version
MC_VERSION
-e MC_VERSION="<latest>"
PaperMC Build
PAPER_BUILD
MC_VERSION
will be used.-e PAPER_BUILD="<latest>"
RAM
MC_RAM
M
for "Megabytes" or G
for "Gigabytes".-e MC_RAM="<4G>"
Java options
JAVA_OPTS
-e JAVA_OPTS="<-XX:+UseConcMarkSweepGC -XX:+UseParNewGC>"
From this point, the server should be configured in the same way as any other Minecraft server. The server's files, including server.properties
, can be found in the volume that was specified earlier. The port that was specified earlier will probably need to be forwarded as well. For details on how to do this and other such configuration, Google it, because it works the same as any other Minecraft server.
There is one change required in server.properties
for Bedrock support to function. You must set enforce-secure-profile=false
This project does NOT redistribute the Minecraft server files. Instead, the (very small) script that is inside of the image, papermc.sh
, downloads these files from their official sources during installation.
With this config, (see kubernetes.yaml) I can't get the traffic to forward to the kuberneties cluser IP, so I need to do some port forwarding, but as far as I can tell kubectl doesn't support UDP forwarding for some stupid reason so I had to install a plugin to accomplish it here is the command I used - kubectl relay --address 0.0.0.0 pod/mcs-0 19132:19132
The plugin I used is from here installed via Krew
This probably has something to do with the fact that I am using MiniKube on an M1 Mac running Linux. I haven't tested this in a cloud provider yet, but I plan on doing that soon.
PLEASE NOTE: This is an unofficial project.
I did not create PaperMC. This is the official PaperMC website.
I did not create Geyser or Floodgate This is the official GeyserMC website
docker pull etharis/minecraft