In this tutorial, we will be showing you how to set up your very own Raspberry Pi Minecraft Bedrock server. This project is a cheap way of providing you with an always-on, Bedrock capable server.
This setup stops you from having to leave your phone or computer online if you want others to be always able to access your world. The Pi is also pretty good on power usage so you can save on your power bill too.
For this tutorial, we will be making use of the Nukkit software. We decided to utilize Nukkit since we found that it was one of the most stable Minecraft Bedrock servers currently available that will run on a Raspberry Pi.
Please keep in mind the Pi is quite limited in resources so you may have some issues when it comes to performance.
Tweaking the server properties is a great way to get more performance and maybe some room for more people. I wouldn’t recommend having more than five people joining the server. However, you may want to experiment to see how much it will be able to handle.
If you’re after a server for the Java version of Minecraft, then you should check out our previous tutorial that shows you how to set up a spigot Minecraft server.
If you would like to know more about the server software, then you can find out more about it on the Nukkit website.
Equipment List
The following pieces of equipment are what I recommend when it comes to completing this Raspberry Pi Minecraft Bedrock server.
Recommended
- Raspberry Pi ( Amazon ) 3 or newer
- Micro SD Card ( Amazon )
- Ethernet Cable ( Amazon ) or Wi-Fi ( Amazon )
- Power Supply ( Amazon )
Optional
- Raspberry Pi Case ( Amazon )
Setting up your Raspberry Pi Minecraft Bedrock Server
In this tutorial, we will work entirely within the terminal. In fact, it is best to change the boot mode of the Raspberry Pi, so it boots directly into the terminal for the Minecraft Bedrock server.
You can also install Raspberry Pi OS Lite, so you don’t install any of the additional packages that come with the full version of Raspberry Pi OS, make sure you install java as we will need that.
Minecraft servers are hugely demanding on the Raspberry Pi’s hardware, so every extra bit of resources made available to it, the more it can handle. It’s important to keep this in mind before installing any additional software packages that may drag the performance down.
1. First, let’s make sure everything on the Raspberry Pi is up to date by running the following two commands.
sudo apt update
sudo apt upgrade
2. Now we will need to make a couple of changes in the raspberry pi config tool. Let’s open the tool by entering the following command:
sudo raspi-config
3. First, let’s go to Advanced Options
->Memory Split
and update this to 16
. (This will allow for more memory to be free for the server)
4. Secondly, now is a good time to change the “boot up” option so that it boots straight into the terminal. Go to Boot Options
-> Desktop/CLI
, and press ENTER with Console
selected to enable booting to console.
5. To truly make the most of the Minecraft Bedrock server, you will need to overclock your Raspberry Pi.
The following steps only work with the Raspberry Pi 1 and 2 as the raspi-config tool does not currently support the Raspberry Pi 3 for overclocking.
While you’re still in the raspi-config tool, go to Overclock
, here pick the “High
” overclocking option. This will give the Raspberry Pi a good overclock, though make sure you have a decent, stable power supply, most USB chargers will not cut it.
6. If you haven’t activated SSH before, make sure you go to Advanced Options
->SSH
and select “Enable
“. You will need this for easy access to your Raspberry Pi.
7. Now go to “Finish” and reboot your Raspberry Pi using the following command.
sudo reboot
8. We need to make sure we have Java installed, the following command will install the default JDK package for Raspberry Pi OS.
sudo apt install default-jdk
9. Before we get too ahead of ourselves, now is a great chance to grab the IP address of the Raspberry Pi. You will need to write down the value from the next command, and we will need to use this later.
In the terminal, enter the following command:
sudo hostname -I
10. With that now set up, we will now proceed with downloading and setting up the Nukkit server software.
Before we get too far ahead of ourselves, let’s first make a directory to keep this in.
Run the following commands to make the directory in the pi user’s root directory.
mkdir ~/nukkit
cd ~/nukkit
11. Finally, let’s download Nukkit, we usually will have to compile the software which can take a while due to the Raspberry Pi’s low processing power.
Thankfully some nice users have provided their CI (Continuous Integration) servers to the public.
Run the following wget command to download the latest build of Nukkit to your Raspberry Pi.
wget -O nukkit.jar https://go.pimylifeup.com/3xsPQA/nukkit
12. With Nukkit now downloaded to our Raspberry Pi, we can now run it, this will generate all the files we need to be able to configure the server further.
Running Nukkit is incredibly easy, we can run it with the following simple command.
java -jar nukkit.jar
Upon running the server for the first time, you will be asked to choose a language, for this tutorial we will be using English. Therefore, we typed eng
into the console and pressed enter.
The server should immediately begin to boot up, and the server should display the following text when it is ready to be connected to.
[INFO] Preparing level "world"
[INFO] Starting GS4 status listener
[INFO] Setting query port to 19132
[INFO] Query is running on 0.0.0.0:19132
[INFO] Default game type: Survival Mode
[INFO] Done (3.109s)! For help, type "help" or "?"
While you can now begin to play on your server, you might want first to configure it, so it is set up more to your liking. To do this, first, kill the process by pressing CTRL + C.
13. Two configuration files come with Nukkit, and one controls Nukkit’s own options such as being able to change the number of chunks it loads in, the other controls the actual Minecraft options such as what game mode you want the server to be using.
You can read up on the “server.properties
” file and see what changes you can make to it by going to the Minecraft server properties page.
Run the following command to edit Nukkit’s configuration file.
nano nukkit.yml
Alternatively, run the following command to edit the Minecraft server configuration.
nano server.properties
Once you have finished making your changes to the configuration files, make sure you save them by pressing CTRL + X then pressing Y and then ENTER.
Afterwards, you can immediately proceed to start up Nukkit again by typing in the following command:
java -jar nukkit.jar
Connecting to your Minecraft Bedrock Server
If you’re on a local network, then it will be easy to connect to the Raspberry Pi Minecraft Bedrock server. To test out our recently setup server, we will need to do the following.
1. Now load up Minecraft on a Mobile Phone, a Windows PC, or console that is located on the same local network as the Raspberry Pi.
2. Go to the friend’s tab and then your server should pop up at the bottom under LAN Games. If it doesn’t simply go to direct connect and enter the IP we got earlier on the Pi using the hostname command “hostname -I
“.
We have highlighted the direct connect button in our screenshot below.
If you want to allow access to the Minecraft Bedrock server via the internet, then you will need to setup port forwarding.
You will need to port forward the port 19132
(Unless you change it in the server properties) to the local IP address of your Raspberry Pi. Keep in mind opening ports always increases the security risk from outside sources.
For more information check out our port forwarding guide for the Raspberry Pi.
Updating your Minecraft Bedrock Server
1. To update your Raspberry Pi powered Minecraft Bedrock Server you will first have to make sure you are in the correct directory by running the following change directory command.
cd ~/nukkit
2. Within this directory, all we need to do is redownload the latest available Nukkit binary from their build servers.
Run the following command to download the latest build of Nukkit to your Raspberry Pi.
wget -O nukkit.jar https://go.pimylifeup.com/3xsPQA/nukkit
3. Once the download has finished you should now have the latest available build of Nukkit, and you can now start your server up again by running the following command.
java -jar nukkit.jar
Start the Bedrock Server at Boot
1. To be able to get our Bedrock server to start at startup, we will need to go ahead and create a service for it.
Let’s begin writing this service by running the command below.
sudo nano /lib/systemd/system/minecraftbedrockserver.service
2. Within this file add the following text. This text defines the service and tells the service manager what file to run.
Ensure that you replace “<USERNAME>
” with your username. For example, if your username is “pi
” you would replace the text with that.
[Unit]
Description=Minecraft Bedrock Server
[Service]
User=<USERNAME>
Group=<USERNAME>
Restart=on-abort
WorkingDirectory=/home/<USERNAME>/nukkit
ExecStart=/usr/bin/java -jar /home/<USERNAME>/nukkit/nukkit.jar
[Install]
WantedBy=multi-user.target
Once you have entered in all the data, you can save the file by pressing CTRL + X then Y followed by ENTER.
3. Now that we have created our new service we need to go ahead and enable it by running the following command.
sudo systemctl enable minecraftbedrockserver.service
4. Let’s go ahead and now start up our Pi’s Minecraft Bedrock server with the command below.
This command will tell the service manager to start up our newly created service.
sudo systemctl start minecraftbedrockserver.service
5. If you want to check the status of the Bedrock servers service, then you can with the command below.
sudo systemctl status minecraftbedrockserver.service
Conclusion
Hopefully, by now you should have a fully operational Raspberry Pi Minecraft Bedrock Server.
If you come across any issues or have some feedback related to this tutorial, then please don’t hesitate to leave a comment below.
If you liked this tutorial, be sure to check out our many other Raspberry Pi projects.
Hi, I just set this up as a service.
Which is working great.
However I am no longer in the minecraft console so can’t type in commands on the server which I was able to do before I made it a service.
As a service, it runs in the background. To be able to bring the console back, you will need to stop the service and run the server manually.
Does this work with 7 people?
I am running Raspbian Buster on a pi 3b+.
thanks!
It worked fine with two people, but I think once you get beyond three to five people online at the same time, it will really start to struggle.
How to get this to auto-start on reboot? Could you give me a tutorial or something else?
The tutorial has now been updated with instructions on setting up auto-start.
How can i connect this nukkit server to node-red or an mqtt server? Is this possible?
Do you know how to change the seed of the world as it is not working for me.
You should be able to change it in properties file.
Alternatively, you can set it in the nukkit.yml under the worlds section.
Thanks for the tutorial.
I got java not found error while trying to run the jar, solved it by installing openjdk.
it works fine.
I don’t have any knowledge about java, so I don’t know if this makes any difference in performance
Thanks for this Ulum, we have updated the tutorial to now install JDK. It appears it was removed as a pre-installed package.
what do i put for the internal and external port in my router? I just put 19132 for both and i put the ip of my pi but when my friend try to connect it says it cant connect. what do i do?
Hi Evan,
Technically port 19132 should be correct and allow traffic to flow to your Raspberry Pi.
Sometimes I find the port forwarding on routers to be a hit and miss. Sometimes, a restart will fix the problem.
Do you have the model # of your router? as this can help work out issues.
Thanks,
Gus
I’m trying to get this to work with the cross platform edition, it’s not showing up under friends on minecraft. Is there any advice you have on what to do differently for the bedrock edition or will this not work with the bedrock edition?
Hi Alex,
This project should definitely work with the bedrock edition, but it will not support all the features of it. I personally do not know why it wouldnt by appearing.
I am assuming you are connecting within the same local network?
Cheers,
Emmet
is there a way to set this server up so you can play even when you are not connected to the same wifi network?
Hi Jhan,
Yes it is possible, you will need to portforward port 19132 for this to work however.
You can find our guide on port forwarding and setting up dynamic DNS at https://pimylifeup.com/raspberry-pi-port-forwarding/.
Cheers,
Emmet
Thanks for this tutorial! Please add to your tutorial how to update the nukkit installation. This process worked great for me for a month but now I am getting errors about being outdated.
I overwrote nukkit.jar using the original command
wget -O nukkit.jar https://go.pimylifeup.com/3xsPQA/nukkit
and it appears to be working OK but that was just a guess.Hi GoldAurora,
Just re-running the comamnd as you are doing is the best way to update your Minecraft PE Edition server installation.
We have added a section to the tutorial to reflect this.
Cheers,
Emmet
Good article. The only thing I did different was to install it as a service. That way it starts on boot and restarts if crashes etc.
Create a service file.
sudo nano /lib/systemd/system/minecraft-server.service
Add this:
[Unit]
Description=Minecraft Server
[Service]
WorkingDirectory=/opt/nukkit
ExecStart=/usr/bin/java -jar nukkit.jar
[Install]
WantedBy=multi-user.target
Assuming you files are in opt like mine.
Then run
sudo systemctl daemon-reload
sudo systemctl enable minecraft-server
Now you should be able to start the server with:
sudo service minecraft-server start
How to get this to start on reboot?
Run sudo nano /etc/rc.locals and paste the server start command from root (/) and on end of command type & sign. Past it before exit 0 command!
Hi,
Has anyone got this working with the new 1.2.2 version of minecraft, it seems to be a big update.
Hi,
Once I worked out exactly where the forums were pointing me for the files, this seems to work! I have build 81 running and I have connected from 1.2.3 on iPad. Just need the kids to try and break it now…
Hmm, mine seems to be stuck on debugging. I tried disabling debug mode (going into the nukkit.yml and changing debug to 1) but it doesn’t work. Don’t know what else to try.
After:
sudo java -jar nukkit.jar
I get an error:
ERROR: Invalid or corrupt jarfile nukkit.jar
How do you fix this issue stuck on this step.
Have you tried redownloading the file ?
You probably made the O in -O -o
You need to CD to Nukkit/archive/target then try again
Fantastic guide – I did have one problem which was that I used Raspbian Jessie Lite not realising this does not come with Java, and when I tried to run the server with command line “sudo java -jar nukkit.jar” I received an error that ‘java’ was an unknown command.
To install java I just used the command:
sudo apt-get update
sudo apt-get install oracle-java8-jdk
Worked great and the server seems to run OK without the need for overclocking so far.
Thanks again for a great guide
Can this support API type calls? I’d like to have actions in the game trigger GPIO and vice versa.
If you install the Pokkit plugin for Nukkit, it can then use plugins for the Spigot and Bukkit servers. The upshot of this is that you can run the RaspberryJuice plugin which gives you the python API.
Excellent. Thank you for replying.
I need help!!! How do I access it via internet without port forwarding?
You won’t be able to access it without port forwarding.
Excellent guide!! Thanks to the maker, I got my mcpe server running within an hour
Problems I faced and troubleshooting them
The version on the server and mcpe version need to be same. My were different so it kept displaying “syncing packets to server” or something like that
Be careful the are many build for a same version eg: mcpe 1.1.0.x
I found the correct build by hit and trial. I tried all the builds of the version and one worked at last. make sure that you reboot the server after trying each build as sometimes it gets stuck.
the first time i connected my client, I was able to build. After i diconnected, and reconnected, i can no longer build in minecraft. What do I need to change
You must have fiddled with the .yaml file maybe try re-installing the server
You can remove the nukkit directory and install it again