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

405 Comments
Inline Feedbacks
View all comments
Jeff Sadowski
Jeff Sadowski
1 year ago

Is there a way to setup firewall rules for the container if it has it’s own ip on a macvlan?

Arathi
Arathi
1 year ago

Hi James,

This command doesn’t appear to work at all.

–restart unless-stopped

I have to always have a console up and running if I want the server to be online. Am I missing something? I’d really like to have the server running all the time, and restart if the server does. I am playing with a new server (so that I don’t break our existing one) and it’s running on a “new to me” Dell PowerEdge running esxi 8. I’d much rather not have to build a second windows server that I have a console running on. I’d just like the server itself to always be on. Biggest reason for this is that I will be travelling out of country for a couple weeks, and my kids will still want to play.

Thoughts on what I may be missing?

Arathi
Arathi
1 year ago

Thanks! I updated to see and while closing the console window didn’t seem to restart it, detaching the container absolutely works! Thanks! This will make my life so much easier. Just trying to sort out a good vpn that can handle Starlink’s CGNAT now, just in case. lol

makakam
makakam
1 year ago

Hi I’ve installed this server and all is fine but some plugins don’t work fully, for example: I’ve installed this one and when I write the command /fj2r give (my_username) jetpack I get “Jetpack didn’t exist” Why?

Jason
Jason
1 year ago

This is amazing, thank you for all your work on this! I got the server up and running on my Raspberry Pi 4 B, and connected via bedrock (from Win 10). This was by far the simplest and most fully featured server I’ve been able to get going!

Now I’m trying to use the RaspberryJuice plugin with it so I can use Python (I was trying mcpi_e, though if there are better options, I’m not wedded to mcpi_e or RaspberryJuice) to interface with it. After putting the raspberryjuice-1.12.1.jar file in the plugins folder (/var/lib/docker/volumes/mcdocker/_data/plugins) and restarting the docker container, I get a Legacy plugin warning:

[WARN]: [org.bukkit.craftbukkit.v1_19_R2.legacy.CraftLegacy] Initializing Legacy Material Support. Unless you have legacy plugins and/or data this is a bug!

and mcpi_e (from win10) can’t connect to the docker server on the API port (4711). Do you have any insight?

While the error I get in Python:

"ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it"

could be a number of things, given the legacy warning above, it sounds like a compatibility issue to me. If so, do you have dockers with older versions of the server that might be compatible with RaspberryJuice (last updated 2020-02-03, latest tested version 1.12)? I tried using the version command you gave with version 1.12.2 (the latest tested version with RaspberryJuice) and Geyser wasn’t supported (and the same Python error). I tried 1.13.2 (the earliest version supported by Geyser). That didn’t work, and I think I’m going down a rabbit hole…

Jason
Jason
1 year ago

Thank you for the thorough response and interesting backstory. Ok, so I’m not wedded to Raspberry Pi or the Pi ecosystem (I am a fan of the project’s ideals, but I guess that was naïve).

What I really want is to run a playable (likely dedicated) server that supports Bedrock and Python (Java and scratch would be a welcome bonus) for ~< 10 remote people with some reasonable expectation of support for as long as possible. It must be free to other players. It would be great if the hardware on my end is cheap, but that is not a primary concern. Is there anything available that fits that bill?

If not, I'm a reasonably competent Python programmer and not opposed to learning Java. Is it at all realistic to think I could fork and revive the RaspberryJuice plugin/mcpi_e with some (~100 hrs of) sweat equity? I think even the supported commands would be enough. Or is this just impossible because the backend hooks are no longer exposed in the current version of minecraft?

Jason
Jason
1 year ago

I think that plugin is a bit different — I think it allows a user to write plugins in python rather than in java, not interface with the minecraft API using python. I found a couple plugins like that.

I was able to follow these directions and get python working through java minecraft 1.12 using the mcpi library (the predecessor to mcpi_e). I was able to do most of what I wanted (even rendering arbitrary STL files inside minecraft!), but it was only available in java and I couldn’t get remote connections working which is a non-starter for me. But it didn’t require Minecraft Pi (unless that refers to the server software?).

I also found this but it seems to be oriented around account management, not gameplay.

Jason
Jason
1 year ago

Oh how disappointing. That could be (and was!) such a powerful tool to get kids into coding.

Jason
Jason
1 year ago

Thanks for those links! Your first link shows him getting mcpi working with Java 1.18.2 (released Feb 2022). He connects to localhost, but can actually specify the server address, suggesting remote connections might work. That’s promising. The bedrock requirement might be negotiable.

My primary goal is to get my kids and their cousins/friends playing and coding together (and your docker container made half of that easy!). Of course, if solving it for my kids means solving it for students worldwide, that’d be wonderful.

I didn’t have much specific in mind, I really just wanted to showcase the power and potential of coding to curious minds. That unlocks a whole new level of sandboxing (while learning super valuable skills). The examples I saw were neat (build a rainbow, plant a trail of flowers), but they’re barely scratching the surface. For example, one of my niblings is into solidworks, and I was able to render a couple of his drawings within minecraft via python’s stltovoxel library. If I could get a python enabled bedrock server running, he could draw something in solidworks and export it to our minecraft world. When you can link world building into countless python libraries, who knows what they’ll dream up? Build a planetarium with pyephem? Render a folded protein with biopython? Build a scale model of your home town with pyqgis? Redstone and other advanced blocks couldn’t be placed with the mcpi library I used, but that’d be a whole new level — design circuits with SKiDL and prototype them in minecraft? Maybe you could still render the skeleton of a circuit with mcpi as is.

Those “hour of code” things look surprisingly well done, but it’s not nearly as organic or as powerful as a direct python interface.

Jason
Jason
1 year ago

Great, I’ll give it a shot!

I’ve reached out to the RaspberryJuice developer too to see if he has any pointers or warnings for me. If the reason he stopped is because the backend is no longer accessible, I’d rather learn that now.

Jason
Jason
1 year ago
Reply to  Jason

That was easier than expected!

I have the latest official Java Server with the latest spigot jar file (1.19.3) running on Win 10 that works with the current java minecraft version (1.19.3) using mcpi from a remote connection (after forwarding port 4711). Unless custom java is included in the spigot or raspberryjuice (1.12.1) jar files, I don’t think I’m doing anything particularly weird. I do get the same legacy warnings about RaspberryJuice I got when I loaded your docker container, but they don’t seem to have any negative impact.

That’s workable now, but ideally, I’d like to run it from my Raspberry pi and allow connections from bedrock. Is that something I can recreate using Geyser and Floodgate like you do here?

Jason
Jason
10 months ago

Hi James,

Thanks again for your guidance back in February.

I ended up forking MinecraftDawn’s RaspberryJuice fork, cleaned it up, added a few of my own features, and renamed it to FruitJuice.

I also made a few additions to MinecraftDawn’s fork of mcpi (the companion python library) and rebranded it to “pyncraft”, which is pip installable.

Finally, I made a few tweaks to arpruss’s scratch plugin, and now it works with scratch, too.

So now I have a Python/scratch API to the latest version of vanilla minecraft (without the legacy layer) that works on Java or Bedrock from anywhere in the world.

Directions to set up a server here

Jason

Jason
Jason
1 year ago

Got it! An up-to-date, remotely accessible, Java/Bedrock/Python server running on a raspberry pi that is remotely accessible.

Here are complete (hopefully!) directions that are meshed together from the link you gave and this page.

In the end, I think this is like the docker container you describe here, so I’m not sure why it didn’t work out of the box. Maybe the python port (4711) wasn’t open?

Any any rate, feel free to use this however you like.

I might still play with RaspberryJuice to get it up to date and add support for more block types like redstone, but this is more than I was hoping for! Thank you!

Jason
Jason
1 year ago

Python came pre-installed on raspbian, but I don’t think it’s used by raspberryjuice. I never installed mcpi on the server, just the client. So I think just adding the -p 4711:4711 to your docker command would do it. That’s a lot easier than my writeup!

Jason
Jason
1 year ago

I heard back from the RaspberryJuice developer. He pointed me to this pull request and the discussion therein. Basically, 13.1+ broke the plugin by changing the block map from integer ids to strings. Fortunately, the legacy layer within paper/spigot/Bukkit fixes it, which is why it still works. Still, the RaspberryJuice developer took that opportunity to wash his hands of it.

There is an updated fork called JuicyRaspberryPie but it still calls the legacy layer, it created a bunch of files in non-standard places, added mcpi (as a dependency?), and it broke my server. It also hasn’t been updated in a year and the documentation didn’t make it clear what value it adds over the original. I didn’t try very hard to get it to work, but it didn’t seem worth the time. If I fork it, I’ll start over with RaspberryJuice.

Meanwhile, I tried to get scratch to work but I was never able to connect to my server. That instructable comes from the author of RaspberryJamMod, another alternative to RaspberryJuice, and was never tested with RaspberryJuice (but he said it should work, albiet with version 1.12.2). I do get a response from my server when it tries to connect that makes me think it’s a bug in RaspberryJuice (java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 68). It’s worth noting that the default security settings block the connection because it has a secure page connecting to an insecure websocket, so you have to allow “insecure content”. Also, scratch’s hardcoded port is 14711, which is different than the default port used by the python API (4711).

Hakan
Hakan
1 year ago

Hello! First, i love the idea of MC docker. Great idea. Second, i have some problem getting the Minecraft Java + Bedrock Server Together – Geyser + Floodgate docker to get up and running on the rpi3.
Question: What would be a “stable” MaxMemory size at docker startup script for rpi3?
Question: Is the Maxmemory setting also a cap for swap memory?
Question: Shall be GPU memory be alted in the docker version also to 16Mb?
Symptom: Servercrash often before the server is up and running. The server poped up one or twice, and afterwards crash. One user only then. Severals SD card erase and install. I assume i have hit memory overrun as the rpi3 only have 1G in total. I have used MaxMemory=1024 and less. All other times the server never comes up but get stuck in startup script.
Thanks in advance!

Randomguy
Randomguy
1 year ago

Hi James,

I am trying to change the paper config, but every time I restart the server to apply the changes, it resets them to default.
Any idea how to fix this?

Randomguy
Randomguy
1 year ago

Hello James,
I have tried to do this a couple of times, but still it seems as it resets to some default setting which doen’t allow me to keep them.

nathan
nathan
1 year ago

How would I op myself, I cannot find a way to access the server’s console once started?

Swedenstyle34
Swedenstyle34
1 year ago

Thanks dude! 🙂

Blazeop
Blazeop
1 year ago

To detach from a docker container, you’d have to hold Ctrl, press P then follow it with Q… Ctrl + P + Q.

1 3 4 5 6 7 14