Raspberry Pi 2 - Minecraft Server

The new Raspberry Pi 2 has got twice the RAM and a load more processing power, so will it make a better Minecraft server?  The old Pi made an adequate Minecraft server providing you only had a few players and you kept the view distance low.

I tried both the vanilla server and a spigot server, both similar results, both performed reasonably well, but Spigot seemed a little more stable (but this is only based on feeling).  I was only able to test with up to 3 players but it worked well under those conditions.

Setting up your own server is pretty simple.

You will need to download either the vanilla server from Mojang or build your own spigot server jar file.

Note - The instructions below, will take you through how to create a vanilla server, if you have built spigot the only difference will be the name of the 'jar file' you put into the start.sh file

1. Make a directory for your Minecraft server

mkdir ~/MinecraftServer

cd ~/MinecraftServer
2. Download the 1.8.1 vanilla Minecraft server jar file
3. Create a script to run the server jar file
nano start.sh
Enter the following command which will run the server
java -Xmx1024M -Xms512M -jar minecraft_server.1.8.1.jar nogui
Ctrl X to exit & save
4. Make the script executable:
chmod +x start.sh
5. Run the server
You should receive a message asking you to accept the EULA.
6. Accept the EULA (end user license agreement), open eula.txt
nano eula.txt
Ctrl X to save and exit
7. Run the server
The first time the server runs it will take a while to start as it creates a new world.
Once you see the word "Done", the server is up and running and you should be able to connect to the server using Minecraft choosing Multiplayer, Direct Connect and entering the IP address of the Pi.
You can shutdown the server by typing the command "stop" in the command window .

If you find the server is slow, particularly when generating chunks (i.e. creating new bits of the world when you get to the edge), you could try reducing the view distance.  I reduced it from 10 to 7 and this seemed to make the server more responsive.

8. Edit view-distance in server.properties

nano server.properties





Ctrl X to save and exit

Restart the server for the change to take effect.