Minecraft Java + Bedrock Server Together – Geyser + Floodgate

Minecraft Geyser + Floodgate Paper Minecraft Server
Minecraft Geyser + Floodgate Paper 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. It uses the Geyser and Floodgate plugins to accomplish this.

Since it uses the Paper Minecraft server it also supports any additional plugins that are compatible with 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 and you can swap between these two 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 “Paper” 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 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-geyser-floodgate: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-geyser-floodgate:latest

With a custom Minecraft version (add -e Version=1.X.X, must be present on Paper’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-geyser-floodgate: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-geyser-floodgate: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-geyser-floodgate:latest

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-geyser-floodgate: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-geyser-floodgate:latest

Change number of backups:

docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e BackupCount=1 --restart unless-stopped 05jchambers/legendary-minecraft-geyser-floodgate: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.

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 Paper / Spigot / Bukkit

This is a “Paper” Minecraft server which has plugin compatibility with 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. The easy 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

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

457 Comments
Inline Feedbacks
View all comments
Mitsch
Mitsch
1 year ago

Does anybody know why geyser gives that error “[Geyser-Spigot] Your server software does not support the Java version that Geyser requires (1.19.3, 1.19.2)” when the paper server is 1.19.2? I used the docker-compose.yml from the github-repo. I added fixed names for volume and container and Version: 1.19.2 as environment var.

Mitsch
Mitsch
1 year ago

Hi James,

thank you for your detailed answer. I didn’t not want to blame your work in any way (it’s awesome and extremely convenient :)). I was just wondering whether i did something wrong or not. So i guess the error message geyser gives is just missleading, since it seems to check for 1.19.3 only and not for both 1.19.2 and 1.19.3. So i’ll see if i can get and push an older version to my container. Keep the good work up! 🙂

Maybe i’ll give that ViaVersion app a try that seems to route requests to older server versions making geyser a bit more robust regarding version changes. Well maybe at least a little bit. 😀
Meanwhile i’ll share some coffee.

Cheerz
Mitsch

Mitsch
Mitsch
1 year ago

Hi James

I modified the setup script and Dockerfiles and placed a pull request. I guess that’s the fastest way to show you what i found as solution (for me). Maybe it helps you.

Cheerz
Mitsch

Marijn
Marijn
1 year ago

Strange. Got the exact same error. I also get it when the start of the container has finished.

Marijn
Marijn
1 year ago
Reply to  Marijn

Sorry. Read it better now. Not strange at all. Waiting for the update from their side.

Rich
Rich
1 year ago

I set up a test volume to experiment with with ViaVersion and it does work for getting past that Java version error. I don’t like having extra overhead though so I may wait for a Geyser update or try the previous version.

The whole boondoggle did at least force me to learn a little more about how it all works.

James, thanks for creating this container. It has performed well on my Rpi4 (running on SSD) for me and two of my kids. The container idea is so convenient. I’m pretty new to linux, docker, and minecraft so it was a great shortcut to get my kids a server going. Now I’m backfilling the knowledge gap.

Thanks again!

Arathi
Arathi
1 year ago

So far, the kids and I have been having an absolute blast with this, so again, thank you so much for the work put into getting the two to work together.

With that, I was curious about mods. Server-side mods like Millenaire. Something to make villages a bit more worth exploring and interacting with. Is that possible with this?

Marijn
Marijn
1 year ago

Hi,

I tried to copy files to the plugin folder, but I wasn’t able to. Even installed the desktop UI to do it with a file browser, but wasn’t allowed to open the docker folder. I usermodded the user, but dis not get access. Any thoughts on how to get a jar file in the plugin folder?

Marijn
Marijn
1 year ago

I appear do be a more complete noob than I already thought. When typing: sudo cp Downloads/Citizens.jar /var/lib/docker/minecraft/_data/plugins I get an error reading:
can’t create the normal file ‘/var/lib/docker/minecraft/_data/plugins/’ : File or folder does not exist. I stopped the container. Status now says exited.

Also in the Desktop UI I can see the folder ‘Docker’, but opening it gives an acces denied and shows only an empty folder.

Marijn
Marijn
1 year ago

Hi James,

Thank you for your patience. I took a look of this entire chat history and could not find the answer there, so I am glad you take te time to answer me.
This is the info I got from the ‘inspect’ command:
"CreatedAt": "2022-12-10T11:56:02+01:00",
"Driver": "local",
"Labels": {},
"Mountpoint": "/var/lib/docker/volumes/minecraft/_data",
"Name": "minecraft",
"Options": {},
"Scope": "local"

I am on a Raspberry 4 and installed the GUI just to be able to find the folder. When going to this location, I get an ‘access denied’ when opening the “/var/lib/docker’ folder.
Rebooting the raspberry, stopping the container in what order whatsoever does not give me access to this folder.
Using the ‘CP’ command (from within a VNC window) gives me this error:

cp: cannot stat ‘home/minecraft/Downloads/Citizens.jar’: No such file or directory

I can see the file standing right there in that folder. I am absolutely sure I am doing something wrong, but can’t figure out what.
Running the command from the Terminal on my Mac gives the same error.

Besides from the plugin troubles I have, pulling the latest version keeps giving me the same error when using my previous container. After a reboot and I install the latest, a new world is created that works, but I (of course) want my already build world. Stopping the new container an starting the ‘old’ one gives me the same ‘not working on 19.2 error’.
When inspecting the containers, I see that the newly created one has the whole 05james line, but my older build world just the ID numbers/letters.
How can I update the container?

Again, if you ask me to first find my answers somewhere else (e.g. other linux support) just let me know. I understand.

Strixin
Strixin
1 year ago

Realise this is a tall ask, but I’m having a tonne of issues trying to relate the docker pull/run commands to the TrueNAS docker GUI interface. Has anyone done it, or could point me to something that explains it?

Marijn
Marijn
1 year ago

Hi James,

I have a Rpi4 (4Gb) running the Geyser server (and also running HomeBridge). Most things I do on this device (rebooting, making new containers etc) I do from an iPhone in a terminal app (WebSSH). Works great for me. However I am going to portforward it so my children can access the minecraft world from their mothers home also. I cannot get that to work, but I have another more urgent question.

I recently used a command to add a line to the config.txt file on the RPI from terminal, so I did not have to find the file, open it and edit and save it. Is there an easy way to make a whitelist and easily add user to it from a simple command typed in the terminal? After this I want to portforward and open the world outside my LAN.

I hope I made my request clear, as this is not my native language.

Marijn
Marijn
1 year ago

Thanks James

Dylan
Dylan
1 year ago

Hi,

I do not know how to access the ‘interactive terminal’. I am aware that the need for the screen package was removed some time ago, but I want to be able to access the console. If you could tell me the command to do so, that would be great.

Thanks.

Dylan
Dylan
1 year ago

Oh, okay. Thank you. It’s actually docker ps though, not docker ls to list the containers. Other than that, everything worked like a charm! Thank you for providing this software.

Kevin
Kevin
1 year ago

I have a headless debian machine where this docker image is the only thing running, and after restarting it 4 days ago it seems to have used up 90% of my 1.2 TB monthly Comcast allotment (nload shows over 1 TB of transfer on this machine), despite us not actually playing on the server in that time. Is it possible there is some pathological edge case where it would download (or upload?) tons of data on a failed startup, or something? Is there anything in the logs that would indicate something going wrong like this?

(We’re in Comcast’s “you get one free month of overages” period, and my kids and really appreciate how easy it was to set this up, so please view this message as a weird technical request and not as a complaint about your free code costing us money or anything. All of my anger is directed at Comcast. 🙂 )

Kevin
Kevin
1 year ago

Thanks for the reply. My router wasn’t much help, but I was able to pull the docker log and figure some things out. When the machine came up it restarted the docker image, which ran through the normal startup until the paperclip update, and then it would hit this:

Geyser is up to date
Starting Minecraft server...
Must be connected to a terminal.
Paper Minecraft Java Server Docker + Geyser/Floodgate script by James A. Chambers
Latest version always at https://github.com/TheRemote/Legendary-Java-Minecraft-Geyser-Floodgate

And then it runs though the whole thing again. If I’m parsing the log correctly, it did that about 20,000 times over four days, downloading the paperclip update over and over and over. So, the good news is there doesn’t seem to be a compromised machine, but I’m curious if there’s a way to have this container start up without a connected terminal (or to fake one?) or to have it try to start a few times and then give up instead of repeating for days on end?

I know I can always just turn off restart and do it manually whenever the machine reboots, which isn’t often, but it feels like there’s a more elegant solution out there somewhere.

shampeon
shampeon
1 year ago

Hi, this is a really cool project. I’m using docker-compose to run an instance of this along with the stock Bedrock server. I’ve updated the ports so they don’t conflict. I can connect using Java clients, but not on a Windows Bedrock client. I can see the server under LAN Games, but when I try to connect it just says, “Unable to connect to world.” There’s nothing in the log files showing the connection attempt.

minecraft:
image: 05jchambers/legendary-minecraft-geyser-floodgate:latest
restart: "unless-stopped"
ports:
- 25565:25565
- 19133:19132
- 19133:19132/udp
volumes:
- "/mnt/storage/minecraft/data/mc:/minecraft"
stdin_open: true # docker run -i
tty: true # docker run -t
entrypoint: [ "/bin/bash", "/scripts/start.sh" ]
# Environment variables
environment:
Port: "25565"
BedrockPort: "19132"
TZ: "America/Los_Angeles" # timezone
WHITE_LIST: true
WHITE_LIST_USERS: "..."

shampeon
shampeon
1 year ago

I’m not using Hyper-V, actually. The server is Ubuntu 22.04.1 running Docker.

shampeon
shampeon
1 year ago

ufw is disabled, and I’m not running firewalld.


$ sudo ufw status verbose
Status: inactive

It’s just really puzzling.

shampeon
shampeon
1 year ago

Hmm, ok. I need to run this instance on a different port, since I run a stock Bedrock server on port 19132. I changed ports and tried again, but I get the same error. Again, no log.


services:
bds:
image: itzg/minecraft-bedrock-server
environment:
TZ: "America/Los_Angeles"
EULA: "TRUE"
GAMEMODE: survival
DIFFICULTY: easy
SERVER_NAME: "The Des SMP"
ICON: "http://clipart-library.com/new_gallery/57-579791_minecraft-steve-alabama.png"
WHITE_LIST: true
WHITE_LIST_USERS: "..."
ports:
- 19132:19132/udp
volumes:
- /mnt/storage/minecraft/data/bds:/data
stdin_open: true
tty: true
restart: unless-stopped

minecraft:
image: 05jchambers/legendary-minecraft-geyser-floodgate:latest
restart: "unless-stopped"
ports:
- 25565:25565
- 19134:19134
- 19134:19134/udp
volumes:
- "/mnt/storage/minecraft/data/mc:/minecraft"
stdin_open: true # docker run -i
tty: true # docker run -t
entrypoint: [ "/bin/bash", "/scripts/start.sh" ]
# Environment variables
environment:
Port: "25565"
BedrockPort: "19134"
TZ: "America/Los_Angeles" # timezone
WHITE_LIST: true
WHITE_LIST_USERS: "..."

shampeon
shampeon
1 year ago
Reply to  shampeon

Ok, got it to work by setting online-mode=false. So it looks like there’s something wrong with the Geyser authentication?

shampeon
shampeon
1 year ago

As far as I can tell I’m doing everything that Geyser says I should be doing. I’m intending on using DynDNS and port forwarding from my router so my kids friends can connect, so the goal is to open this to the network with an allowlist. With online-mode=false, does that mean the whitelist is ignored?

shampeon
shampeon
1 year ago
Reply to 

Ok, I turned debug-mode: false and tried to connect, and got some more error messages. tl;dr you need to set enforce-secure-profile=false in server.properties in order to allow Bedrock players to connect. Apparently this is a recent change. After making that change, I can turn online-mode=true and connect using a Bedrock client.

I’m still sifting through the steps to get Bedrock players whitelisted. From what I can tell, the easiest way to do this is to 1) turn the whitelist off 2) have the player connect 3) add the player to the whitelist 4) turn whitelist back on. I don’t see a way of mapping the XUIDs from Bedrock to the UUID. The Geyser docs that say to append the XUID to 00000000-0000-0000- is either wrong or I’m doing something wrong, since the UUID in Geyser is entirely different for my username, which appears as .username. Very confusing.

shampeon
shampeon
1 year ago

Yes, I’m using a local mount as the location. Makes it much easier than using a Docker volume, and it’s part of a ZFS volume so I get those advantages.