Legendary Minecraft Bedrock Container

Minecraft Bedrock Docker Edition
Minecraft Bedrock Docker Edition

I’ve been getting asked to put this together for years including in official GitHub issues. I always knew it would be a great idea but it turned out even better than I expected. This image works great on all platforms including Raspberry Pi!

This is based off my Minecraft Bedrock Linux Dedicated Server scripts for Linux project. I’m going to release a version for the Java Minecraft edition as well so stay tuned for that.

The official GitHub repository is located here.

The official Docker Hub repository is located here.

If you are looking for the Java version of the Docker container it is located here. This is for the Bedrock edition of Minecraft.

You can also run my Geyser + Floodgate Java Minecraft Server container and Bedrock players will be able to connect to it!

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 the official Minecraft Bedrock Server (currently in alpha testing)
  • Fully operational Minecraft Bedrock edition server in a couple of minutes
  • Adds logging with timestamps to “logs” directory
  • Multiarch Support – all Docker platforms supported including Raspberry Pi
  • Automatic backups when container/server restarts
  • Supports multiple instances — you can run multiple Bedrock servers on the same system
  • Updates automatically to the latest or user-defined version when server is started
  • Files stored in named Docker volume allowing for extremely easy access/editing and leveraging more advanced Docker features such as automatic volume backups
  • *NEW* – Box64 support added for improved speeds on aarch64 (ARM 64 bit)

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 19132:19132/udp -p 19132:19132 -p 19133:19133/udp -p 19133:19133 --restart unless-stopped 05jchambers/legendary-bedrock-container:latest

With custom ports:

docker run -it -v yourvolumename:/minecraft -p 12345:12345/udp -p 12345:12345 -p 12346:12346/udp -p 12346:12346 -e PortIPV4=12345 -e PortIPV6=12346 --restart unless-stopped 05jchambers/legendary-bedrock-container:latest

IPV4 only:

docker run -it -v yourvolumename:/minecraft -p 19132:19132/udp -p 19132:19132 --restart unless-stopped 05jchambers/legendary-bedrock-container: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.

Version Override

In some scenarios you may want to run a specific version of the Bedrock server. That is now possible by using the “Version” environment variable:

-e Version=1.18.33.02

For example:

docker run -it -v yourvolumename:/minecraft -e Version=1.18.33.02 -p 19132:19132/udp -p 19132:19132 --restart unless-stopped 05jchambers/legendary-bedrock-container:latest

This is useful if Microsoft hasn’t released versions of the client and dedicated server at the same time so you can match whichever version your players can connect with.

Clean Environment Variable

If the server is having trouble starting you can clean the downloads folder and force reinstallation of the latest version like this:

docker run -it -v yourvolumename:/minecraft -e Clean=Y -p 19132:19132/udp -p 19132:19132 --restart unless-stopped 05jchambers/legendary-bedrock-container:latest

This is useful if a download corrupted or something modified your container contents as it will clear everything out and reinstall the latest Bedrock server fresh.

Disable Box64 (aarch64 only):

If you are having trouble running the dedicated server with Box64 support you can tell it to use QEMU instead with:

-e UseQEMU=Y

For example:

docker run -it -v yourvolumename:/minecraft -e UseQEMU=Y -p 19132:19132/udp -p 19132:19132 --restart unless-stopped 05jchambers/legendary-bedrock-container:latest

TZ (timezone) Environment Variable

You can change the timezone from the default “America/Denver” to own timezone using this environment variable:

docker run -it -v yourvolumename:/minecraft -e TZ="America/Denver" -p 19132:19132/udp -p 19132:19132 --restart unless-stopped 05jchambers/legendary-bedrock-container:latest

A list of Linux timezones is available here.

NoPermCheck Environment Variable

You can skip the permissions check (can be slow on very large servers) with the NoPermCheck environment variable:

docker run -it -v yourvolumename:/minecraft -e NoPermCheck="Y" -p 19132:19132/udp -p 19132:19132 --restart unless-stopped 05jchambers/legendary-bedrock-container:latest

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 fix 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

157 Comments
Inline Feedbacks
View all comments
Hugoshido
Hugoshido
1 year ago

Hey,

let me start with an old big thank you for this beautiful docker version you created!!

Everything works fine but I ran intp a small issue.
I´m not able to put any commands into the terminal for the server.

It only shows me an error over and over again: [2023-04-07 04:44:55] Error: unimplemented option 20094 in curl_easy_setopt

You think you can help?

Thank you again for everything!

Hugoshido
Hugoshido
1 year ago
Reply to  Hugoshido

Update: Commands are working now. But the error is still showing. Any worries about the error?

Ronny P
Ronny P
1 year ago

Hey James! I’ve run this for about a year now on Raspberry Pi 4 with Ubuntu and I absolutely love it! I couldn’t help but notice that there is a bit of lag even after optimizing the world and running with minimal mods but that’s to be expected.

But after looking into this activity monitor is showing only 1 core at a time being utilized [pinned at 100%] while the 3 other cores are all idling. The core being used changes in a random pattern roughly every 1-2 minutes. As far as I know docker should use all cores available and it does on initial server startup, but this weird single-threaded behavior kicks in soon after. Any ideas?

FYI: I’ve set server.properties’ max threads to 4 and 0 both but no difference is made.

Ronny P
Ronny P
1 year ago

Thanks for the clarification!

Ronny P
Ronny P
1 year ago

Thanks for the options! I’ll make sure to try this but we’ve dug ourselves into a bit of a bedrock hole since most server features utilize allow+deny blocks and we have a fair number of bedrock exclusive mods and heavily use movable tile entities in our Redstone. But it’s worth a try!

Ray J
Ray J
1 year ago

Hello, this may be a stupid question but can I use a Minecraft PE world on this server?

Ray J
Ray J
1 year ago

First off I’d like to thank you for your quick response, James, it was very helpful. Another question I have is whether or not there is any way that I can disable the backups? My raspberry pi only has 16GB of storage and the backups fill it up quickly.

Ray J
Ray J
1 year ago

It worked perfectly, although I have one more question. Even when I type stop while the server is running and I close the terminal, I can still see and join the Minecraft server with no issues. When I reboot my raspberry pi the server doesn’t show up anymore, but I can no longer use the same port.

Ray J
Ray J
1 year ago

The server is now up and running perfectly, I am very thankful for someone like you dedicating time and effort to making these projects and helping others out! I just have one quick question, if I were to connect an external drive to my raspberry pi, how could I make the backups go to that drive? Thanks so much and I really, really appreciate it.

Ray J
Ray J
1 year ago

That’s much easier than I expected, thanks for the help!

Michael
Michael
1 year ago

Helllo, great job! It works with a Rasberry Pi4. At the first start I could see the server in the friends-tab in minecraft. But now I habe to add another server to play. Is it possible to show the server again in the friends-tab as a lan?
Thx and Best regards

Michael
Michael
1 year ago

Thanks for the help. I’ll try it. I would like to have multiple worlds on the server and have tried a plugin called “Multiverse Core”. This is a jar file. Is this suitable for the server, or is it a plugin for the Java version. I created a “plugins” folder, uploaded the files, but it doesn’t know the console commands.
Another plugin would be Multiworld. This is a phar file. Would this plugin be suitable for the server?

Michael
Michael
1 year ago

Hello, thank you again for the great support. I deleted the first container, now I have the one with Geyser and. Floodgate and am very happy. Next I will deal with the server.properties file. In Bedrock I can create a world with a bonus chest. In java I need to start the server with the —bonusChest argument. Is it also possible with a container to start with this argument?

Michael
Michael
1 year ago

Hey James,
everything is working fine. Thatś really brilliant tonwork with containers. I learn a lot every day – i.e. The command op: server-console in a container to start. Does the container update the server, if a new version is coming out for the game, or do I have to update it manually. I can create a new container with a special version of server. Does the server change the version?
Best regards

Marcel
Marcel
1 year ago

Hello. I have an vServer With 24GB RAM and 8 CPUs and Its only for my Minecraft Server. But Docker says it Launch 500% CPU and More and Its a Little Bit laggy in Game. Can someone help ?

Marcel
Marcel
1 year ago

This is an AMD-V Server x86_64 With 8 CPUs and AMD EPYC 7452 32-Core Processor. I use This Docker because without Docker and the Same Files it cant load my Mods.

Marcel
Marcel
1 year ago

iotop Says Most likely 0K/s and sometimes When it work 36K/s. This is nothing. 88% is on idle. I use an SSD.

Marcel
Marcel
1 year ago
Reply to  Marcel

Top says bedrock+ use 150% CPU

hotnikq
hotnikq
1 year ago

Works fine, 3 players 15mb Map, Radxa Rock 3a RK3568 8GB Ram
Linux Armibian Kernel v6.1 on 32GB SD Card
Game starts to stuttering after 45mb Map, on ARM v8.2
I use CasaOS docker container Admin.

TinyBean
TinyBean
1 year ago

Hi there,
I am very new to Linux/Linux-based servers and i’m not quite sure how to get to a stage where i can send commands to the server via the terminal (Similar to how NUKKIT works). Upon powering up the pi, the server starts automatically, and with any attempt to ‘start’ the server from the terminal results in an error saying that the server is already up. I really do need to see this as i need to OP my character in game in order to teleport about.

Please help
Thanks

TinyBean
TinyBean
1 year ago

Thanks very much man, it works perfectly. I appreciate responding so quickly too!
I’m just wondering however, how would I connect to this server over the internet? I Have port forwarded all the ports for minecraft and yet my friends are unable to connect via my IP.
Any solutions?
Thanks again,
Tiny

TinyBean
TinyBean
1 year ago

Hey again,
I’ve tried both and neither made a difference (At least not what I can see). I don’t really know what ip i’m using in the first place really. The server defaults to something like 0.0.0.0 i think.
Also, how do i import a custom world to host?
Thx,
Tiny

TinyBean
TinyBean
1 year ago

I think I have managed the world saving part. I just saved it beside the other world in the _data folder and changed it in the server properties.
For the IP part, I put my public ip into my phone and put the correct port in, the phone doesn’t connect when on mobile data, but does when on the same Wi-Fi as the pi. The pi is wired into my router.
Under the ‘ports’ header in the terminal when i start the server, are the numbers:
0.0.0.0:19133->19132-19133/tcp, 0.0.0.0:19132-19133->19132-19133/udp
I think those 0.0.0.0s are meant to be my IP.
Any ideas?
Thanks again man.

TinyBean
TinyBean
1 year ago

After doing a little digging, I’ve found that my ISP does allow port forwarding, I don’t know if it has anything to do with my PI being wired into a node on our mesh. The provider is Virgin Media by the way. I know you can port forward on our Wi-Fi as me and some mates have played half life DM over the internet before. I would send a screenshot of the terminal but I can’t here.

TinyBean
TinyBean
1 year ago
Reply to  TinyBean

Also to save a lil time do you know how to allocate more ram? Thx

TinyBean
TinyBean
1 year ago

The pi is connected to the node in my room which is connected directly via cat7 to the main router (Which is connected to the virgin media hub) Is that double nat? And also would hooking the pi up to the main router and using remote desktop to use it work?

TinyBean
TinyBean
1 year ago

Perfect, I think my ISP can help from here.
Thanks so much for helping me get this far and referring me.
I really appreciate what you are doing here and I’m sure many other do to.
Thanks again,
Tiny.