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

458 Comments
Inline Feedbacks
View all comments
Jonathan Turunen
Jonathan Turunen
2 years ago

Hi James,

This looks like just what I need and it’s clear a lot of work has gone into it so, first off, thanks for making this!

I’m having a issue with the start.sh Internet check (line 120) where it fails the connection test (at line 121) and, therefore, won’t download paperclip which results in the error that paperclip.jar is not found.

If I extract those lines on their own and run them by themselves (changing the else at line 123 to a simple echo “Connected, proceeding”) then it works but, for some reason, but in Docker it does not.

Here’s the command on its own:

me@debian:~$ sudo cat test.sh
#!/bin/bash
curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -L -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4.212 Safari/537.36" -s google.com -o /dev/null
if [ "$?" != 0 ]; then
echo "Unable to connect to update website (internet connection may be down). Skipping update ..."
else
echo "Connected, proceeding"
fi
me@debian:~$ sudo bash test.sh
Connected, proceeding

Here’s my Docker output:

me@debian:~$ sudo docker run -it -v minecraftcreative:/minecraft -p 12345:12345 -e Port=12345 -p 54321:54321/udp -p 54321:54321 -e TZ="Australia/Melbourne" -e MaxMemory=2048 -e BedrockPort=54321 05jchambers/legendary-minecraft-geyser-floodgate:latest
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
Don't forget to set up port forwarding on your router! The default port is 25565 and the Bedrock port is 19132
Port used: 12345
Bedrock port used: 54321
Updating to most recent paperclip version ...
Unable to connect to update website (internet connection may be down). Skipping update ...
Starting Minecraft server...
[screen is terminating]

It’s clearly working for everyone else, though, so I tried to fork the github then convert to my own docker image but that is, so far, beyond my capabilities unfortunately.

Jonathan Turunen
Jonathan Turunen
2 years ago

Thanks, James, the curl line does work when used either on the CLI or in a shell script. I’ll try the OS update as I’m still on Stretch actually, very far behind!

Lerkista
Lerkista
2 years ago

Hi
When running the server, the timestamps are wrong, how can i change the timezone in the docker?
Thanks

Kim Skov Rasmussen
Kim Skov Rasmussen
2 years ago

Hi, i have truble understanding why this is not working? i keep getting errors alle over the place..

version: "3"

services:
minecraft:
image: 05jchambers/legendary-minecraft-geyser-floodgate
container_name: Minecraft
volumes:
- minecraftdata:/data
- /home/minecraft/plugins:/plugins
- /home/minecraft/mods:/mods
ports:
- 25565:25565
- 19132:19132/udp
- 19132:19132
stdin_open: true
tty: true
restart: unless-stopped
volumes:
minecraftdata:
external: true

Pavel
Pavel
2 years ago

Hello,
I just wanted to say THANK YOU for all your efforts with this server container!
Now me and my 6+ year old son can play Minecraft together! Me – on linux and my son on iPad 🙂
You did awesome job!

Hajo
Hajo
2 years ago

Hi,
when connecting with my android smartphone, I get the following.

[20:37:04 INFO]: [Geyser-Spigot] /172.17.0.1:41400 tried to connect!
[20:37:04 WARN]: [io.netty.util.concurrent.AbstractEventExecutor] A task raised an exception. Task: com.nukkitx.protocol.bedrock.BedrockRakNetSessionListener$$Lambda$6404/0x0000000801e10ad0@42ae902a
java.lang.RuntimeException: Unable to inflate buffer data
at com.nukkitx.protocol.bedrock.wrapper.BedrockWrapperSerializerV9_10.deserialize(BedrockWrapperSerializerV9_10.java:87) ~[Geyser-Spigot.jar:?]
at com.nukkitx.protocol.bedrock.BedrockSession.onWrappedPacket(BedrockSession.java:283) ~[Geyser-Spigot.jar:?]
at com.nukkitx.protocol.bedrock.BedrockRakNetSessionListener.lambda$onEncapsulated$0(BedrockRakNetSessionListener.java:39) ~[Geyser-Spigot.jar:?]
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.77.Final.jar:4.1.77.Final]
...

Any idea?

Hajo
Hajo
2 years ago

Pulled it, same error.
Thanks for your quick answer!
And it is a Gen 11th processor, yes

Hajo
Hajo
2 years ago

Well, tried it again with i7; still no luck.
BTW, on the client, I am using a beta installation. Maybe ???

Hajo
Hajo
2 years ago

Hi James,
the clients are non-intel android.
I tried version 19 too, but still the same error.
I am wondering, why the i7 have the same issue; but no idea about that. I removed that XX options for the i7. No success.
My synology is a non Intel, non docker 213+, I assume too old.
I have a raspberry, but I nedd a bedrock+java; and I didn’t find that even on your page! 😉
Or maybe go back to an early 18 version with the i7.
Thank you vre much for your support!!!

Hajo
Hajo
2 years ago

Hey James,
I did two things.
First I tried your new version by pulling it. And i installed version 17, no luck.

Second thing: I used my pi3modelBrev1.2, installed docker (cool stuff!) and run your container – still the same issue.

As a conclusion from my side, this seems not to be an issue with Intel Gen11. I tried it with i7 and with arm; still the same issue.
So I assume, something else than the CPU will be the cause.

Hajo
Hajo
2 years ago

System Info: Java 18 (OpenJDK Server VM 18.0.2+9) Host: Linux 5.15.56-v7+ (arm)
Loading libraries, please wait...
[15:41:11 INFO]: Building unoptimized datafixer
[15:41:23 INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[15:41:43 INFO]: Loaded 7 recipes
[15:41:58 INFO]: Starting minecraft server version 1.19.2
[15:41:58 WARN]: To start the server with more ram, launch it as "java -Xmx1024M -Xms1024M -jar minecraft_server.jar"
[15:41:58 WARN]: ****************************
[15:41:58 WARN]: YOU ARE RUNNING THIS SERVER AS AN ADMINISTRATIVE OR ROOT USER. THIS IS NOT ADVISED.
[15:41:58 WARN]: YOU ARE OPENING YOURSELF UP TO POTENTIAL RISKS WHEN DOING THIS.
[15:41:58 WARN]: FOR MORE INFORMATION, SEE https://madelinemiller.dev/blog/root-minecraft-server/
[15:41:58 WARN]: ****************************
[15:41:58 INFO]: Loading properties
[15:41:58 INFO]: This server is running Paper version git-Paper-131 (MC: 1.19.2) (Implementing API version 1.19.2-R0.1-SNAPSHOT) (Git: 2da891f)
[15:41:59 INFO]: Server Ping Player Sample Count: 12
[15:41:59 INFO]: Using 4 threads for Netty based IO
[15:42:01 INFO]: Default game type: SURVIVAL
[15:42:01 INFO]: Generating keypair
[15:42:03 INFO]: Starting Minecraft server on *:25565
[15:42:03 INFO]: Using default channel type
[15:42:03 INFO]: Paper: Using Java 11 compression from Velocity.
[15:42:03 INFO]: Paper: Using Java cipher from Velocity.
[15:42:09 INFO]: [floodgate] Loading floodgate v2.2.0-SNAPSHOT (b73-4f36112)
[15:42:14 INFO]: [floodgate] Took 4,453ms to boot Floodgate
[15:42:14 INFO]: [Geyser-Spigot] Loading Geyser-Spigot v2.0.7-SNAPSHOT
[15:42:14 INFO]: Server permissions file permissions.yml is empty, ignoring it
[15:42:14 INFO]: Preparing level "world"
[15:44:53 INFO]: [floodgate] Enabling floodgate v2.2.0-SNAPSHOT (b73-4f36112)
[15:44:56 INFO]: [Geyser-Spigot] Enabling Geyser-Spigot v2.0.7-SNAPSHOT
[15:44:59 WARN]: [Geyser-Spigot] Your Geyser config is out of date! Please regenerate your config when possible.
[15:45:00 INFO]: [Geyser-Spigot] ******************************************
[15:45:00 INFO]: [Geyser-Spigot]
[15:45:00 INFO]: [Geyser-Spigot] Loading Geyser version 2.0.7-SNAPSHOT (git-master-33af9e0)
[15:45:00 INFO]: [Geyser-Spigot]
[15:45:00 INFO]: [Geyser-Spigot] ******************************************
[15:45:37 INFO]: [Geyser-Spigot] Started Geyser on 0.0.0.0:19132
[15:45:37 INFO]: [Geyser-Spigot] Done (37.276s)! Run /geyser help for help!
[15:45:38 INFO]: Running delayed init tasks
[15:45:38 INFO]: Done (220.177s)! For help, type "help"
[15:45:38 INFO]: Timings Reset
[15:46:19 INFO]: [Geyser-Spigot] /172.17.0.1:44837 tried to connect!
[15:46:22 WARN]: [io.netty.util.concurrent.AbstractEventExecutor] A task raised an exception. Task: com.nukkitx.protocol.bedrock.BedrockRakNetSessionListener$$Lambda$6014/0x51e8f7d0@dd540f
java.lang.RuntimeException: Unable to inflate buffer data
at com.nukkitx.protocol.bedrock.wrapper.BedrockWrapperSerializerV9_10.deserialize(BedrockWrapperSerializerV9_10.java:87) ~[Geyser-Spigot.jar:?]
at com.nukkitx.protocol.bedrock.BedrockSession.onWrappedPacket(BedrockSession.java:283) ~[Geyser-Spigot.jar:?]
at com.nukkitx.protocol.bedrock.BedrockRakNetSessionListener.lambda$onEncapsulated$0(BedrockRakNetSessionListener.java:39) ~[Geyser-Spigot.jar:?]
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.77.Final.jar:4.1.77.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.77.Final.jar:4.1.77.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.77.Final.jar:4.1.77.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:503) ~[netty-transport-4.1.77.Final.jar:4.1.77.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995) ~[netty-common-4.1.77.Final.jar:4.1.77.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.77.Final.jar:4.1.77.Final]
at java.lang.Thread.run(Unknown Source) ~[?:?]
Caused by: java.util.zip.DataFormatException: incorrect header check
at java.util.zip.Inflater.inflateBufferBuffer(Native Method) ~[?:?]
at java.util.zip.Inflater.inflate(Unknown Source) ~[?:?]
at com.nukkitx.natives.zlib.Java11Inflater.inflate(Java11Inflater.java:21) ~[Geyser-Spigot.jar:?]
at com.nukkitx.protocol.util.Zlib.inflate(Zlib.java:56) ~[Geyser-Spigot.jar:?]
at com.nukkitx.protocol.bedrock.wrapper.BedrockWrapperSerializerV9_10.deserialize(BedrockWrapperSerializerV9_10.java:61) ~[Geyser-Spigot.jar:?]
... 9 more
[15:46:28 INFO]: [Geyser-Spigot] Bedrock user with ip: /172.17.0.1 has disconnected for reason Bedrock client disconnected

Please check it on your own.

Hajo
Hajo
2 years ago

Hey James!
put the dmp link directly to github and one for the I7 wth the old JDK too.
Lets see …

Hajo
Hajo
2 years ago

Hey James,
me again ;-).
Android phone is working like a charme.
But the switch is not seeing the server.
I go to connect to local network and don’t see the server on the switch.
Microsoft account is not connected. This seems to be not possible while connected to local network.
On the android, I have to be connected to the MS account to see the local server.
What should`I change?

Hajo
Hajo
2 years ago

Hey James,
tried that; nothing better. I currently have the impression, the restriction is on the switch side 🙁
I will be back on that – if I am succesfull 🙂

Jeff
Jeff
2 years ago

I’m not sure what I’m doing wrong but I can’t get the server to start after the first time. It will initially start and work just fine but after a restart it won’t start again and I can’t seem to find a command that will start it back up. Tried Ubuntu 20.04.3 adn 22.04.1 with similar results. It also installs to a different directory than listed above for Linux, mine installed to /var/snap/docker/common/var-lib-docker/volumes/yourvolumename/_data. I’m pretty new to ubuntu but I’m trying to get this running on a VM and I figured that would be the best route to go to limit as much overhead as possible.

Stephen
Stephen
2 years ago

For restart you can use some of these switches. I added –name and –restart as part of my kickoff script: docker run -it -v minecraftserver1:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -d –name minecraftserver1 –restart unless-stopped 05jchambers/legendary-minecraft-geyser-floodgate:latest

Stephen
Stephen
2 years ago
Reply to  Stephen
Stephen
Stephen
2 years ago

Yep, use docker-compose/ansible at work for on-prem server config and app deployment (non-k8s-hosted apps). Probably easier to have a docker-compose.yml file handy rather than remembering command line switches. Thanks for reminding me and providing one, and I’ll download it so my son can edit it and configure multiple servers!

Stephen
Stephen
2 years ago

Trying to run this on Docker/Mac. The container builds OK, but I think the volume mounting is causing problems. I get some log errors telling me that there is no secure profile applied when my son tries to connect from a java client. I have created a volume and mounted it using docker desktop, and “docker volume inspect” shows that it should be at /var/lib/docker/volumes/minecraft-server/_data. However in the Docker desktop GUI it seems to show that the volume mount is being accessed, and I can “explore” the data there, but not edit. I did try to go to ~/Library/Containers/com.docker.docker/Data/vms/0/data but there is a Docker.raw folder that might be the volume that you cannot access. I did docker exec -it /bin/bash into the container to try to modify files, but there seems to be no editor in the Docker build (might want to add for future). I ran apt-get install vim and edited the server.profiles to disable secure client (set false) and restarted and the client could connect. I can probably spin up some Linux/Raspi server to run this to get at the local files, but for now this works. I should also look at a way to access the container files on the host (in the Docker.raw file), which is quite easy on linux volumes, but I’m not sure how to do this on Mac.

Stephen
Stephen
2 years ago

James, thanks for the quick response and the changes! I still have the server running on my old Mac Mini, but my son and I put another one together on a Pi4. Thought it was a good idea to teach him to use Linux Subsystem and build a Pi/Ubuntu/Docker server. Now we have a portable minecraft server that we use with our portable WiFi/4G/Ethernet router. This is cool. I’ll need to check out the Mac/path stuff someday, but for now we are good and everything works out of the box with the “secure profile” setting off.

By the way, I’ve been following your blog for a long time (can’t remember when) and the combination of RasPi stuff, other hardware/security hacks, and crypto stuff is definitely my kind of interests. Thanks for putting content out there, I’m sure there are lots reading it. In fact I recommended it to my team at work as they are building docker/k8s servers on RasPis for learning. (Also Alex Ellis from OpenFaaS also has cool pi/cluster/boot info).

Stephen
Stephen
2 years ago

I think I started learning Unix/Linux back in 2002 when my company dropped me into a project that used massive Sun servers to run their OA&M (ops management project). Knowing nothing, I got one of the first editions of Evi Nemeth’s classic Unix admin guide from a bookstore(!) and used Knoppix live CD on my company’s Dell Windows laptop to force myself to learn the CLI. Now it’s everywhere, it’s astonishing, but I’m far from a poweruser. Good luck with the crypto, I just started spring 2021 (ouch), despite working on distributed systems and with young engineers, somehow ignored it until now. As they say, we are still early – I hope…

1 2 3 17