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!
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
Hey Daniel,
Welcome! So most likely the reason is actually the timezone. It’s probably very, very far off from what would be 3:30am there. The first thing I would try is:
-e TZ="America/Denver"
Substituting your correct timezone from this list of Linux timezones here.
Can you give that a try and see if it takes care of it?
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
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?
Hey elborderas,
Welcome and great question! I’m impressed by how well you navigated everything so far and were able to import everything into the container.
I think I have just the thing. You need to as you were alluding to convert the world. I recently learned of a tool called Chunker that can do this here. There’s a full tutorial on how to use it here as well.
Basically I think you need to just upload your world folder or a zip containing it to Chunker and choose to have it convert it to Java. You can then import it normally as you’ve been trying to into the Java version of the container once it’s converted to a Java world.
I’ve never tried this before but here’s what it says at the bottom of the page for Chunker:
Proudly made by Hive Games under exclusive license to Minecraft
It looks like this site is actually *licensed* to do this from Minecraft. There’s probably nothing else like it as far as a licensed web site to do this.
The only other possibility would be one of the map editor tools that is designed to edit both Bedrock and Java maps. Amulet claims to be able to edit both formats and save / convert between them as well.
Those are two ways you could do this. I would highly recommend giving Chunker a try. I’d be curious how well that works for you if you try Chunker but it looks fantastic. Hopefully that helps!
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 🙂
Hey elvorderas,
That is great news! I’m not sure how long this Chunker solution has been around. That’s the first time I’ve ever seen it and I’ve been asked this question many times before so this is a very positive development.
It looks like it rose straight to the top though in Google though as when I was looking up references I was like “hmmm, what is this?”. Not very many people have successfully done this in the past because it usually involved using one of the few map editors that can save between both formats (which is what I was trying to search for when I found Chunker, I was trying to find the few map editors like Amulet that could do the conversion as that’s the only way I previously knew of and I can never remember the name of them and could swear it changes every time I look).
It turns out there’s actually Microsoft documentation on Chunker here. The documentation is only dated November 29th 2022 so this is very new stuff. It says:
Chunker can currently convert:
-Level settings
-World data (blocks, biomes, and tile entities)
-Multiple dimensions
-Container & items
-In-game maps
Chunker cannot currently convert
-Entities
-Player inventories
So it looks like the smartest thing to do might be to have your players put all of their inventory contents in chests and then do the Chunker conversion. It says it can transfer chests/containers. It definitely says it can’t do inventories though. It can’t do entities either which are generally like pets/horses/monsters/whatever that you name with a name tag so that one probably isn’t a huge deal (if they have barns with a bunch of animals in there they might have to round them up again potentially as well).
I wonder if the Chunker tool has maybe been around for a while but what has happened is Microsoft either bought them or actually did license with some other company so now it’s being promoted and is *much* easier to find in the search engines. I’m not sure what the story behind the tool is but it’s something people have asked for for a really long time and there historically were not very many options (and not very good ones either, *definitely* nothing officially sanctioned by Microsoft/Mojang). I initially thought maybe they developed it themselves but the company at the bottom of the page is not one I recognize as one of theirs (but maybe it is). You’d think it would just say Mojang/Microsoft if it was an official tool so it does seem like a partnership of some kind.
This tool is actually such a big deal that I will probably publish an article this month on converting Bedrock and Java worlds back and forth between each other using this officially licensed / sanctioned tool. That seems like a content winner and would let me promote the open source scripts / containers a little bit more and bring more people into the open source community (at least as much so as possible with Minecraft which is a closed-source game). It’s brand new judging from the official Microsoft documentation publication dates and as someone with 4 Minecraft Docker containers and 2 standalone script projects I had never heard of it before or heard it mentioned to me before and there were *dozens* of people over the years this would have helped.
It’s probably not too hard to have the kids throw everything in a container/chest they want to save (and a lot of their stuff in their buildings is probably already in chests like their mining resources etc. so that helps) and that’s typically your most important stuff. It’s probably at the very least not as bad as starting with a bare inventory. Thank you so much for your kind words about the script and your detailed posts outlining all of your steps. Enjoy and take care!
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
Hey elborderas,
Excellent, that is very exciting! Thanks for the caution about the world size too. That is going to be useful for when I write the Chunker article. I’ll make sure to tell people using my scripts/containers to make sure they clear out the “backup” folder before uploading otherwise it may add too much extra size and make it reject it.
I definitely wonder what it will look like in 6-12 months. I wonder if it will indeed be able to do inventories and entities by then. This is a great start though. There’s never been anything quite like it that I’ve seen.
Thank you so much for your detailed comments throughout the process as well. Let me know if you need anything else for sure, enjoy and take care!
how would i use this and run aikars flags with it?
Hey Tom,
Yes, I remember those being worth it back on Sun / Oracle Java 8. We’re now on OpenJDK 18. This is also a Paper Minecraft server which has far more impactful settings. The flags are kind of funny because they set up things like G1 garbage collection. That has literally been the default since OpenJDK 9+.
Do you have more than 100 players? You’re almost certainly wasting your time otherwise but if you’re big enough that this is at all warranted you would actually build your own custom version of the container with the flags you want. This would only take a couple of minutes. You would just put whatever flags you need in start.sh.
These have been benchmarked in modern times. Someone made a whole project to benchmark the difference from using these flags. They found this:
While these tweaks notably reduce some server and client stutters, expect only modest TPS gains + minimal FPS gains at best, and somewhat increased RAM + CPU usage. And they are no substitute for clearing laggy things out with mods
If you want to optimize your server look into a Paper optimization guide. There are settings such as the monster spawn, activation distance and things like that which will have 10x the impact on performance for your server than all of nearly decade old Aikar flags combined.
The reason I love the above project is that they actually measured this. In IT when people don’t really understand what is going on there is a whole bunch of superstition and snake oil stuff like this. Explain to me a single reason you think these flags will help you. Technically. Where did you hear about these? Almost everyone finds them by googling how to optimize their Minecraft server. That’s just it though. The reason this comes up in Google is because it’s ancient, old outdated information from many, many years ago and that stuff has ranked at the top of Google for years even though it’s outdated.
It’s honestly just one of those things where it’s something that used to be really smart to do on Sun / Oracle Java 8 and it’s just lived on in the community even though these have been worthless for at least 5 years and maybe even closer to 8-10. We can actually measure this stuff though. Aikar himself made the TPS benchmarking code within Paper / Spigot to measure it. The reason these flags worked such as G1 garbage collection haven’t applied for years. They weren’t even meant for OpenJDK. They were meant for Sun Java 1.8 (now Oracle, but back when these flags made sense to use it was Sun and just barely becoming Oracle toward the end).
You are already using something 100x better than these flags. Paper Minecraft manages all of this stuff much better than vanilla ever would with these flags. Even on vanilla though you are expected to gain basically zero TPS from doing this. If you don’t have 100+ players it literally won’t even register on your benchmarks / measurements to be messing with these. If you want to do it though just edit start.sh and build the container. You would literally just type in any flags you’d like in start.sh if you wanted to do custom flags.
Doing this for real is hard. It’s not as easy as magic Aikar flags from a decade ago. You have dozens if not hundreds of settings to learn if you are serious about this level of performance optimization and it will be worth your while if you have more than let’s say at least 20+ players. If you have less players than this you are absolutely wasting your time and you will not be able to change any setting to have any type of measurable impact because you’re just too small at that point.
Why would I say you’re too small? It goes back to me asking why you want to add these flags. What is it that you think they do? Nobody who has asked me this has ever been able to answer this question. What you can do though is take those flags one at a time and type them into Google and see what they do. Google things like enabling G1 garbage collection in OpenJDK and you will find that has been the default for years. The only useful ones are the -Xms and -Xmx to preallocate memory which this project already can do via the -e MaxMemory=X environment variable.
What they actually do is enable G1 garbage collection (enabled by default anyway) and tweak some of the parameters used for allocating memory. Do you know how many times you need to be allocating memory for this to matter? Hundreds of times per second, maybe thousands. Do you know how many players you need to generate that level of activity? Dozens if not hundreds. You need to be allocating an absolute shit ton of memory for this to matter and there’s no way your server is big enough. If your server was big enough to need this you’d probably be offering to pay me to write whatever flags you wanted into the code (and you’d have enough money and resources to do so).
Read this complete guide on how to optimize the Paper Minecraft server. There are hundreds of settings at your disposal that will be more impactful than these. I used to use a lot of these in my projects years ago but they’ve been irrelevant with a modern OpenJDK version for many years. You’re already running a modded server called Paper Minecraft with more performance modifications than you could even dream of touching with Java Virtual Machine flags.
Another way I would put this is that these flags existed before Paper. The whole reason Paper was made was because these flags really don’t give you a lot of control over your Minecraft server performance. The Paper Minecraft settings that have been added over the past 5 years? Those are all the settings that people who came up with these flags wished and dreamed they could edit. That would be Aikar himself. Aikar was heavily involved in the Spigot and Paper projects (and he’s still on the team). The Paper Minecraft project succeeds these flags in other words. It was made by the people who came up with those flags because the flags weren’t good enough. We have something better now.
Hopefully that helps!
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
Hey Tom,
No worries at all, that’s a common issue for sure, I’m glad you actually figured it out as that can be a tricky one to narrow down. Enjoy and take care!
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
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
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) ~[?:?]
Hey Arathi,
Welcome! So yes, this should work but I can think of a couple reasons this may be happening. Let’s start with the 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) ~[?:?]
So it looks like to me that elven-tower.schem is supposed to be a zip file and that this file either does not exist or is empty. It could also not be zipped when it is actually supposed to be zipped. The error is using a GZIPInputStream so this file should be compressed according to the code.
My first question is did you stop the container before trying to copy these files into the volume? If you did not stop the container then I’d imagine you are running into the same thing that happens when people try to edit server.properties without stopping the container. It looks like it’s working but then none of their changes will “stick”. This is basically because Docker has locked the volume when the container is running so it’s not expecting files to change (and will usually just overwrite them with what Docker thinks in memory the files are supposed to be).
The first thing I’d do is try stopping the container and copying your files in there and making sure they are in there before you start the server. That way the volume contents won’t be “locked” by Docker meaning you can safely drag things in there and edit them with the container closed.
This should absolutely work though provided you’re doing everything else correctly for World Edit (as long as you’ve stopped the container first). Hopefully that helps!
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/
Hey Arathi,
I’d check out this resource here. I’m pretty sure this is just a generic file not found error. The zip file is throwing a EOFException with null it says (meaning either the size of your file is 0 or it doesn’t exist).
Are you putting them in the plugins/schematics folder like this guide says for Bukkit/Spigot? The other thing I’d try is saving your own schematic:
How to make a schematic file?
If you've built something in Minecraft and want to save it to a schematic file to share with friends or the internet, do the following:
Select the area you want to save, using WorldEdit's wand (a wooden axe, by default).
Use the //copy command.
Save it to the file with the /schem save filename command.
Grab the schematic file that you made from the worldedit/schematics folder
If you save it you should be able to go in and see what folder it creates and where it’s saving them. This set of instructions from the same article doesn’t even say the same place. This piece says worldedit/schematics. Who knows which one is the right one. I would save your own and find out where it saves it to so you know where these are really supposed to go and see if that gets it going here!
None of this would for sure have anything to do with the container though. People have trouble with these schem and schematic files no matter what platform they’re using for sure. The errors look remarkably unhelpful as you’d think the devs could just code a “file not found” error instead of throwing that nightmare!
An EOF error with null though pretty much is exactly that though in English. It doesn’t look like it’s finding the file. That’s why I suspected maybe you were trying to do this with the container open and it was wiping out your files. It is probably just looking in a different place though for them and saving your own should reveal where it’s looking exactly! If you did a /schem save test then you would find the test file in your folders and wherever that ends up being is where I would try uploading those files over FTP.
Hopefully that helps here!
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#
Hey Arathi,
Very interesting. Yes, you may be onto something here. Theoretically when you restart the container it should fix the permissions on those files as it takes ownership of all the files in the folder.
Look at those file sizes though. They are actually zero. Can you check your FTP transfer log? I would bet that those might be failing with a permissions error or something like that. It says the file size is actually 0 though (which does match up with the NULL error, meaning it either doesn’t exist or the file size is 0, and in this case it actually is 0 which surprises me as I’d thought for sure it would be a path issue).
I’ve done this before with FileZilla where it will create the files (empty ones with a size of 0) but then the upload of the content will fail for example. It does look like those files are indeed empty for some reason! This would probably also happen if you uploaded the files while the container was running instead of stopping it first.
Can you actually load your save? Your save actually has a file size (5329 instead of 0 for the rest of them) so I suspect that one would work! It looks like you do have the paths right here though and that this is actually a file size / content issue (the files look empty).
Ohh good catch. I totally didn’t notice that. Let me try this again. brb
Hey Arathi,
No worries at all, I think we’re very close and I’m glad you thought to take a ls of the folder as this was not necessarily what I was expecting it to be!
Worst case scenario if you can’t log into FTP as the root user to do the upload you can just upload it to an intermediate folder (like the home folder of another user) and then sudo cp it into the Docker volume. That will sidestep a lot of these permissions issues (and when you restart the container it should set the permissions all back correctly each start).
I look forward to hearing what you find!
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
Hey Arathi,
Wow, that has really blown up! There’s nothing wrong with exploring. I enjoy exploring a lot in games as well so I totally understand!
I’m glad you were able to get it going. That will be awesome if it ends up with a 3TB drive. Enjoy and take care!
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
Hey Aleksey,
Welcome! That makes perfect sense for sure. The first time you launch it it goes directly into the window.
So the best way to do this is to use:
docker container ls
This will give you the ID of your running container:
james@pop-os:~$ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ee520ba2fcef 05jchambers/legendary-minecraft-geyser-floodgate:latest "/bin/bash /scripts/…" 6 days ago Exited (0) 6 days ago
Here you can see my container ID is ee520ba2fcef (it’s in the left-hand column).
Now you can do a:
sudo docker attach ee520ba2fcef
Basically docker attach is the magic command that will bring you back to the server console. You can send it back to the background again (detach) by pressing Ctrl+A followed by Ctrl+D. This will hide the server console again (until you reattach).
Hopefully that helps!
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
Hey Tom,
By default there is no limit and it will use as much memory as it wants / needs to use basically. There is a MaxMemory variable you can set with:
-e MaxMemory=6000
would be roughly 6GB or 6000MB. This is the equivalent of -Xmx 6000M on the command line.
If this is a server with a single digit amount of players you really are only using 1GB of RAM. You can preallocate it though if you’d like and that can have some marginal benefits when it comes to people joining or new things being allocated (since the RAM is already claimed by Java).
If you don’t have more players than 10 though then you’re locking that RAM up and the server will still only be using as much as you’re seeing now behind the scenes (the memory will just be unavailable for anything else on the system to use). The only reason giving it more than it wants would be any faster is so that Java doesn’t have to ask the system for that memory (because it already belongs to it).
Minecraft is not smart enough to use the memory differently though. Turning this up will not change the behavior of the server or how much memory x number of blocks takes up in RAM or anything like that. It’s only a minor speed optimization for Java to not have to negotiate RAM when it needs it if that makes sense. There’s no code in Minecraft that says “yes, my JVM memory is turned higher, I’m going to run faster now!”. It is literally only when something happens that triggers Minecraft to need new memory (a new player joining, generating a new chunk, etc.) that this happens and it needs to happen a lot before your TPS will drop or there would be any measurable change from this.
This is why I was stating earlier that if you don’t have at least dozens of players this type of optimization won’t do anything (you’re too small at that point). You need to be doing a *lot* of RAM allocations basically constantly (as in players constantly joining, leaving, etc. on a server with dozens or hundreds of players for example). Yes, in that situation preallocating your RAM will absolutely make a difference because it’s probably asking the system for RAM dozens or even hundreds of times per second from all the joins/leaves/etc. If you have less than 10 players it can’t be more than a few times per second it would be asking for RAM (which is pretty dang slow in computer terms).
That setting should let you reproduce this common Java flag optimization though at least no matter what your use case is here!