Setting up a free Minecraft PE Server

Being the amazing nerdy Dad that I am, of course I’ve done my share to introduce my kids into video gaming. Being that they are elementary age, of course I introduced them into Minecraft. Given that hey had been using an iPad for few years already, my daughter took to the game building amazing objects. My son, enjoyed it mostly because it let him destroy his sister’s creations.

What really blew their minds was when they discovered they could also play with their cousin that lived over 600 miles away. They would setup a facetime session (video chat) and then open Minecraft and play with each other. The problem was that the world they built either lived on my daughter’s iPad, or my nephews. Meaning that they couldn’t always keep working on the world when the other wasn’t online. So I set out to find a solution.

Mojang, came out with their solution to this problem by creating Realms. Now a realm is a world that Mojang will keep online and you and your friends can come and go as you wish. This was exactly the idea, however they only allow for up to 3 people connected a time and charge $4 a month to keep the world hosted. Now I know that doesn’t seem much, but $48 a year so my kids can play online and the moment I stop paying all of their creations are lost didn’t really sit well with me. So that idea was no good.

I began looking into setting up a Minecraft server, since you can download the Java jar file for free from Mojang, but I quickly discovered that this server would only work with Windows, Mac, and Linux clients. However given that they used an iPad, they used Minecraft Pocked Edition (PE), which wasn’t compatible.

After doing some googling I stumbled onto a free opensource project called PocketMine MP. A group of talented developers created an Open Source PHP based application that acts as a Minecraft PE server. BINGO! So now that I found the software, I needed someplace to put it. Well reading over the installation documents, it appears that at this moment it is primarily setup to run using Linux. Now, I’ve setup my fair share of Linux servers and clients in the past and for those that are worried, don’t be its fairly straight forward. So the server doesn’t need to be powerful, but I did want it in a place that will always be online.

So recently I’ve been growing an learning about Amazon Web Services (AWS) and cloud computing and I realized that EC2 (AWS’s virtual machine services in the cloud) has a free teir that allows me to run a Linux host with a public IP from for free for a whole year! So I decided, heck yeah I’ll use the power of the cloud to run a public Minecraft server!

So, without being too specific, you want to go signup for a free AWS account. After you do that head to EC2 and select Launch Instance. Then select the Amazon Linux AMI.

Capture

Then select the t2.micro instance. This will give you 1 CPU and 1 GB of memory.

Capture

On the next page, go to the bottom and expand the Advanced Details and then copy the below script into the User Data field. This will update the server and then download the latest version of the PocketMine-MP.

#!/bin/bash
yum update -y
mkdir /usr/local/pmmp
cd /usr/local/pmmp
wget -q -O - https://raw.githubusercontent.com/pmmp/php-build-scripts/master/installer.sh | bash -s - -r

Then head to the Configure Security Group page. Security groups are like a group of firewall rules. By default only TCP port 22 is open to allow SSH into the system. We will want to also add 19132 UDP to allow for the clients to connect to the PocketMine server.You can also open 19132 TCP if you would like to use the remote console.

Capture

Then launch the instance and you will have a running server with the latest version of PocketMine installed. All you need to do is to SSH into the server and then begin the configuration wizard by launching ./start.sh in /usr/local/pmmp/.