How to Create A Minecraft Server Like Mine on your Raspberry Pi
Tutorial now updated with latest links etc.
I have used bits and pieces of info from randrades post on the pi forums so credit to him:
You can use either a 256 or 512mb pi. I have had my 256 up for months at a time with great stability.
It helps to overclock to turbo in raspiconfig (reach with: sudo raspi-config)
this tutorial assumes you have port forwarded if you want to make your server public etc.
to access ssh on your computer windows: download putty
mac/linux: go to terminal and type: sudo ssh [email protected][ipofyourpi]
First, get your raspberry pi and boot a fresh raspbian install on it.
In raspi-config which should come up on first boot enable ssh(advanced settings), change memory allocation to 16(ditto), disable desktop on boot, overclock if you would like (reccomended: turbo), and expand root partition.
****This next bit not necessary, java is now already installed on raspbian****
type: sudo wget http://www.java.net/download/jdk8/archive/b102/binaries/jdk-8-ea-b102-linux-arm-vfp-hflt-07_aug_2013.tar.gz
(this is a link to a direct download of java, it may be old. Go to http://jdk8.java.net/download.html, aceept the licence agreement and copy the link for the arm hflt download into the wget for a newer version.)
(If you get an issue like ERROR: The certificate of `www.java.net' is not trusted.
ERROR: The certificate of `www.java.net' hasn't got a known issuer.
then use this line: sudo wget --no-check-certificate http://www.java.net/download/jdk8/archive/b102/binaries/jdk-8-ea-b102-linux-arm-vfp-hflt-07_aug_2013.tar.gz )
then enter these commands one by one, inserting the package name given at the end of the wget:
mkdir -p /opt
sudo tar zxvf (name of package) -C /opt
rm (name of package)
sudo /opt/jdk1.8.0/bin/java -version
Well done, you have installed JAVA!!!!
type cd /home/pi
then: sudo wget http://ci.md-5.net/job/Spigot/lastStableBuild/artifact/Spigot-Server/target/spigot.jar
In normal raspbian
If on a 256mb pi: This command will run your server: sudo java -Xms128M -Xmx256M -jar /home/pi/spigot.jar nogui
If on a 512mb pi: This command will run your server: sudo java -Xms256M -Xmx496M -jar /home/pi/spigot.jar nogui
********* If still using custom jdk install****************
If on a 256mb pi: This command will run your server: sudo /opt/jdk1.8.0_20/bin/java -Xms128M -Xmx256M -jar /home/pi/spigot.jar nogui
If on a 512mb pi: This command will run your server: sudo /opt/jdk1.8.0_20/bin/java -Xms256M -Xmx496M -jar /home/pi/spigot.jar nogui
This should start it and will take approximately 3 mins to build the map etc.
you can now log onto your minecraft server!
op yourself with the command op [your username]
to stop type either into the command line or in the game if you are op /stop
after you have tested it it is time to tweak to get the best performance do this by stopping the server and typing:
sudo nano server.properties
edit it as you please, mine is this:
#Minecraft server properties
#Tue Apr 16 12:52:48 UTC 2013
server-name=The Picraft Raspberry Pi Powered Bukkit Server
motd=A Minecraft Server
then: sudo wget [link to download which you have just copied]
then if it is a zip file: unzip [name of downloaded package]
reload, restart or start your server and bobs your uncle!
I have had a few people asking for a guide to getting a custom ip for your server, to achieve this go to no-ip.com and create an account, once this is done
do this to intall the DUC on your pi:
- sudo cd /usr/local/src/
- sudo wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
- sudo tar xf noip-duc-linux.tar.gz
- sudo cd noip-2.1.9-1/
- sudo make install
- sudo /usr/local/bin/noip2 -C
- ( this will create the default config file)
You will then be prompted for your username and password for No-IP, as well as which host names you wish to update. Be careful, one of the questions is "Do you wish to update all hosts". If answered incorrectly this could effect host names in your account that are pointing at other locations.
- sudo /usr/local/bin/noip2
- this starts it in the background
Then, once you have followed those instructions you should have a working custom ip like mine! picraft.no-ip.biz:25565
There is the comprehensive guide to minecraft on the pi,
If you have succeeded in creating your server, please consider donating: