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

463 Comments
Inline Feedbacks
View all comments
Daniel
Daniel
1 year ago

Hi, Thanks for this Server. Works like a charm.
As proposed i used -e ScheduleRestart=”3:30″. But it does not restart. What am i doing wrong? The docker command is running in a byobu (screen). Is this the problem?
I would have expected, that with the daily restart I would also have a daily backup (10 Versions).
Thanks

elborderas
elborderas
1 year ago

Hi,
I have two Bedrock server running with your previous script and I am trying to migrate to this new Java+Bedrock service but I am having difficulties migrating the existing worlds.
I am setting up everything in Debian 11.

I am able to start a container with a new world, so that works.

The problem is that I am not capable of properly migrating the old world and have it loaded in the new service with docker.
In the past you mentioned to run:
sudo cp /home/youruser/minecraftbe/yourserver /var/lib/docker/volumes/yourvolumename/_data

Which basically just copies the folders and files from one place to another.
Unfortunately this doesn’t work.
It seems the folder structure is completely different, the data inside the worlds is also completely different.

If i copy the data from the old Bedrock server to the container, when starting the container all the info will be ommitted and a new world will be created.
It only keeps few things like the world name, so i guess some info is understood from the server.properties file but it is not what i need.

Example of bad things happening:
– Old Bedrock server. World named “Creativemode” is under folder “worlds”
– This is copied into …./volumename/_data/worlds/Creativemode
– When starting the container, the world will be created new here: …/volumename/_data/Creativemode
– There are obviously way more files and folders, like 2 more folders for nether and the end.

So, any idea how to properly migrate the old worlds and settings?

Thanks

elborderas
elborderas
1 year ago
Reply to  elborderas

Ok, i realized that i can easily transfer, and indeed completed, the server to the container if i use only Bedrock, as explained here: https://jamesachambers.com/legendary-minecraft-bedrock-container/
I do have now the advantage of having my servers in containers, and not using the old system explained here: https://jamesachambers.com/minecraft-bedrock-edition-ubuntu-dedicated-server-guide/

My question is: Can i migrate to the full deal, Java + Bedrock, while maintaining my existing worlds?

elborderas
elborderas
1 year ago

Hey, Thanks for answering so quickly.
It seems that we both found the same resources while i was trying to investigate this.
I found about Chunker 1h ago and i did successfully convert them to Java so I am not finalizing the two containers with JAva+Bedrock.

so far so good but i am having trouble understanding if the world conversion worked properly. The reason being is that my kids do the gaming part and not me, so I am not sure what to expect LOL

I double checked one of them where i played at the beginning and it seems that the structures are there, but the inventories are all empty.

I am not sure if this has to do with also the thing that usernames are different in Java version. A “dot” has been added in front of all usernames so not sure if that is something that may affect the inventory, for example.

Anyhow, I’ll have to wait until tomorrow to check with my kids and see if the 2 worlds look as they should.

If not, I guess I’ll just tell them “bad luck” and stick to this Java+Bedrock version.
In the future I’ll like to explore all the things that one can do in Java versions that you cannot in Bedrock, like the puglins.

Anyhow, thank you so much for these wonderful scripts 🙂

elborderas
elborderas
1 year ago

Thanks for this great breakdown of the tool and its possibilities.
I ended up restoring temporarily the old worlds and asked my kids to put their inventory into containers. It seems it has worked so we are all happy now 🙂

This Chunker tool is really cool.
I did find though some issues this last time as the tool was complaining about too big (in size) for one of my worlds so I needed to do some cleaning until i managed to make it get through (deleted backups, downloaded files, for example).

So I am all set now with this new version.

Next: find time to investigate about this new (to me) world of plugins and stuff that I can use and see what works in Java, Bedrock, both, etc.
I guess I have a lot of reading and research ahead of me 🙂

Thanks again for making all this so easy to all of use

Tom
Tom
2 years ago

how would i use this and run aikars flags with it?

Tom
Tom
2 years ago

ok so i feel dumb now but i realised i was running on a 32 bit os, so i was locked to 2gb of ram, haha

Arathi
Arathi
2 years ago

Also, just wanted to add in a few things that I took from here, and figured I’d share! Just in case anyone would like to add to their sever. You have a bunch of options above that I use to start my server after a reboot (I tried the auto restart server, and seem to have not done it right yet…. However, rather than constantly trying to hit the up button and locate the options, I made a script and I just launch it now.

I put it in /opt/scripts/ and called it ‘minecraft.sh’

All I need to do after a reboot, when I want to start the server is type ‘sudo /opt/scripts/minecraft.sh’

Here’s the info to put into the script:

mcjbr:/minecraft is the install directory

#!/bin/sh
#Total commands to run for the hybrid MC server

docker run -it -v mcjbr:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e Version=1.19.2 -e MaxMemory=6144 -e TZ="America/Vancouver" -e NoScreen=Y 05jchambers/legendary-minecraft-geyser-floodgat>

AND, I set up a weekly backup through a script and cronjob too. I only did weekly, because our single world is already 19GB (I like to explore). It’ll (should) overwrite the oldest after 7 backups. The cronjob is where you specify how often to back up.

Called the script ‘mcbackup.sh’

#!/bin/sh
####################################
#
# Backup minecraft world to a
# specified folder.
#
####################################

# What to backup. Name of minecraft folder in /opt
backup_files="BACKUP FOLDER NAME"

# Specify which directory to backup to.
# Make sure you have enough space to hold 7 days of backups. This
# can be on the server itself, to an external hard drive or mounted network share.
# Warning: minecraft worlds can get fairly large so choose your backup destination accordingly.
dest="THIS IS YOUR PATH"

# Create backup archive filename.
day=$(date +%A)
archive_file="$day-$backup_files-.tar.gz"

# Backup the files using tar.
cd (PATH TO BACKUP FOLDER MINUS THE FOLDER ITESELF) && tar zcvf $dest/$archive_file $backup_files

Arathi
Arathi
2 years ago
Reply to  Arathi

Oops. The command was cut off…..

docker run -it -v mcjbr:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e Version=1.19.2 -e MaxMemory=6144 -e TZ="America/Vancouver" -e NoScreen=Y 05jchambers/legendary-minecraft-geyser-floodgate:latest --restart unless-stopped

Arathi
Arathi
2 years ago

Hi James,

I’m curious if World Edit schematics would work in this? I may be doing something wrong, or I’m not and it’s not possible. Just curious!!

-=Error=-

[11:23:36 INFO]: M_Arathi issued server command: //schematic load elven-tower.schem
[11:23:36 ERROR]: Uncaught exception occurred in task: Loading schematic elven-tower.schem
java.io.EOFException: null
at java.util.zip.GZIPInputStream.readUByte(Unknown Source) ~[?:?]
at java.util.zip.GZIPInputStream.readUShort(Unknown Source) ~[?:?]
at java.util.zip.GZIPInputStream.readHeader(Unknown Source) ~[?:?]
at java.util.zip.GZIPInputStream.(Unknown Source) ~[?:?]
at java.util.zip.GZIPInputStream.(Unknown Source) ~[?:?]
at com.sk89q.worldedit.extent.clipboard.io.BuiltInClipboardFormat$2.getReader(BuiltInClipboardFormat.java:94) ~[worldedit-bukkit-7.2.12.jar:?]
at com.sk89q.worldedit.command.SchematicCommands$SchematicLoadTask.call(SchematicCommands.java:320) ~[worldedit-bukkit-7.2.12.jar:?]
at com.sk89q.worldedit.command.SchematicCommands$SchematicLoadTask.call(SchematicCommands.java:304) ~[worldedit-bukkit-7.2.12.jar:?]
at com.sk89q.worldedit.command.util.AsyncCommandBuilder.runTask(AsyncCommandBuilder.java:158) ~[worldedit-bukkit-7.2.12.jar:?]
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131) ~[guava-31.0.1-jre.jar:?]
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74) ~[guava-31.0.1-jre.jar:?]
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82) ~[guava-31.0.1-jre.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
at java.lang.Thread.run(Unknown Source) ~[?:?]

Arathi
Arathi
2 years ago

Interesting. When I downloaded them, they came upacked and I FTP;d them into the schematics folder. I should zip them?

They came from here: https://www.planetminecraft.com/project/elven-tower-a-fantasy-building-l-free-to-use/

Arathi
Arathi
2 years ago

Interesting. I built a huge castle from blueprints, and then save the schema. It saved to the same location as the schema’s I’m trying to load.
(I’m in as root, since I keep my users with less permission. Using su –

castle.schem is mine I just created….

root@mcjbr:/var/lib/docker/volumes/mcjbr/_data/plugins/WorldEdit/schematics# ls -l
total 8
-rw-r--r-- 1 root root 5329 Dec 17 20:33 castle.schem
-rw-rw-r-- 1 root itadmin 0 Dec 17 17:22 elven-house.schem
-rw-rw-r-- 1 root itadmin 0 Dec 17 16:52 elven-tower.schem
-rw-rw-r-- 1 root itadmin 0 Dec 17 16:51 fachwerkhaus.schem
-rw-rw-r-- 1 root itadmin 0 Dec 17 16:59 victorianhouse2.schem
root@mcjbr:/var/lib/docker/volumes/mcjbr/_data/plugins/WorldEdit/schematics#

Arathi
Arathi
2 years ago

Ohh good catch. I totally didn’t notice that. Let me try this again. brb

Arathi
Arathi
1 year ago

So….. lol When I built the server, I made it 100GB. Figured that should be enough, BUT it turns out that I *really* like to explore….. (My last single world backup was 25GB) The reason they were coming up 0 bytes is because I was out of space. I just expanded the disk to 250GB and was able to get the files over.

Just loaded a schematic, and it’s good now.

I should probably just dedicate an entire 3TB drive to this server. hahaha

/facepalm

Aleksey
Aleksey
2 years ago

Hi, how can I enter to the screen of the server, or the server console? I got into it just the first time I ran the command of start up, but then I do to know how to enter again to the screen

Tom
Tom
2 years ago

how do i modify the startup java flags? my server is currently stuck at running on a max of 1gb of ram when i have 8