Docker Minecraft Purpur Geyser Server

Minecraft Geyser + Floodgate Purpur Minecraft Server
Minecraft Geyser + Floodgate Purpur Minecraft Server

This is a new Docker container to automatically set up and run a Minecraft server that both Java and Bedrock players can connect to! This allows everyone to play on your server no matter which edition of Minecraft you are using. This is the Purpur version. It uses the Geyser and Floodgate plugins to accomplish this.

Since it uses the Purpur Minecraft server it also supports any additional plugins that are compatible with Purpur / Paper / Spigot. This gives you the ability to do many things that are currently impossible to do in Bedrock if you are hosting the official Bedrock dedicated server.

It is fully compatible with my Paper Minecraft Java Server Container (as well as the Geyser + Floodgate version) and you can swap between these containers without changing any configuration.

The official GitHub page is located here.

The Docker Hub page for the container is located here.

It’s now possible to convert your worlds between Bedrock and Java versions. Check out my guide on Chunker here for more information.

Features

  • Sets up fully operational Minecraft server that allows both Java and Bedrock clients to connect
  • Runs the highly efficient “Purpur” Minecraft server
  • Runs Geyser to allow Bedrock clients to connect and Floodgate to allow them to authenticate with their Bedrock credentials to a Java server
  • Plugin support for Purpur / Paper / Spigot / Bukkit
  • Uses named Docker volume for safe and easy to access storage of server data files (which enables more advanced Docker features such as automatic volume backups)
  • Installs and configures OpenJDK 18
  • Automatic backups to minecraft/backups when server restarts
  • Full logging available in minecraft/logs folder
  • Updates automatically to the latest version when server is started
  • Runs on all Docker platforms including Raspberry Pi

Usage

First you must create a named Docker volume. This can be done with:

docker volume create yourvolumename

Now you may launch the server and open the ports necessary with one of the following Docker launch commands.

With default ports:

docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 --restart unless-stopped 05jchambers/legendary-minecraft-purpur-geyser:latest

With custom ports:

docker run -it -v yourvolumename:/minecraft -p 12345:12345 -e Port=12345 -p 54321:54321/udp -p 54321:54321 -e BedrockPort=54321 --restart unless-stopped 05jchambers/legendary-minecraft-purpur-geyser:latest

With a custom Minecraft version (add -e Version=1.X.X, must be present on Purpur’s API servers to work):

docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e Version=1.17.1 --restart unless-stopped 05jchambers/legendary-minecraft-purpur-geyser:latest

With a maximum memory limit in megabytes (optional, prevents crashes on platforms with limited memory, -e MaxMemory=2048):

docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e MaxMemory=2048 --restart unless-stopped 05jchambers/legendary-minecraft-purpur-geyser:latest

Using a custom timezone:

docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e TZ="America/Denver" --restart unless-stopped 05jchambers/legendary-minecraft-purpur-geyser

Skipping backups on a certain folder:

docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e NoBackup="plugins" --restart unless-stopped 05jchambers/legendary-minecraft-purpur-geyser:latest

Skipping permissions check:

docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e NoPermCheck="Y" --restart unless-stopped 05jchambers/legendary-minecraft-purpur-geyser:latest

Configuration / Accessing Server Files

The server data is stored where Docker stores your volumes. This is typically a folder on the host OS that is shared and mounted with the container. I’ll give the usual locations here but if you’re having trouble just do some Googling for your exact platform and you should find where Docker is storing the volume files.

You can find your exact path by typing:

docker volume inspect yourvolumename

This will give you the fully qualified path to your volume like this:

{
        "CreatedAt": "2022-05-09T21:08:34-06:00",
        "Driver": "local",
        "Labels": {},
        "Mountpoint": "/var/lib/docker/volumes/yourvolumename/_data",
        "Name": "yourvolumename",
        "Options": {},
        "Scope": "local"
}

On Linux it’s typically available at:

/var/lib/docker/volumes/yourvolumename/_data

On Windows it’s at

C:\ProgramData\DockerDesktop

but may be located at something more like

\wsl$\docker-desktop-data\version-pack-data\community\docker\volumes\

if you are using WSL (Windows Subsystem for Linux).


On Mac it’s typically

~/Library/Containers/com.docker.docker/Data/vms/0/

If you are using Docker Desktop on Mac then you need to access the Docker VM with the following command first:

screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty

You can then normally access the Docker volumes using the path you found in the first step with docker volume inspect.

File Locations

Most people will want to edit server.properties. You can make the changes to the file and then restart the container to make them effective.
Backups are stored in the “backups” folder
Log files with timestamps are stored in the “logs” folder.

Plugin Support for Purpur / Paper / Spigot / Bukkit

This is a “Purpur” Minecraft server which has plugin compatibility with Purpur / Paper / Spigot / Bukkit.

Installation is simple. There is a “plugins” folder on your Docker named volume.

Navigate to your server files on your host operating system (see accessing server files section if you don’t know where this is) and you will see the “plugins” folder.

You just need to drop the extracted version of the plugin (a .jar file) into this folder and restart the container. That’s it!

Some plugins have dependencies so make sure you read the installation guide first for the plugin you are looking at.

A popular place to get plugins is: dev.bukkit.org

Troubleshooting Note – Oracle Virtual Machines

A very common problem people have with the Oracle Virtual Machine tutorials out there that typically show you how to use a free VM is that the VM is much more difficult to configure than just about any other product / offering out there.

It is because there are several steps you need to take to open the ports on the Oracle VM. You need to both:

  • Set the ingress ports (TCP/UDP) in the Virtual Cloud Network (VCN) security list
  • *and* set the ingress ports in a Network Security Group assigned to your instance

Both of these settings are typically required before you will be able to connect to your VM instance. This is purely configuration related and has nothing to do with the script or the Minecraft server itself.

I do not recommend this platform due to the configuration difficulty but the people who have gone through the pain of configuring an Oracle VM have had good experiences with it after that point. Just keep in mind it’s going to be a rough ride through the configuration for most people.

Troubleshooting Note – Hyper-V

There is a weird bug in Hyper-V that breaks UDP connections on the Minecraft server. A workaround for this is that you have to use a Generation 1 VM with the Legacy LAN network driver.

There is a second fix that was shared by bpsimons here. For that fix you need to install ethtool first with sudo apt install ethtool. Next in your /etc/network/interfaces file add “offload-tx off” to the bottom as the issue appears to be with TX offloading.

Here’s an example:

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.5
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
offload-tx off

This can also be done non-persistently with the following ethtool command:

ethtool -K eth0 tx off

Buy A Coffee / Donate

People have expressed some interest in this (you are all saints, thank you, truly)

  • PayPal: 05jchambers@gmail.com
  • Venmo: @JamesAChambers
  • CashApp: $theremote
  • Bitcoin (BTC): 3H6wkPnL1Kvne7dJQS8h7wB4vndB9KxZP7

Additional Support

The comments section right here is the best place for support. The second best place is the GitHub issues section.

I will add additional documentation based on what problems people are running into / questions people are asking because right now I’m not really sure what those will be yet. Definitely let me know if you need any of these things!

Subscribe
Notify of
guest

113 Comments
Inline Feedbacks
View all comments
Dirk
Dirk
1 year ago

Hi, thank you for this guide.
I installed the server on my raspberry pi.
All working good, but the server runs only wenn i have connection ober to the raspberry, wenn I close the terminal the sever stop, how can i make the server running without any connections?
Thanks

Dirk
Dirk
1 year ago

Thank you for your fast answer, i have tried this already, when i press Ctrl+P and Ctrl+Q the server stay on,
but when i close the ssh connection to the rasperry the server stops and minecraft dissconnects.

Michel
Michel
1 year ago

Hello James:
First of all Thank you for the server.
I’m new to all this, I was able to get this server up and running by following the easy instructions.
But I would like to keep a copy of the server and be able to have two or three different ones in docker to start one or the other.
How should I do it? It’s possible?

Michel
Michel
1 year ago

Fine
Thanks James

Michel
Michel
1 year ago

Hello:
I have duplicated the volume, but when I create a new container and start it with this volume, it starts the world at the starting point and does not recover the changes already made.
Could you help me on this?
I duplicate the volume, but then how do I create the new container linked to this volume? And change the port so it doesn’t crash?

Michel
Michel
1 year ago

Thank you very much James.

I close the server with

stop

after that I close the container in Portainer.

sudo docker volume create MinecraftPurpur2

sudo cp -rp /var/lib/docker/volumes/MinecraftPurpur /var/lib/docker/volumes/MinecraftPurpur2

Ok finally I change de port to 54322

docker run -it -v yourvolumename:/MinecraftPurpur -p 12345:12345 -e Port=12345 -p 54322:54322/udp -p 54322:54322 -e BedrockPort=54322 --restart unless-stopped 05jchambers/legendary-minecraft-purpur-geyser:latest

I can see the new container in Portainer running. I open minecraft in the port 54321 (Ok) and I open it in port 54322 (starting blank)

Excuse for my ignorance.

Michel
Michel
1 year ago

Yeah.

The problem is in the copy of the folders.
The copy was not doing well.
I was copying the folder in side yhe folder.
Once the content is copied, everything is perfect.
Thank you

KatuBeltz
KatuBeltz
1 year ago

Hi James,
Can I change de se world seed? How?
Thanks

Larry
Larry
1 year ago

Hi!
I restarted the docker yseterday, but it still shows that it is at 1.19.2 and bedrock has moved to 1.19.3. When a bedrock user signs in it says: This server does not support Java Edition 1.19.3, which is required for Geyser to connect. – The server needs to update or have the ViaVersion plugin installed. Original disconnect message: Outdated server! I’m still on 1.19.2 Any idea about what to do???

Larry
Larry
1 year ago

Where doe the argument -e Version=1.19.3 appear?
I tried: docker container start mcdock -e Version=1.19.3 And: docker container start “mcdock -e Version=1.19.3″…

Larry
Larry
1 year ago

Thanks! – that updated the versions folder – and it tested out fine with the bedrock version.

Manuel
Manuel
1 year ago

Hey,
It seems my geyser isn’t able to update anymore. Clients on the latest bedrock aren’t able to connect at all.

[12:34:39 WARN]: [Geyser-Spigot] Error whilst checking for Geyser update!
javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.ssl.Alert.createSSLException(Alert.java:130) ~[?:?]

Manuel
Manuel
1 year ago

Thank you btw, it was indeed a faulty docker installation. Or at least it seemed like it. Did a new docker install and everything seems to be working now.

One question, if I restart the server, how do I get back into the server screen to do commands etc, you normally end up in after calling the setup line?

Manuel
Manuel
1 year ago

Hey James!

Thanks for this amazing guide and these wonderful tools to make mc server administration so easy!

My issue is, I’ve set this up, with the automated reboot at 4 am and to use the latest, but I am getting an error that the geyser version is outdated and only bedrock clients up to 1.19.40 are supported. Latest is 1.19.50.

Did a quick check and it seems Geyser is supporting 1.19.50 already. Any idea what might cause this?

Thanks again and best regards
Manu

Michael K
Michael K
2 years ago

I just tried this out on an old MacBook3,1 I revived with Ubuntu Server (I’ve been using your Minecraft script on a Raspberry Pi for something like 3 years now). It was crazy easy to get going and my kids are loving it because they can now play with their friends who only have Bedrock! Great way to learn about Docker as well! I have a couple things to add. As I’ve been learning about Docker, I found that it was easier for me to name the container using “–name ” so I don’t have to look up the container ID when attaching to it. You might consider adding that option for others as well. I also learned about creating a restart policy to automatically start the container when Docker starts using “–restart unless-stopped”. To make it like your original Minecraft Server Startup Script I still need to figure out how to get it to automatically shut down the Minecraft server and reboot every day. Do you have any plans to add this functionality? Also, in your original Minecraft Server Startup Script, I was able to modify the script to write the backup to my NAS. This seems more difficult in the Docker container as I don’t think it has access to anything outside the container, right?
Anyway thanks for all the great work! I kicked in a small amount for my appreciation, though I’m sure you deserve much more!