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!
Hello, I loooove this container, and can’t wait to play with my 7 yr old and his cousins. Unfortunately, I just tried to install it and I get the following output:
sudo 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
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: 25565
Bedrock port used: 19132
Taking ownership of all server files/folders in /minecraft...
Complete
Updating to most recent paperclip version ...
Unable to connect to update website (internet connection may be down). Skipping update ...
Starting Minecraft server...
Error: Unable to access jarfile /minecraft/paperclip.jar
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: 25565
Bedrock port used: 19132
Taking ownership of all server files/folders in /minecraft...
Complete
Updating to most recent paperclip version ...
Unable to connect to update website (internet connection may be down). Skipping update ...
Starting Minecraft server...
Error: Unable to access jarfile /minecraft/paperclip.jar
When I cd into /var/lib/docker/volumes/yourvolumename/_data, there are no folders or files there. Am I doing something wrong? This is my first time using Docker!
Hey Ryan,
It sounds like Docker is having DNS issues. It’s not able to resolve the web site it looks like. Usually the fix for this is to update your Linux distribution to the latest revision. There are also usually articles in google if you google your distro and fixing the DNS for Docker as well.
Hopefully that helps!
I am on Raspbian GNU/Linux 10 (buster). I ran “sudo apt-get update && sudo apt-get upgrade”, and everything is already up to date. I did some googling, but there appear to be a plethora of issues/solutions that could be causing a DNS issue with Docker. I am not sure what to try next…?
Hey Ryan,
That’s a pretty common issue with Buster. Upgrading to Bullseye (11) will fix it. Hopefully that helps!
I do have PiHole running on a different Pi on my network. Could that be contributing to this issue?
Hey Ryan,
Possibly if it’s blocking requests to minecraft.net. I’d imagine it’s because it’s running Debian Buster though as I’ve never known anyone running Buster to not have this issue. Bullseye will fix it though!
Are shader packs able to be used and installed? I’d love to get less vanilla.
Hey Arathi,
I think those things are generally more in the “Forge” ecosystem. I’m not sure if there’s anything similar for Paper / Spigot. Hopefully that helps!
Hi James, I have my own paper/geyser/floodgate setup that I use for Bedrock clients. I’m not using your docker container, but I think you may know the answer to this question — how can Java clients connect to my server? When I use the usual IP that works for Bedrock clients on a Java client, the Java client can’t connect. Do I need to forward a different port for the non-proxied server or something?
Hey Eric,
You’ll need to port forward 19132 (the Bedrock default port). It basically connects on the Bedrock port to Geyser so the Java ports won’t be used for Java clients.
Hopefully that helps!
Thanks for the reply! I’m already forwarding both the default Minecraft server port (25565, via TCP/UDP) and Geyser port (19132 via UDP). I wrote up my approach here. I assumed that Java clients try to connect to port 25565 and Bedrock clients to port 19132, and with both forwarded, either client type could connect. But I don’t see any messages on my server of the Java client trying to connect.
Could it be that I’m using the wrong protocol for port 25565? Or that the Bedrock/Geyser port is somehow shadowing / interfering with the default Minecraft port?
Hey Eric,
Will it let you add it for both port types? Or can you add another entry? Also check Geyser’s startup messages and make sure it doesn’t say there’s a problem on the listening port.
You could also try setting a different port in the options to rule out any type of conflict. Try setting a custom port in the Geyser settings and then port forwarding that and see if you have better luck. Hopefully that helps!
Hello James, I just have a quick question. How could I make the server restart at a certain time (e.g. 4 AM) every day?
Hey Ray J,
I’d typically recommend just using a cron job to restart the Docker container. There’s some instructions here in this reddit post. Hopefully that helps!
Thanks, cron seems like a very helpful tool.
Has anyone else had issues with the entire docker container crashing when a Java client connects? I’m having no issues with my Bedrock client it works fine (other than I don’t have any of my clothing from my Xbox user). But whenever I connect with my Windows Java client after about 5-10 seconds of connection I’m kicked out and my docker logs show that the server has closed/crashed and starts the restart process. I’m using a fairly basic docker compose and I’m using a Bedrock world that I converted to Java to use this specific container/setup.
Below is the front end of the error I can provide it all if you would like.
2023-08-22T22:05:50.744551196Z >....
[15:05:50 INFO]: DanGarion lost connection: Server closed
2023-08-22T22:05:50.771632711Z >....
[15:05:50 INFO]: DanGarion left the game
2023-08-22T22:05:50.854540401Z >....
[15:05:50 ERROR]: [ChunkTaskScheduler] Chunk system error at chunk (37,14), holder: NewChunkHolder{world=world, chunkX=37, chunkZ=14, entityChunkFromDisk=false, lastChunkCompletion={chunk_class=net.minecraft.world.level.chunk.ProtoChunk,status=minecraft:carvers}, currentGenStatus=minecraft:carvers, requestedGenStatus=minecraft:initialize_light, generationTask=ChunkProgressionTask{class: io.papermc.paper.chunk.system.scheduling.ChunkUpgradeGenericStatusTask, for world: world, chunk: (37,14), hashcode: 196127333, priority: COMPLETING, status: minecraft:features, scheduled: true}, generationTaskStatus=minecraft:features, priority=NORMAL, priorityLocked=false, neighbourRequestedPriority=NORMAL, effective_priority=NORMAL, oldTicketLevel=34, currentTicketLevel=34, totalNeighboursUsingThisChunk=7, fullNeighbourChunksLoadedBitset=524828, chunkStatusRaw=0, currentChunkStatus=INACCESSIBLE, pendingChunkStatus=INACCESSIBLE, is_unload_safe=ticket_level, killed=false}, exception:
2023-08-22T22:05:50.854586497Z java.lang.Throwable: net.minecraft.world.level.chunk.MissingPaletteEntryException: Missing Palette entry for index 6.
2023-08-22T22:05:50.854595367Z at io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.unrecoverableChunkSystemFailure(ChunkTaskScheduler.java:276) ~[paper-1.20.1.jar:git-Paper-156]
2023-08-22T22:05:50.854602490Z at io.papermc.paper.chunk.system.scheduling.NewChunkHolder.lambda$setGenerationTask$4(NewChunkHolder.java:1700) ~[paper-1.20.1.jar:git-Paper-156]
2023-08-22T22:05:50.854608637Z at io.papermc.paper.chunk.system.scheduling.ChunkProgressionTask.complete0(ChunkProgressionTask.java:95) ~[paper-1.20.1.jar:git-Paper-156]
2023-08-22T22:05:50.854615411Z at io.papermc.paper.chunk.system.scheduling.ChunkProgressionTask.complete(ChunkProgressionTask.java:75) ~[paper-1.20.1.jar:git-Paper-156]
2023-08-22T22:05:50.854622116Z at io.papermc.paper.chunk.system.scheduling.ChunkUpgradeGenericStatusTask.run(ChunkUpgradeGenericStatusTask.java:105) ~[paper-1.20.1.jar:git-Paper-156]
2023-08-22T22:05:50.854646421Z at io.papermc.paper.chunk.system.scheduling.queue.RadiusAwarePrioritisedExecutor$Task.run(RadiusAwarePrioritisedExecutor.java:467) ~[paper-1.20.1.jar:git-Paper-156]
2023-08-22T22:05:50.854654034Z at ca.spottedleaf.concurrentutil.executor.standard.PrioritisedThreadedTaskQueue$PrioritisedTask.executeInternal(PrioritisedThreadedTaskQueue.java:351) ~[paper-1.20.1.jar:git-Paper-156]
Hey DanGarion,
You can try using some of the solutions at the bug report for this issue here. This includes fixes like this:
For anyone who can't upgrade to 1.19 (which allegedly fixes the bug) - here's how I "fixed" it:
1. moved player data file out of playerdata/
2. join server once
3. replace new file with original one
I’d imagine if you start a new server though this won’t happen and something has been corrupted. Hopefully that helps!
Regarding my previous comment I just checked my timings report and it says that I only have 974 mb of ram.
Hi James. I have a raspberry pi 4 with 4 GB of ram and the server seems to be using less than 2. I have a plugin called laggremover installed which removes lag from the server but it reports that I only have 1 GB of ram available for the server. I am noticing slowness and lag most likely from the lack of ram. How could I give the server more ram to work with? Thanks.
Never mind I figured it out
Hey Sam,
How much RAM you have available is determined by the command:
free
It sounds like the Pi must be running a lot of other services that are already using up most of your 4GB of RAM. To get a chance to select a higher value try closing some of the other processes using all of the RAM and it should become available for use.
Hopefully that helps!