After tinkering with my Pi for a while, I found out a way of creating a Minecraft server.
This guide isn't too complicated or hard to follow, but it's a bit long!
I used a Model B rev 2 Pi for this.
1) Flash an SD card (I'm using a 2GB) with Raspbian wheezy (follow the instructions on http://www.raspberrypi.org/downloads)
2) Put the SD card in the Pi, connect an Ethernet cable (I have no idea how Wifi performance is for this) and connect a Micro USB cable. You'll want to connect your Pi to a screen using HDMI or the SDTV connector before you connect the Micro USB cable.
3) raspi-config should come up on your screen. Set timezone, locale and keyboard layout, fix any overscan settings if you have to and then choose Overclock and set it to modest (this will NOT void your warranty).
4) Now, select memory split and set the GPU memory to 16mb (you won't need to run startx for this guide so you'll want to set as much RAM free as you can for the server)
5) Select Finish and restart the Pi.
(from here on in, you can ssh into the Pi using PuTTY or any other tool and do this, and unplug the Pi from your screen. If you don't like a headless pi, please don't disconnect anything)
6) Now, you'll want to set a static IP so that you can forward ports on your router afterwards.
7) Log in (username: pi, password: raspberry) and then:
Code: Select all
cd /etc/networks sudo nano interfaces
Code: Select all
iface eth0 inet static address (any free network ip, for example 192.168.1.4 - you'll have to check what IPs your router assigns to network devices) netmask 255.255.255.0 gateway (your router's ip) nameserver (your router's ip)
10) Now, you'll want to open port 25565 on your router. Since everyone has their own router, I'm not going to post a guide for this - check your router documentation or google for instructions.
11) Unfortunately, we can't wget the official Java VM package from Oracle, so you will need to download the package to your computer and send it via SSH (use WinSCP for Windows) to /home/pi. Download link: http://jdk8.java.net/fxarmpreview/index.html
12) Once you have ssh'd the package to /home/pi, do the following:
Code: Select all
mkdir -p /opt sudo tar zxvf (name of package) -C /opt rm (name of package) sudo /opt/jdk1.8.0/bin/java -version
14) Now, you will need to go to the official Minecraft website to download the server jar: https://s3.amazonaws.com/MinecraftDownl ... server.jar (either wget this to /home/pi or ssh it from your computer to /home/pi)
15) After this, type this into the terminal: cd /home/pi
16) To run the actual server," sudo /opt/jdk1.8.0/bin/java -Xms128M -Xmx256M -jar /home/pi/minecraft_server.jar nogui"
NOTE: Change the Xms and the Xmx parameters if you haven't set memory split to 16mb GPU. The total has to be less than the 2nd value in -/+ buffer/cache when you type "free -m" into terminal. If you change the parameters, make sure you only use multiples of 8, such as 8, 16, 32, 64, 128 or 256. Xms has to be smaller than Xmx.
17) It will take a while to create a map. In my case, it took 200 seconds, which amounts to approximately 3 and a half minutes. If you turn your server on after the map has been generated (let's say, after restarting your Pi or something) it shouldn't take more than 30 seconds.
18) if you ever need to edit server.properties, type "stop" while the server is running, and then type "sudo nano /home/pi/server.properties" .
And there you go. Your minecraft server is up and running.
I connected to mine using my laptop and it would run well for myself. I would only have some chunks not being downloaded from time to time, but it's a rare thing.
If you want to let someone from outside your network connect to your server, give them your IP (check it at http://www.omeuip.com).
Here's my server, running 24/7: randrade18.no-ip.org
If you want to test the speeds you get to my server, please go to http://randrade18.no-ip.org/mini (note: you don't have this - I set this up seperately when I configured my PHP server)
edit: Server down between 7PM and 9PM GMT on 1/1/13 - I'm using the Pi to wipe a flash drive!