Official Minecraft Bedrock Dedicated Server on Raspberry Pi*

Minecraft Bedrock running on Raspberry Pi
Minecraft Bedrock running on Raspberry Pi

I highly recommend using the Docker version over the standalone version (this). Another great option is to use my Minecraft Java + Bedrock Together Geyser container which allows both Bedrock and Java players to connect!

It’s now possible to convert your worlds between Bedrock and Java versions. Check out my guide on Chunker here for more information.

One of the most requested features in my Raspberry Pi Minecraft server guide is support for the Bedrock edition of Minecraft. This is the edition that powers Minecraft on iOS / Android / Xbox / Nintendo Switch as well as the free Windows 10 edition.

There’s one big problem though. The official Minecraft Bedrock dedicated server is only compiled for Windows and Ubuntu X86_64. Without ARM support it seems impossible to run the Bedrock dedicated server on a Raspberry Pi. I couldn’t find a documented instance of anyone doing it anywhere.

So naturally today in this guide we are going to do the impossible. But right off the bat let me point out that there is an asterisk in my article title. Why you ask? That is because unlike my other guides this one will not yield you a well performing server. That is because we will be emulating a x86_64 processor on ARM. This is slow. VERY slow.

What’s the point?

So if the server doesn’t perform well and it’s too slow why did I even bother to write this article?

Basically “too slow” is only in the context of today’s hardware and software we currently have available to us. Both hardware and software for ARM have been evolving at a furious pace. ARM powers smartphones which means it is not going anywhere and will continue to have tons of R&D money put into it and it may not be long before the hardware is powerful enough.

There’s also the possibility that by sharing this work that someone who reads this may know or discover ways to speed things up and build on what I present here. If you’re one of those people drop me a comment or send me an email and I will gladly credit and share your work!

And last but not least, the techniques I use here can be used to run other x86_64 binaries on Raspberry Pi. Many applications will perform just fine even on current generation gear.

Current Status

I highly recommend using the Docker version over the standalone version (this). Another great option is to use my Minecraft Java + Bedrock Together Geyser container which allows both Bedrock and Java players to connect!

The script is working on Raspberry Pi but if you use the Raspberry Pi OS’s Debian repositories the QEMU version in there will give a bus error. If you compile a newer QEMU from source or use a different operating system it works (very slowly)!

You may need to build the dependencies yourself if you are getting segfaults from my prepackaged depends.zip. This is because I generated a static dump of dependencies at a snapshot in time and they’ve likely been updated to a point they are no longer compatible. See the “Satisfying Dependencies” section for how to build the dependencies!

Hardware

This is the hardware I used for the server.  I always recommend using solid state storage for the best performance.  To see why check out the Raspberry Pi storage benchmarks section.  This contains benchmarks submitted by others who ran the benchmark so you can see what other people are using and provides the best performance.

Here’s the recommendations:

Recommended Gear

Raspberry Pi 4
Raspberry Pi 4

The Raspberry Pi 4 is available in different memory configurations all the way up to 8 GB. It’s about the size of a credit card and uses an extremely low amount of power making it ideal for all sorts of projects and ideas!

Links: AliExpress*, Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon*.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*

Raspberry Pi 400 Kit
Raspberry Pi 400 Kit

The Raspberry Pi 400 kit includes everything you need for a full Pi 400 desktop build. The Pi 400 is the fastest Raspberry Pi ever released and comes in the form factor of a keyboard!

Links: AliExpress*, Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*

Kingston A400 SSD
Kingston A400 2.5″ SATA SSD

The Kingston A400 has been a great drive to use with the Pi for years. It’s reliable, widely available around the world, has low power requirements and performs very well. It’s also very affordable. This drive has been benchmarked over 1000 times at pibenchmarks.com and is the #1 most popular SSD among the Pi community!

Links: AliExpress*, Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*

StarTech 2.5" SATA to USB 3.0/3.1 Adapter
StarTech 2.5″ SATA to USB 3.1 Adapter

The USB 3.1 variant of the StarTech 2.5″ SATA adapter works well with the Pi 4. The USB 3.0 variant doesn’t have firmware updates available and is not recommended.

Links: Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*

Or for a compact setup:

SanDisk Extreme Pro USB SSD
SanDisk Extreme Pro SSD

The SanDisk Extreme Pro USB SSD is a true solid state drive. This is different than a typical “flash drive” which uses extremely cheap memory and has very low random I/O performance/throughput compared to a real solid state drive. I’ve used both the USB 3.1 and USB 3.2 variants with the Pi successfully and they benchmark very well!

Links: AliExpress*, Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*

SD Card Setup:

SanDisk Extreme A1
SanDisk Extreme A1

The SanDisk Extreme A1-A2 SD card has the best scoring SD card on Pi Benchmarks for years and is second in popularity only to the SanDisk Ultra (often included in combo kits). The application class (A1) means random I/O speeds (very important when running an OS) have to meet a higher standard. There’s no benefit on the Pi for A2 right now so get whichever is cheaper/available.

Links: AliExpress*, Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*

All of these versions support cross-platform play with each other (but not with the Java edition).

Minecraft Bedrock Digital Code
Minecraft Bedrock Digital Code

This is the PC Minecraft for Windows 10 (Bedrock) edition of Minecraft. It is able to play cross-platform with other players on Android / iOS / Playstation / Xbox / Switch. Available as a code that is instantly activated to give you permanent access to the game!

Links: Amazon.com*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*

Minecraft Bedrock Playstation
Minecraft Bedrock Playstation

The Sony PlayStation version of Minecraft: Bedrock edition.

Links: Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.se*, Amazon.sg*

Minecraft Bedrock Nintendo Switch
Minecraft Bedrock Nintendo Switch

This is the Nintendo Switch version of Minecraft: Bedrock edition.

Links: Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*

Minecraft Bedrock Xbox One
Minecraft Bedrock Xbox One

This is the Microsoft Xbox version of Minecraft: Bedrock edition.

Links: Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.sg*

Linux Distribution

For this to work it is required that we use a 64 bit aarch64/arm64 distribution. This is because when we try to emulate 32 bit ARM we will get a “bus error” as soon as the server tries to start. This is likely because QEMU 32 bit is missing some support we need to emulate the x86_64 architecture.

Distributions that will work:

Since the server is natively compiled for Ubuntu it is best to use a Debian based distribution. For the Raspberry Pi I recommend Ubuntu Server 20.04 or 20.10. Check out my article on how to install Ubuntu Server on Raspberry Pi.

You can also use the Debian “Buster” preview which has the advantage of having QEMU 3.1 available in the apt repository right now which will save you several steps later of having to acquire a newer static binary of QEMU the “evil” way.

Raspbian will not work with this method unless you use the 64 bit beta because it is only 32 bit. You will get a segmentation fault when you run it on a 32 bit ARM system instead of a 64 bit one.

Automatic Setup Script

If you just want to get your hands on the finished working server my Minecraft Bedrock Dedicated Server guide already supports ARM and will setup the dependencies and download the server for you. It also supports the following:

  • Sets up fully operational Minecraft Bedrock edition server in a couple of minutes
  • Ubuntu / Debian distributions supported
  • Sets up Minecraft as a system service with option to autostart at boot
  • Automatic backups when server restarts
  • Updates automatically to the latest version when server is started
  • Easy control of server with start.sh, stop.sh and restart.sh scripts
  • Optional scheduled daily restart of server using cron

Run the automatic setup script by pasting / typing the following on the command line:

curl https://raw.githubusercontent.com/TheRemote/MinecraftBedrockServer/master/SetupMinecraft.sh | bash

First Join

Before you join the server for the first time make sure the server has started by typing:

screen -r

You should be inside the Minecraft server console. What you want to look for before you try to join is that the server has completely finished starting. This can take a while on ARM. The line we want to see to know it’s ready is this:

[INFO] Server started.

The first time it joins will be very very slow. You may have to try several times as the server generates the starting area. Eventually you’ll get in and be able to move around. You’re able to break blocks but there’s definitely a delay when you break blocks and things are pretty laggy.

Manual Instructions

You only need to follow the manual instructions if you want to recreate my process step by step. Here are the steps:

Getting the Dedicated Server

The latest official dedicated Minecraft Bedrock server binary is available at: Official Minecraft Bedrock Server Download Page. We will download the Ubuntu Server version.

mkdir bedrock
cd bedrock
wget https://minecraft.azureedge.net/bin-linux/bedrock-server-1.16.0.200.zip
unzip -o bedrock-server-1.16.0.200.zip

We now have the Bedrock dedicated server unzipped into a folder called “bedrock”. However, if we try to run it by typing ./bedrock_server we get:

bash: ./bedrock_server: cannot execute binary file: Exec format error

This is because we are on the ARM architecture and this file type is compiled for x86_64. In Linux we can get the file type format of any executable by using the file command:

# file bedrock_server
bedrock_server: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, stripped

Now that we know what target architecture we need to run we need to get QEMU.

Installing QEMU Host Mode Emulator

You may have used QEMU before in the past to create virtual machines. But QEMU has another less known operating mode called user mode emulation. User mode emulation is faster than a virtual machine because it takes advantage of the host operating system to do a lot of functions rather than emulate an entire operating system.

On top of being much faster, this will allow us to run a x86_64 binary on the ARM platform without having to install a full blown x86_64 operating system inside a QEMU container.

At the time of writing the binaries provided in Ubuntu Server and Raspbian are too old and don’t have the x86_64 support we need. The binaries available in apt are QEMU 2.8 and we need 3.0 or higher.

Check what the latest version of QEMU available for your distribution is by typing:

sudo apt search qemu-user-static

On my system this yielded the result:

qemu-user/stable 1:2.8+dfsg-6+deb9u4 armhf
   QEMU user mode emulation binaries
qemu-user-static/stable 1:2.8+dfsg-6+deb9u4 armhf
   QEMU user mode emulation binaries (static version)

Notice the version is 2.8 and not 3.0 or higher. If your version is 3.0 or higher you can (and should) install qemu-user-static from apt.

Mine aren’t, so we are going to cheat. But before we cheat, I am going to explain why we are violating the Holy Sacred Linux Bylaws by doing what I’m about to show you and explain why it should basically never be used. If you are using the Debian Buster distribution you can skip the next section since QEMU 3.1 is already available in apt for Debian.

Evil way to get latest QEMU

The proper thing to do in this situation is to download QEMU from source and build the newer version yourself. The problem is QEMU takes forever and a day to compile. Even just trying to compile the user mode binaries I came back to my Pi a full 24 hours later and it still wasn’t even close to done.

Okay so building this binary in the Pi is too slow. So what is the proper thing to do then? The proper thing to do would be to set up a development machine for cross compiling on your main more powerful system and compile it that way. The downside? Unless you already have a system set up with a cross compiling chain this is going to also take a lot of research and effort to get set up.

So where could we possibly get precompiled binaries for our system? Well, since we are using a Debian based Linux distribution we are downstream from Debian proper. So let’s take a look at Debian’s repository and see what is available: https://packages.debian.org/buster/qemu-user-static

Well look at that. The upcoming Debian Buster repository contains QEMU 3.1! We can just grab it from there. But wait… RED ALERT!

Picard Facepalm
Captain Picard disliked that

This is very bad practice. The reason we can get away with it in this case is because qemu-user-static is statically compiled and only has one dependency (binfmt-support). All of the current stock Raspberry Pi distributions don’t have anything that depends on either of these packages. This makes qemu-user-static and binfmt-support relatively self contained. Nothing else in our system depends on them and they aren’t a part of any dependency chains.

Have you ever tried to install a package and been stopped by some little dependency? It may be tempting to use this technique in situations like that. However, when you introduce foreign packages into your package tree you will very likely break your entire system. If anything depends on those packages apt will go haywire since it won’t be able to resolve the dependency chains and you will lose the ability to update or install new packages. Many packages have dozens of dependencies and a single wrong one in the chain will break everything. Therefore this technique should almost never be used.

Okay, with all that out of the way, let’s proceed. First we are going to grab a prebuilt QEMU package for our ARM architecture. We can get these from the Debian repository. These links change often so you will need to navigate to the repository yourself and see what the latest available QEMU repository is. First we need to find qemu-user-static. Here’s where that will be in the Debian repository:

http://ftp.us.debian.org/debian/pool/main/q/qemu/

Make a note of the exact name of the package. You will need it in the next step. Now we need to find one more package which is binfmt-support from here:

http://ftp.us.debian.org/debian/pool/main/b/binfmt-support/

Once you’ve found these and made a note of the package names download them to your Pi like this:

wget http://ftp.us.debian.org/debian/pool/main/q/qemu/qemu-user-static_4.1-1+b3_arm64.deb
wget http://ftp.us.debian.org/debian/pool/main/b/binfmt-support/binfmt-support_2.2.0-2_arm64.deb
sudo dpkg --install binfmt*.deb
sudo dpkg --install qemu-user*.deb  

You should now have QEMU installed. You can verify this with the following:

# qemu-x86_64-static --version

qemu-x86_64 version 3.1.0 (Debian 1:3.1+dfsg-7)
 Copyright (c) 2003-2018 Fabrice Bellard and the QEMU Project developers

Your version should be a lot newer than mine since this output is from the date of publication but if you didn’t get an error you should be all set to move on to the next step.

Satisfying Dependencies

Now that we have QEMU installed if we try to run bedrock_server we get the following:

# ./bedrock_server
 /lib64/ld-linux-x86-64.so.2: No such file or directory

This is progress. We’re no longer getting an error that the system can’t read the binary format of the file. We are now met with a dependency error.

This is to be expected because we are running on a ARM system and don’t have any x86_64 dependencies installed. The Minecraft server executable is dynamically linked as we learned earlier with the file info tool. This means that we will need to provide some libraries for the executable to work.

The easiest and fastest way to get them is to install Ubuntu x86_64 on a virtual machine using something like VirtualBox or on a spare machine. If you want to download my copy of the dependencies and skip this step I have them zipped up at Minecraft Bedrock Server Dependencies – depends.zip

One alternative would be to set up a chroot environment containing a x86_64 environment but I have had nothing but problems trying to create such an environment on ARM. Usually the chroot will crash out QEMU and when you google the crash codes you will come across bug posts where the QEMU authors state that ARM to x86_64 isn’t used all that often and some things are unimplemented. This is also why we need to use QEMU 3.0 or higher to get the support we need to run the server as the support was improved in that version.

Once you have set up a x86_64 environment download the server like we did earlier and we will use the ldd tool to look up the dependencies. On your x86_64 installation type ldd bedrock_server:

# ldd bedrock_server
         linux-vdso.so.1 (0x00007fff04bb0000)
         libcurl.so.4 => /usr/lib/x86_64-linux-gnu/libcurl.so.4 (0x00007fb77c01b000)
         libCrypto.so => /home/james/minecraftbe/./libCrypto.so (0x00007fb77bdf0000)
         libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb77bbd1000)
         libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb77b9cd000)
         libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007fb77b763000)
         libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007fb77b2eb000)
         libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fb77b0ce000)
         libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb77ad45000)
         libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb77a9a7000)
         libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb77a78f000)
         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb77a39e000)
         /lib64/ld-linux-x86-64.so.2 (0x00007fb780d6b000)
         libnghttp2.so.14 => /usr/lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007fb77a179000)
         libidn2.so.0 => /usr/lib/x86_64-linux-gnu/libidn2.so.0 (0x00007fb779f5c000)
         librtmp.so.1 => /usr/lib/x86_64-linux-gnu/librtmp.so.1 (0x00007fb779d40000)
         libpsl.so.5 => /usr/lib/x86_64-linux-gnu/libpsl.so.5 (0x00007fb779b32000)
         libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007fb7798e7000)
         libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007fb779695000)
         liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007fb779487000)
         libunistring.so.2 => /usr/lib/x86_64-linux-gnu/libunistring.so.2 (0x00007fb779109000)
         libgnutls.so.30 => /usr/lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007fb778da4000)
         libhogweed.so.4 => /usr/lib/x86_64-linux-gnu/libhogweed.so.4 (0x00007fb778b70000)
         libnettle.so.6 => /usr/lib/x86_64-linux-gnu/libnettle.so.6 (0x00007fb77893a000)
         libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007fb7786b9000)
         libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007fb7783e3000)
         libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007fb7781b1000)
         libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007fb777fad000)
         libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007fb777da2000)
         libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fb777b87000)
         libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007fb77796c000)
         libgssapi.so.3 => /usr/lib/x86_64-linux-gnu/libgssapi.so.3 (0x00007fb77772b000)
         libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007fb7773fc000)
         libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007fb7771e9000)
         libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007fb776fe5000)
         libheimntlm.so.0 => /usr/lib/x86_64-linux-gnu/libheimntlm.so.0 (0x00007fb776ddc000)
         libkrb5.so.26 => /usr/lib/x86_64-linux-gnu/libkrb5.so.26 (0x00007fb776b4f000)
         libasn1.so.8 => /usr/lib/x86_64-linux-gnu/libasn1.so.8 (0x00007fb7768ad000)
         libhcrypto.so.4 => /usr/lib/x86_64-linux-gnu/libhcrypto.so.4 (0x00007fb776677000)
         libroken.so.18 => /usr/lib/x86_64-linux-gnu/libroken.so.18 (0x00007fb776461000)
         libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007fb776259000)
         libwind.so.0 => /usr/lib/x86_64-linux-gnu/libwind.so.0 (0x00007fb776030000)
         libheimbase.so.1 => /usr/lib/x86_64-linux-gnu/libheimbase.so.1 (0x00007fb775e21000)
         libhx509.so.5 => /usr/lib/x86_64-linux-gnu/libhx509.so.5 (0x00007fb775bd7000)
         libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007fb7758ce000)
         libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007fb775696000)

Yikes. This thing has a ton of dependencies! This is because it is dynamically linked executable so none of the source code is compiled into the binary for any of these dependencies.

Fortunately I have a bash one liner that will gather a copy of all these dependencies and put it into a folder:

mkdir depends
ldd bedrock_server | grep "=> /" | awk '{print $3}' | xargs -I '{}' cp -Lv '{}' depends

Now zip or tar this folder and move it to your Raspberry Pi. We are going to put the dependencies right in the root of the bedrock folder that we created earlier. Your file structure on the Pi should now look something like this:

 bedrock_server               libgnutls.so.30      libresolv.so.2
 bedrock-server-1.10.0.7.zip  libgpg-error.so.0    librtmp.so.1
 bedrock_server_how_to.html   libgssapi_krb5.so.2  libsasl2.so.2
 behavior_packs               libhogweed.so.4      libssh2.so.1
 definitions                  libidn2.so.0         libssl.so.1.1
 depends.zip                  libk5crypto.so.3     libstdc++.so.6
 ld-2.28.so                   libkeyutils.so.1     libtasn1.so.6
 libcom_err.so.2              libkrb5.so.3         libunistring.so.2
 libCrypto.so                 libkrb5support.so.0  libz.so.1
 libcrypto.so.1.1             liblber-2.4.so.2     permissions.json
 libc.so.6                    libldap_r-2.4.so.2   README.txt
 libcurl.so.4                 libm.so.6            release-notes.txt
 libdl.so.2                   libnettle.so.6       resource_packs
 libffi.so.6                  libnghttp2.so.14     server.properties
 libgcc_s.so.1                libp11-kit.so.0      structures
 libgcrypt.so.20              libpsl.so.5          whitelist.json
 libgmp.so.10                 libpthread.so.0

Now for the last step there is one more dependency we need to resolve that won’t be included in the command we executed. This dependency is the linker dependency ld-2.28.so (your version may be different/newer) and the trick we just used to get the other dependencies won’t work on it. On the x86_64 machine copy ld-linux-x86-64.so.2 like this:

cd depends
cp /lib64/ld-linux-x86-64.so.2 ld-2.28.so
cp /lib64/ld-linux-x86-64.so.2 ld-2.31.so

If you have a different version of the linker you can find it with:

ldd --version

The version of the linker your system is using will be at the end of the very first line of the output from that command.

On the Pi use these commands to set up the linker:

sudo mkdir /lib64
sudo ln -s /home/pi/bedrock/ld-2.28.so /lib64/ld-linux-x86-64.so.2
sudo ln -s /home/pi/bedrock/ld-2.31.so /lib64/ld-linux-x86-64.so.2

This will install the linker binary where it needs to be for us to run the application by creating a symbolic link. The rest of the dependencies will be able to be in the folder that the server is running.

Running the Server

Now we have all our dependencies in place and are ready to run the server. I can’t wait to issue a ./bedrock_server! Let’s try it:

# ./bedrock_server

/lib64/ld-linux-x86-64.so.2: No such file or directory

Ugh. It’s looking for the dependencies in the wrong place! So how do we fix that? The trick is actually on the Minecraft Bedrock server dedicated server download page. We need to change the library load path to our local directory. So the proper way to run the server will be like this:

LD_LIBRARY_PATH=. ./bedrock_server

Now that we run the server this way we see the following output:

 NO LOG FILE! - setting up server logging…
 [2019-04-27 00:47:16 INFO] Starting Server
 [2019-04-27 00:47:16 INFO] Version 1.11.1.2
 [2019-04-27 00:47:16 INFO] Level Name: Bedrock level
 [2019-04-27 00:47:16 INFO] Game mode: 0 Survival
 [2019-04-27 00:47:16 INFO] Difficulty: 1 EASY
 Unknown host QEMU_IFLA type: 50
 Unknown host QEMU_IFLA type: 51
 Unknown host QEMU_IFLA type: 50
 Unknown host QEMU_IFLA type: 51
 Unknown host QEMU_IFLA type: 50
 Unknown host QEMU_IFLA type: 51
 Unknown host QEMU_IFLA type: 50
 Unknown host QEMU_IFLA type: 51
 Unknown host QEMU_IFLA type: 50
 Unknown host QEMU_IFLA type: 51
 Unknown host QEMU_IFLA type: 50
 Unknown host QEMU_IFLA type: 51
 Unsupported setsockopt level=41 optname=20
 Unsupported setsockopt level=41 optname=20
 Unsupported setsockopt level=41 optname=34
 [2019-04-27 00:51:14 INFO] IPv4 supported, port: 19132
 [2019-04-27 00:51:15 INFO] IPv6 supported, port: 19133
 [2019-04-27 00:53:48 INFO] Server started.

As we can see QEMU does complain about several missing QEMU_IFLA types. These messages relate to certain functionality not being implemented in QEMU yet. These can be safely ignored for now but hopefully if QEMU implements these later it will provide a speed boost to the server.

Another thing to note is the timestamps. The server takes some time to load when using emulation. The total time to reach the “Server started.” line was about 5 minutes. I told you it was slow!

You may now connect to the server but expect it to time out many of your connection attempts. When you do get in monsters will be very slow and glitchy. Breaking blocks will have a significant delay.

Benchmarking / Testing Storage

If you want to verify your drive’s performance you may want to run my storage benchmark with:

sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash

If you search for the model of your drive on Pi Benchmarks you can compare your score with others and make sure the drive is performing correctly!

Conclusion

With the tools and hardware that are available to us today we are able to run the Minecraft Bedrock dedicated server on Pi but it is too slow.

Improvements in hardware and software such as more updates and better implemented of x86_64 emulation on the ARM platform will likely change this in the near future.

Another game changer would be if Mojang chooses to distribute a native ARM binary that we can run on the Pi. This would be *much* faster and would be the ideal scenario. Definitely send them an email or leave a comment on their feedback form if you want to see this!

I will update this article as things change going forward. If you are experimenting with this and find a way to speed things up definitely leave a comment here so I can credit you and publish your findings!

If your goal with this project was to have a small self contained Minecraft server that doesn’t use a lot of power I do have some alternative recommendations below to use in the mean time for getting a well performing Bedrock server!

174 thoughts on “Official Minecraft Bedrock Dedicated Server on Raspberry Pi*”

  1. Avatar for Daniel

    Thanks for the work you put into this! I got it working on my Raspberry Pi 4 (8 GB) but it’s extremely slow, 2-4 minutes just to join and if you start loading up more chunks the whole server starts slowing down to shit. I’m assuming this is a biproduct of having to emulate a different architecture to run the server on ARM?

    1. Avatar for James A. Chambers

      Hey Daniel,

      Thanks for the kind words! You’re absolutely right, it’s a result of using QEMU emulation. The slowdown has steadily improved over the years as it was completely unplayable/unjoinable when I first wrote this article.

      Over the past few months I’ve been starting to get reports from people saying it’s “fast enough” for them. Is it fast enough for me still? No, but it is apparently close enough now that it is meeting some use cases.

      The only thing I can think to try within your control would be if you built a newer version of QEMU (or to use a distro that has a newer version of QEMU in the repositories than the distro you are using now). These tend to have optimizations/fixes that can help but if you got it working at this state you did everything correctly. Hopefully that helps!

  2. Avatar for Mark

    Hi,
    Is it a known thing that the 1.18 update has introduced lag from hell?
    It was absolutely fine up until 1.18…
    Anyone else?
    Is it just a matter of waiting until it’s fixed?
    Thanks.

    1. Avatar for James A. Chambers

      Hey Mark,

      For sure this has happened almost every release. 1.17, 1.16 were both *horrible* upon release for sure. It’s a Minecraft tradition! It used to be really bad in the 1.13 days where it would become outright unplayable and I wouldn’t even release it for the script until weeks/months after official release because back then we had a lot less power to work with on the Pi and absolutely had to wait for all the optimizations. Fortunately we have more power these days but you will still “feel” the lag during these major revisions for sure.

      In all seriousness it will definitely get fixed constantly. They’ll likely be releasing multiple updates every single day for the Paper Minecraft server over the next few weeks. The way it kind of works is Microsoft releases a really slow update with a lot of cool features and then the Paper Minecraft team gets to work optimizing the code to make it playable.

      You can definitely override back to the previous version if you need to (make sure you restore a backup from that version, you can’t take your current server backwards unless you restore a backup). Hopefully that helps!

  3. Avatar for Zachary Tubbs

    Everything works fine, but i changed my mind on having the server start on boot. How would i change this? I am using ubuntu server.

    1. Avatar for James A. Chambers

      Hey Zachary,

      I’m glad everything’s working! It’s really easy, just go ahead and do:

      sudo systemctl disable yourserver

      This will disable the systemd service from starting automatically on boot. Hopefully that helps!

      1. Avatar for Zachary Tubbs

        Thanks for the quick response! It worked! I decided to create a physical button on the Pi to start the server, since I won’t always be using it.

  4. Avatar for FancyFlame

    I’ve heard that Box64 can emulate x86-64 software on arm64 with very high performance, which partially because it uses some native libraries instead of emulates those from x86-64. But unfortunately I’ve failed compiling Box64 on my device (One time I succeed but still can’t run bds normally). Box64 link.

    1. Avatar for James A. Chambers

      Hey FancyFlame,

      I’ve tried it actually as well! You can use it to run Steam on the Raspberry Pi. It didn’t work for what I was trying to do, but that wasn’t really Box86’s fault. This is definitely worth checking out as although it won’t work for everything it is fantastic for certain things and sometimes by far the best option!

  5. Avatar for Jonathan Fowler
    Jonathan Fowler

    Great work James. I have been playing with different ways to setup a Minecraft server for a week now ( I am a noob when it comes to this stuff). I found your site, and it was very easy. I am currently running on an 8 GB Pi 4 with Ubuntu 20.4 ARM64. Other than slow login, I am seeing no lag yet.
    Is there a way to change the game mode from survival to creative for my kids? This is probably something easy I am missing, however like I said, I am kind of new to this.
    Also, is there away to change my Permission level in the game itself?
    Thank you

    1. Avatar for James A. Chambers

      Hey Jonathan,

      That’s a great setup, and congrats on getting the Bedrock version working on there, it’s quite a bit more difficult than the Java version! That is *fantastic* you aren’t experiencing any lag! When I wrote this years ago it was absolutely unplayable so things have come a LONG way!

      I think I can absolutely help. Go ahead and type:

      screen -r

      You should see the Minecraft server console. Type:

      op player

      or

      op "player if there's spaces in their name"

      like this:

      [2021-08-02 15:28:04] [INFO] Player connected: Jimmy Cham, xuid: 2533274815001126
      op "Jimmy Cham"
      [2021-08-02 15:28:27] Opped: Jimmy Cham

      This will give you access to the server operator commands. You can still do a lot of commands in the server console but I find them easier to use with the client (since it has command autocompletion/suggestions and makes the commands easier to work with). For example, changing game modes for a player is:

      gamemode creative "Jimmy Cham"
      [2021-08-02 15:29:13] Set Jimmy Cham's game mode to Creative

      You can see all the different commands here.

      If you want to change settings server wide (for everyone) it’s often better to use the server.properties file located in ~/minecraftbe/yourserver/server.properties. Here’s a sample from it:

      server-name=Dedicated Server
      # Used as the server name
      # Allowed values: Any string without semicolon symbol.

      gamemode=survival
      # Sets the game mode for new players.
      # Allowed values: "survival", "creative", or "adventure"

      force-gamemode=false
      # force-gamemode=false (or force-gamemode is not defined in the server.properties)
      # prevents the server from sending to the client gamemode values other
      # than the gamemode value saved by the server during world creation
      # even if those values are set in server.properties after world creation.
      #
      # force-gamemode=true forces the server to send to the client gamemode values
      # other than the gamemode value saved by the server during world creation
      # if those values are set in server.properties after world creation.

      difficulty=easy
      # Sets the difficulty of the world.
      # Allowed values: "peaceful", "easy", "normal", or "hard"

      As you can see it’s pretty well commented and even gives you the different parameters in the comments. You can edit this file with:

      nano ~/minecraftbe/yourserver/server.properties

      or you can use the GUI as well if you open it in the TextEdit application. That is the method I would recommend if you want to permanently change it to creative server wide (as well as setting force-gamemode = true if you want everyone to be always forced into that game mode otherwise they will get the gamemode you give them individually with the commands). Hopefully that helps!

  6. Avatar for Lester

    I’m still getting this error:

    ./bedrock_server: error while loading shared libraries: libnsl.so.1: cannot open shared object file: No such file or directory

    Is there a dependency I’m missing and how to resolve?

    1. Avatar for James A. Chambers

      Hey Lester,

      That’s an odd dependency! I believe libnsl.so.1 is just a part of libc. Let’s try:

      sudo apt install libc6

      There’s one more we can try if that doesn’t work:

      sudo apt install build-essential -y

      The build-essential should definitely get all these types of libraries in there!

      1. Avatar for Aaron

        Hi, I also face the same issue.
        I’ve tried the both apt install command, but the problem is not fixed.

        PS. While I was running the install command, it replied:
        libc6 is already the newest version (2.28-10)
        build-essential is already the newest version (12.6)

        I also the find the libnsl.so.1 in the directory of “/lib/arm-linux-gnueabihf”

        Thanks for help.

        1. Avatar for James A. Chambers

          Hey Aaron,

          That’s so strange! I wonder if a library has been updated. This is only on the Raspberry Pi I am guessing since you posted it in this thread. I will test it out here and see what I can find!

          1. Avatar for Aaron

            Thanks for your help.

            In additional for your information,
            1. when I type “ldd bedrock_server”, it replied “not a dynamic executable”
            2. My os version is: “Debian GNU/Linux 10 (buster)” which is the 64bit Respberry Pi OS

            Thanks.

              1. Avatar for Aaron

                Hi, the QEMU in my system is 3.1 already and I’ve

                qemu/stable,stable 1:3.1+dfsg-8+deb10u8 arm64
                fast processor emulator, dummy package

                qemu-user/stable,stable 1:3.1+dfsg-8+deb10u8 arm64
                QEMU user mode emulation binaries

                qemu-user-static/stable,stable,now 1:3.1+dfsg-8+deb10u8 arm64 [installed]
                QEMU user mode emulation binaries (static version)

                Thanks for your help and sorry for my lack of knowledge in Linux.

              2. Avatar for James A. Chambers

                Hey Aaron,

                Can you try the package binfmt-support? That should be the package that registers the interpreter for QEMU for Debian. The equivalent on Ubuntu would be binfmt-utils but on Debian it’s a different package.

                Give that a try and let me know!

              3. Avatar for Chivalrybean

                qemu-x86_64 version 3.1.0 (Debian 1:3.1+dfsg-8+deb10u8)
                binfmt-support/stable,now 2.2.0-2 arm64 [installed]

                ldd bedrock_server
                not a dynamic executable

                Raspberry PI OS

              4. Avatar for James A. Chambers

                Hey Chivalrybean,

                This one might be as simple as you need to log out and back in again to update your path and environment variables. It looks like you have the binfmt-support package installed correctly. What happens if you try to run the executable? Does it say invalid ELF format or something like that?

                You could also be missing the package qemu-user-static. The static binaries are not typically in the main QEMU package which I see you gave the version there but the qemu-user-static variables are what the server needs for emulation. Do you have qemu-user-static as well?

              5. Avatar for Chivalrybean

                qemu/stable,stable,now 1:3.1+dfsg-8+deb10u8 arm64 [installed]
                fast processor emulator, dummy package

                qemu-user/stable,stable,now 1:3.1+dfsg-8+deb10u8 arm64 [installed]
                QEMU user mode emulation binaries

                qemu-user-static/stable,stable,now 1:3.1+dfsg-8+deb10u8 arm64 [installed]
                QEMU user mode emulation binaries (static version)

                ~/bedrock $ ./bedrock_server
                -bash: ./bedrock_server: Permission denied
                ~/bedrock $ sudo ./bedrock_server
                sudo: ./bedrock_server: command not found

                No dice …

                I might just have to run Spigot/Bukkit, which I’ve done before, since that works and the fam is jonsing to try the new stuff on a server. I forgot it was not just a 64-bit OS issue, but also the architecture as well.

              6. Avatar for James A. Chambers

                Hey Chivalrybean,

                That is actually a permissions error. Try setting the binary to executable like this:

                sudo chmod +x bedrock_server

                You can alternatively run the ./fix_permissions.sh script in that same directory as well which will fix all the permissions for you!

              7. Avatar for Chivalrybean

                i:~/bedrock $ sudo chmod +x bedrock_server
                i:~/bedrock $ ./bedrock_server
                ./bedrock_server: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
                :~/bedrock $ ldd bedrock_server
                not a dynamic executable
                :~/bedrock $

                Well that’s closer at least!

              8. Avatar for James A. Chambers

                Hey Chivalrybean,

                That looks good. It won’t actually start in a million years with that command. The executable is running now though.

                I would just try running the scripts normally first now as I’m guessing that’s all it was. You really shouldn’t have to do any of this. There definitely isn’t some deep mystery to solve in the scripts as they’re about 20 lines each and all stuff you can type on the terminal (but is very annoying to type on the terminal for sure). It’s basically a very thin wrapper that just saves the nasty launch commands and is otherwise purely just the Bedrock official server.

                The actual command to launch the server is something like:

                screen -L -Logfile logs/servername.$(date +%Y.%m.%d.%H.%M.%S).log -dmS servername /bin/bash -c "LD_LIBRARY_PATH=dirname/minecraftbe/servername dirname/minecraftbe/servername/bedrock_server"

                That could be reduced to:

                LD_LIBRARY_PATH=. ./bedrock_server

                for a test but at this point the scripts should work if the executable will run!

                I reread your old messages though and I’m concerned you’re setting up the wrong type of server (and this one is way, way harder on the Pi because it’s NOT Java, it’s native x86_64 C++ and the Pi can do Java just fine but is an ARM device and doesn’t do x86_64). Spigot and Bukkit are for Java Minecraft and this is not Java Minecraft (it’s for the Switch/PS4/Xbox/Android/iOS/Windows 10 store versions). Just thought I’d throw that out there since there’s no reason to continue if you need a java compatible server and not a bedrock server. I actually already have one too which is the Java compatible version!

              9. Avatar for Chivalrybean

                I was intentionally trying to run Bedrock, but depending how that goes, I can run Java if it doesn’t run well enough.

                I was trying to do it (Bedrock) manually, for practice, but I may just resort to the scripts now that I have this part sorted.

                Thanks for all the help! I’ll update (hopefully) with the end results.

              10. Avatar for Chivalrybean

                I’ve finally got Java 16 and Java 1.17 running. It seems to perform OK. Will try the Bedrock script setup still, when I have some time.

  7. Avatar for Richy

    Thanks,
    I got my Pi4 running after getting the right libs from the same distro 20.04 Ubuntu off a X86_64 system.
    Great small playground for my children.
    Perhaps they will enjoy to hack around on RPi and Linux 😉

Leave a Comment

Your email address will not be published. Required fields are marked *

Type here..

Exit mobile version