How To Setup a Minecraft Server on Raspberry Pi

12:24 PM 2 Comments A+ a-

Helolo everyone!

Setting up the Raspberry Pi Minecraft Server

Okay, first we will need to install Raspbian on the Raspberry Pi. 
If you have not done this yet, a quick Google search should help you out ;)
  1. First let's update the Raspberry Pi to the latest versions using this:
    sudo apt-get update
    sudo apt-get upgrade
  2. Now open raspi-config so we can change some settings:
sudo raspi-config
(if you want more help with the raspi-config, tell me below)
  1. Now inside of raspi-config, go to Advanced Options->Memory Split, and change it to 16. (This will make more memory free for the server)
  2. Also you do NOT want to boot into Raspbian desktop so make sure you Enable Boot to desktop/scratch goes to command line.
  3. Set overclocking to High. (If possible, :( I could not on my Pi )
  4. Finally enable SSH so we can connect the Pi remotely if required (Unless you already have it enabled drrrr).
  5. Now go to finish and reboot/restart.
  6. I will want the IP address of your Pi for when I try to connect to to your server. LOL just kidding!     We need to get our Pi's IP address for when we try to connect to our servers. Get you IP by typing this command:
sudo hostname -I
  1. Next we NEED to install Java, because the Raspberry Pi Minecraft Server NEEDS IT to run. To do this we will need to get it from the Java website.(If you’re on the latest version of Raspbian (Raspbian Jessie with PIXEL) you can skip to step 13 as Java is pre-installed on Raspbian Jessie with PIXEL.)
sudo wget --no-check-certificate http://www.java.net/download/jdk8u60/archive/b25/binaries/jdk-8u60-ea-bin-b25-linux-arm-vfp-hflt-21_jul_2015.tar.gz
  1. Now YOU MUST run the following command to unzip the file into the opt folder.
sudo tar zxvf jdk-8u60-ea-bin-b25-linux-arm-vfp-hflt-21_jul_2015.tar.gz -C /opt
  1. To check that it unzipped properly and is usable I COMMAND YOU TO run the following command:
sudo /opt/jdk1.8.0_60/bin/java -version
  1. Now we will need the Minecraft server file, we’re going to use a builder tool that is supplied by spigot, to get this enter the following commands:
sudo mkdir /home/minecraft
cd /home/minecraft
sudo wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
  1. Now you will want to run the build tools file so it creates your spigot server. It will take about 15-60 minutes to finish. Add --rev 1.10.2 to the end of the command to get the latest version. Don’t forget to change 1.10.2 in the command to the latest version number.
    Note: If you’re on the latest version of Raspbian you can remove /opt/jdk1.8.8_60/bin/ from this command and any other command that contains it).
sudo /opt/jdk1.8.0_60/bin/java -jar BuildTools.jar
Important: If you have a Raspberry Pi B+/B or any variation before the Raspberry Pi 2 then the build tools WILL, AND MUST, FAIL! You can instead download the spigot.jar directly from file mirror using the following command:
sudo wget http://www.mediafire.com/download/pg7xzshq5cdmfjx/spigot-1.10.2.jar
If you want a older version for some reason(I did it for the Moon mod, yeah!) you can simply change the number at the end (e.g. 1.10.2 changed to 1.7.10 ect).
  1. To make sure the spigot server successfully downloaded and saved simply type ls and should see spigot.jar.
ls
Make sure you remain in the /home/minecraft folder as we want all the server files to be created in here. If you start the server in a different folder it will create the files in there.
  1. Now you can start your server. (You may need to change the version number depending on what version you’re using eg. spigot-1.10.2.jar)
Raspberry Pi
sudo /opt/jdk1.8.0_60/bin/java -Xms256M -Xmx496M -jar /home/minecraft/spigot-1.10.2.jar nogui
Raspberry Pi 2 & 3
sudo /opt/jdk1.8.0_60/bin/java -Xms512M -Xmx1008M -jar /home/minecraft/spigot-1.10.2.jar nogui
Now the server should HALT right away because you MUST agree to the Eula. You (and I :P)can do this by opening the Eula by typing(Man..that words been used to many times) sudo nano eula.txt and change "false" to "TRUE" or "true" or "True" or "truE" or whatever way you want.
  1. Now start it up AGAIN, it will take a while to create a map so give it about 5-15 minutes. If you ever reboot it will only take 30-60 seconds to load if the map has already been created.
  2. The server should now be running and connectable over your local network.
  3. The Raspberry Pi Minecraft server will now run fine but YOU may want to do some "optimizations" to speedup that slug(server).
So I hope you had fun!(I did :P)
And make sure to comment if you want some speederupping tricks.

Thanks for reading!
Techie Pocket


2 comments

Write comments
Unknown
AUTHOR
February 4, 2017 at 4:12 PM delete

This is how to benchmark a GPU:
https://www.youtube.com/watch?v=MN3l7-KXemE

Reply
avatar
Anaya
AUTHOR
January 20, 2022 at 7:21 AM delete

This is my first visit to your web journal! We are a group of volunteers and new activities in the same specialty. Website gave us helpful data to work. Creative Minecraft servers

Reply
avatar