Note: This tutorial works with all ARMv8 Raspberry Pi’s except Raspberry Pi 4 (because Ubuntu MATE doesn’t support it). Before starting this tutorial you should have some level of familiarity with Raspberry Pi and the command-line.
[some random intro that I’ll add back later]
I’ve divided this post into sections to make it easier for people who only want to know certain bits.
Let’s get started!
Flashing your SD card with Ubuntu Mate (64-bit)
Note: If you’re already running Ubuntu Mate (64-bit) on your RPi, you can skip this step 😀
PocketMine only supports 64-bit operating systems, unfortunately the latest version of Raspbian, Raspbian Buster, is a 32-bit OS and doesn’t support PocketMine. I’ll show you how to flash your SD card with a 64-bit OS called Ubuntu Mate. Let’s get started!
Note: Flashing your SD card means any data on the SD card before will be completely erased forever.
Next, download and install balenaEtcher. Etcher is a popular cross-platform program that flashes images to SD cards and other disks. Visit https://www.balena.io/etcher/, click “Download for *” and follow the typical installation process for your platform.
When your done downloading both things, plug your SD card into your computer (you might need an adapter) and open Etcher. Click “Select Image” and select your downloaded
.img file. Then click “Select Target” and select your SD card. Now click “Flash!”
Flashing could take anywhere from 10 minutes to over an hour depending on the speed of your SD card. Right now would be a good time to get some lunch or watch some YouTube while you wait.
Hurray! Your SD card is done flashing and your ready to dive in.
Unplug your SD card from your computer and insert it into your Raspberry Pi. Boot your RPi and follow all the setup prompts until you see the Ubuntu Mate desktop.
Believe it or not, installing PocketMine is one of the easiest (and longest) steps in this tutorial. Make sure you have a good internet connection before you start because this might take a while.
Open MATE Terminal (Menu > System Tools > MATE Terminal) and run the these commands:
sudo apt update # Update packages sudo apt install curl -y # Install curl sudo apt install make autoconf automake m4 bison g++ git cmake libtool-bin -y # Install PHP build deps mkdir ~/PocketMine-MP && cd ~/PocketMine-MP # Make a directory for your server curl -sL https://get.pmmp.io | forcecompile=on bash -s - # Download and install PocketMine-MP
Once it starts compiling PHP you can either wait for the build to finish (which could take over an hour) or enter
Ctrl-C , download this pre-built binary and extract it to
When the commands are finished and/or you’re done extracting the binaries, you can run
./start.sh and PocketMine will guide you through the server setup process.
Keeping the server running
You can keep your server running even after you close the terminal by using a program called
You can install
screen from by typing:
sudo apt install screen
screen ~/PocketMine-MP/start.sh and your server will start in a
If you want to stop your server or run some commands, you can type
screen -r . This will resume your
screen session and all of it’s output while you were gone/
Sometimes you also might also want to exit your screen session without having to closing the terminal. You can do that by typing
Port forwarding is one of the more complex topics so I won’t be covering it here. It basically just let’s people who aren’t on your network join your server. You can read the official PMMP documentation on port-forwarding if your interested.
Thanks so much for sticking with me throughout this tutorial. I really appreciate it. If you have any questions or feedback feel free to leave a comment or tweet me at @nathfreder.