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!

108 thoughts on “Docker Minecraft Purpur Geyser Server”

  1. Avatar for JutoTV

    The discord Repo says that the default version for Purpur is 1.20.2. But my server is still at 1.20.1
    Current: git-purpur-2062 (MC: 1.20.1)
    Previous: git-purpur-2060 (MC: 1.20.1)

    Already tried puling image again.

  2. Avatar for Henrik Bakken

    Hi James,
    quick question on backup (just had a large fire in the village… and figured we don’t have backups as we had with your old script that leverage crontab to restart daily).

    What’s the best practice to run backups on this new docker-based server? I am very much a docker n00b, but could create a crontab that either does
    docker container restart [container]

    or just execute the start-server.sh (where I’ve put the docker run -it -v … command from above)?

    Ideally keeping daily backups for a bit, then weekly/monthly in some clever retention order).

    1. Avatar for James A. Chambers

      Hey Henrik,

      Great question! So the backups are taken each time the server starts. They are stored in the backup folder in your Docker volume if that makes sense.

      You could copy them somewhere else with cron where it just copies the latest backup to a secure location for example. Hopefully that helps!

      1. Avatar for Henrik Bakken

        Thanks – I do see a few backups (in my Docker volume), but since the server is constantly running (your code is “too robust” if you will, hehe), there is no automation in restarts and I can be months without a backup.
        I should probably have phrased my question differently; what is the best practice to automate *restarts* with the docker server? I would like this to happen weekly or even daily. Think this will be a crontab, but should I execute “docker container restart” or “docker run”?

        1. Avatar for James A. Chambers

          Hey Henrik,

          I would go with the restart command. If you’re having any issues with that then it would probably be best to run the stop command and then run the start command briefly later.

          Hopefully that helps!

  3. Avatar for Michael K

    FYI, for now, I manually downloaded the newest version of Purpur and ViaVersion and copied them into their proper locations in the Docker volume and that’s working.

    1. Avatar for James A. Chambers

      Hey Michael,

      I checked this weekend and I wasn’t able to reproduce this for the Paper or Purpur versions. All updating seems to be working normally. I’d imagine somehow the pull isn’t working for yours to update the container to the latest version

      Some people have had luck pulling the amd64 version instead of the latest version (on PC for example). That may be worth a try for yours!

      1. Avatar for Michael K

        Ok. Thanks for looking into this. I’m sure the pull updated the container though. I looked at the start script on your GitHub repo and compared it with what was in the container and it looked like it matched; at least where the code is for updating Purpur and ViaVersion. This container is running on an old 2004 MacBook with Ubuntu Server 22.04 installed on it. Next time I’ll give the amd64 version a try. Thanks again!

          1. Avatar for Michael K

            I updated the server again today, simply by pulling the latest docker container. It updated Purpur and ViaVersion to the latest versions without any issues this time. I didn’t have to try the amd64 version. Not sure why I had the issues I did the last time I updated.

  4. Avatar for Michael K

    Hi James, I pulled the newest container today but Purpur is not updating to v1.20.1 (staying at v1.19.4). I’m seeing the following in the log during startup:

    Updating to most recent Purpur version …
    Unable to retrieve latest Purpur build (got result of 0)
    Floodgate is up to date
    Geyser is up to date
    Unable to check for updates to ViaVersion!
    Starting Minecraft server…

    You know what’s going on here?

  5. Avatar for Michael

    I am having such intense trouble with this. No matter what I do, the container seems to have no access to the internet. I’ve changed which network it is attached to (bridge, host), I’ve tried to force DNS. Nothing works. I keep trying to get INTO the container to see what’s up but it just exits and kills and auto restarts itself. I’m not **that** familiar with Docker so I’m struggling to figure out a way around this. Any ideas?

    1. Avatar for James A. Chambers

      Hey Michael,

      This is almost always due to having an older version of your OS than the latest version installed. For example something like Ubuntu 20.04, Debian Buster, things like that. Can you make sure you are running the latest version of your operating system?

  6. Avatar for Peter

    Hello James. can you please advise why I am still on old Purpur, not being able to update via restarting of the container, nor pulling the lates one?
    thank you. Peter

    [13:40:13 INFO]: Checking version, please wait...
    [13:40:13 INFO]: Current: git-Purpur-1976 (MC: 1.19.4)*
    Previous: git-Purpur-1974 (MC: 1.19.4)
    * You are 9 version(s) behind

  7. Avatar for Rob Rogers

    I see comments in the GIT repo that Purpur 1.20 is the new default. However, when I build the container I see “Updating to most recent Purpur version …
    Unable to retrieve latest Purpur build (got result of 0)” and the 1.19.4 server runs instead of 1.20. This is true even if I specify “-e Version=1.20” on the Docker run command. Am I missing something?

    Thanks!

    1. Avatar for Henrik

      I struggled with the same, Rob – but a
      sudo docker pull 05jchambers/legendary-minecraft-purpur-geyser:latest
      …followed by docker stop, and the restart command (I’ve added that as a bash script) did the trick!

Leave a Comment

Your email address will not be published. Required fields are marked *

Type here..

Exit mobile version