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

158 Comments
Inline Feedbacks
View all comments
Jonathan
Jonathan
8 months ago

I really appreciate your great work. I started knowing absolutely nothing about servers and ended up acquiring a lot of knowledge thanks to your blog. I currently have a Bedrock server running on an Oracle machine and so far it is going very well. I hope you continue this project 😀

Tiny
Tiny
8 months ago

Hi James, I posted a while back about setting up a server on my raspberry pi running Ubuntu. And I’d like to start by saying thank you because you have introduced me to a whole New World of not just Linux computing but server management and computers in general. You have inspired me to study and pursue a career in network engineering when I finish high school. For that, I can’t thank you enough. Anyway, I am wondering if you have any solutions for an issue I am stuck with. My friends are unable to join the server, however, I am able to join both locally (via my local network) and externally via my mobile data, I’ve tried this both on my phone tethered to my laptop and tethered to my iPad yet all my friends seem to be still having the same issue. I have forwarded all the necessary ports, made sure to run “sudo ufw allow 19132” and ran the server with default ports. I’d usually try and figure this sort of stuff out by myself, but after sending myself around the Internet (mostly in circles) I think I better consult someone with better knowledge in the subject.
Cheers.

happoman
happoman
10 months ago

Thank you for this container. I’m trying to run this on QNAP TS-431X container. It uses ARM processor.

I’m having an issue with connecting to server. Every player is stuck at the loading screen with message “Locating server”. It is just an infite load. Status on console says that player has connected but they are only stuck at loading screen.

Is there a fix for this? Is my NAS CPU too low tier to run this? ARM Cortex A-15@1,7Ghz

Pi5er
Pi5er
11 months ago

Further to last night’s note – Ryan has added two pi5 builds of box64 – 4k and 16k page size support. Fast work.

I’m not sure how to cleanly integrate those into a general ARM64 image, but for my purposes, I’ve just made a simple dockerfile locally, which lets me run your bedrock image on my Pi 5 8Gb with 64 bit Pi OS & 16kb page file:

# Minecraft Bedrock Server Docker Container for Pi 5 with 16Kb page size

# All the hard work is already done here:
FROM 05jchambers/legendary-bedrock-container:latest

# Update with the Pi5-8Gb version of Box64
RUN chmod 1777 /tmp
RUN apt-get update && apt-get remove box64-arm64 -y && apt-get install box64-rpi5arm64ps16k -y

Clueless Pi User
Clueless Pi User
11 months ago
Reply to  Pi5er

Hello – I too am trying to deploy this on a Pi 5, however behind a Portainer instance.

I’ve installed the box64-rpi5arm64ps16k bit directly to the Pi, but still get the same 4k error. Would you happen to know what I’ll need to do to get it to use the 16k image? Also, is that possible through a compose file?

New to docker and Portainer has been comfortingly easy to grasp so I’d rather not give it up.

Pi5er
Pi5er
11 months ago

Hey James. Incredibly grateful for your work here.

For info – Box64 errors on a Raspberry Pi 5 64 bit OS with:
Error: PageSize configuration is wrong: configured with 4096, but got 16384

This appears to need a specific build of Box64 – https://github.com/ptitSeb/box64/blob/main/docs/COMPILE.md#for-raspberry-pi-5

There’s an open issue requesting a pre-packaged pi5 build: https://github.com/ryanfortner/box64-debs/issues/26

Is there any possibility to include a pi5.dockerfile once it’s available?

unihumi
unihumi
11 months ago

Hi, is it possible to get an elaborate version of this tutorial? This guide assumes to have certain things already installed, like having MC already installed. I’m a newbie to all these things but would love to run my own MC server on my raspberry 4 here at home.

mcx
mcx
1 year ago

How can I update minecraft server from 1.20.2 to 1.20.4 ?