So since I went through my last heavy blogging phase, my son grew up quite a bit and ended up getting into Minecraft. Being a sucker for games that allow you to build, I got into it too, and decided after not too long that it would be fun to play with him on a server. I also knew a teensy bit about the Raspberry Pi, and found out through some drifting about the interwebs that people had successfully set up very low-cost servers using the Pi. And thus the future opened up to me like a glorious sunrise over a new and wondrous world.
In an effort to ensure that I am able to repeat the process of building a server (which, not by coincidence, I happen to be doing right now), I’ve decided to put these instructions on the blog to make it easier for me to remember everything that needs to be done, and also to help out those lonely searchers who come this way, looking for what I had sought. Hence…
Marc’s Raspberry Pi Minecraft Server Instructions
- Start with a fresh install of NOOBS
- sudo apt-get update
- sudo apt-get upgrade
- Install latest version of Java SE Development: Look for Linux ARM32 v6/v7 Hard Float ABI; download via RPi browser to Downloads directory.
- Once downloaded, go to Downloads folder: cd ~/Downloads; then sudo cp [java filename].tar.gz /opt/ to move the file to the /opt/ directory, where java will be installed.
- Extract Java into the /opt/ directory: sudo tar xvzf [java filename].tar.gz (x tells tar to extract the files; v lists all the files as they are extracted – “verbose”; z tells tar to uncompress the file; f tells tar that you will give it a filename to work with)
- Check to make sure Java extracted correctly: sudo /opt/[java directory name]/bin/java -version
- Create a minecraft directory: sudo mkdir /home/minecraft
- Go to minecraft directory: cd /home/minecraft
- Obtain the builder tool from Spigot that will be used to build the server: sudo wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
- Run the builder tool (will take between 15-30 minutes):
For Raspberry Pi 2: sudo java -jar BuildTools.jar
For Raspberry Pi B+/B: sudo wget http://www.mediafire.com/download/nld0qtn49gyx723/spigot-1.9.2.jar
Or, if all else fails, this might be a good place to find spigot: http://tcpr.ca/downloads/spigot
- When the download and install finishes, check to make sure it was successful by entering command ls and looking for spigot.jar
- Make sure you remain in the /home/minecraft directory to create the server files within that directory. This is accomplished by the entering of one of the following commands:
Raspberry Pi B+/B: sudo /opt/jdk1.8.0_65/bin/java -Xms256M -Xmx496M -jar spigot-1.8.8.jar nogui
Raspberry Pi 2: sudo /opt/jdk1.8.0_65/bin/java -Xms512M -Xmx1008M -jar spigot-1.8.8.jar
Note: I ran into an Error: cannot access jarfile message when attempting to run the commands in step 12; to get around this, I launched from the /minecraft/ directory and removed the directory path to the spigot-1.8.8.jar file from the command.
- The server will stop because the eula.txt file needs to be modified.
- Type sudo nano eula.txt; change “false” in the eula text to “TRUE”, then [ctrl] x, y, and [enter] to save the change.
- Restart the server with the appropriate command from step 12 above.
- Spigot will now build the Minecraft world.
- When Spigot finishes building the world, type stop to quit the server.
- Now add plugins in the plugins folder: cd plugins