Instructables

Raspberry Pi: Minecraft Server

Featured
Picture of Raspberry Pi: Minecraft Server
These instructions will provide you with a list of requirements and steps for configuring your own Minecraft server using the Raspberry Pi. Once complete, you will be able to access and play with your friends from across the world on your Raspberry Pi.
 
Remove these adsRemove these ads by Signing Up

Step 1: Materials

Picture of Materials
Raspberry Pi: Model B

USB Power Adapter

Ethernet Cable

SD Card(At least 4GB)

Soft-float Debian "wheezy"( Can be found here: http://www.raspberrypi.org/downloads )

Imaging software (ex: Win32DiskImager: http://sourceforge.net/projects/win32diskimager )

SSH Client ( ex: Putty: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html )

Step 2: Development Environment

Picture of Development Environment
PC with Internet connection & SD card reader

Additional wired Internet connection

Extra USB Keyboard

Monitor (with HDMI port, or adapter)

HDMI cable (and adapter, if necessary)

Step 3: Download and Burn Linux Distribution Image to SD Card

Picture of Download and Burn Linux Distribution Image to SD Card
Download the Soft-float Debian “wheezy” image zip file (http://www.raspberrypi.org/downloads) and unzip it into a directory of your choice.

     Linux distribution used: 2013-05-29-wheezy-armel


Obtain imaging software that will support SD cards

     Ex: Win32DiskImager, http://sourceforge.net/projects/win32diskimager/


Burn an image of the linux distribution to SD card:

1. Open Win32 Disk Imager
2. Click on Directory icon and navigate to downloaded and unzipped image (.IMG) and select ‘Write’ … confirm “Yes” when prompted
3. When complete, a window will pop up saying “Write Successful”.  Click OK.  Click Exit.
4. Remove SD card.

Step 4: Initial Boot and Configuration of the Raspberry Pi

Picture of Initial Boot and Configuration of the Raspberry Pi
1. Insert SD card into Pi in without a power supply
2. Ensure that HDMI, keyboard and mouse are connected properly
3. Connect the 5V power supply
4. The Pi should boot as a list of processes and applications begin filling the screen
5. A blue screen appears with ‘Raspi-config’ and several menu options
6. Arrow down to Select ‘expand_rootfs’ and press Enter
7. ‘Root Partition has been resized’, press Enter.
8. Arrow down to ssh
9. Enable SSH
10. Reboot
11. If all boots correctly then you are ready to start the install.
1-40 of 64Next »

m about to start using raspberry pi but can you play minecraft by going on to the mine craft.net website and putting user and pass and downloading linux version. can u or can u not do this

Make sure you use the correct ram for your pi:

Memory256 MB[4] (Model A)
256 MB (Model B rev 1)
512 MB (Model B rev 2)[5]

Source: http://en.wikipedia.org/wiki/Raspberry_Pi/

Modify the command accordingly:
java -Xmx256M -Xms256M -jar minecraft_server.jar
java -Xmx256M -Xms256M -jar minecraft_server.jar
java -Xmx512M -Xms512M -jar minecraft_server.jar

Please note: Newer server jar includes version nr. in file name
1.7.9 = java -Xmx___M -Xms___M -jar minecraft_server.1.7.9.jar

yror103 months ago

You can now just do

sudo apt-get install oracle-java7-jdk

joedirtdigger4 months ago

this is a good start for a instructable however I would suggest ya'll look at this site for a much more detailed and stable server set up

http://picraftbukkit.webs.com/pi-minecraft-server-...

this is the one I used and is about as solid as it gets and contains a lot of info not covered here

I am not gonna install this! I'm sorry! im gonna install from mojang now!

I am not gonna install this! I'm sorry! im gonna install from mojang now!

I can't install this minecraft.i can't.......... what am I surpossed to do............................................HELP ME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Eilermoon5 months ago

When try to run the final command to start up the server, i get the error:

"java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory"

Also, when i go to test the command that should result in:

"java -version"

I get nothing in reply. I'm pretty sure I've done everything right and checked many times but i cant get anything to work right. Any help is appreciated, thanks!

chrisgoad3882, You really need to take a look at this. I am having the same problem. I think my system wont recognize /opt/java/jdk1.7.0_25/bin/java as a directory or file (since there is no file extention?).

"java -version"

returns:

"java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory"

Also, where are the java man pages? I think the "sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk1.7.0_25/bin/java" 1" command isn't doing what its supposed to.

jreindel jreindel5 months ago

Ok, after reading through other updates i found something which worked. I had to use the most updated version of Java. To get this do:

wget --no-check-certificate --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F" "http://www.java.net/download/jdk8/archive/b102/binaries/jdk-8-ea-b102-linux-arm-vfp-hflt-07_aug_2013.tar.gz"

After that everything was the same except instead of "jdk1.7.0_06" the updated java would be "jdk1.8.0" in all the subsequent commands.

jreindel jreindel5 months ago

Oh, and make sure you have the correct version of the minecraft server.

https://s3.amazonaws.com/Minecraft.Download/versions/1.7.4/minecraft_server.1.7.4.jar

CommandoNinja5 months ago
EPIC!!!!!!!!!!!!!!
joey566 months ago
Cool
cgeorge116 months ago
Then we unzip Java files using the following command:

tar xvzf ~/(Name of your Java package file).gz

I got stuck there. What iis the name of your java package file?
maboy1 year ago
Can you play from the pi?
im3733 maboy1 year ago
I wouldn't expect so. Running a Minecraft server takes significantly less memory than playing it. Most of this is due to the amount of memory used for rendering everything.

Mojang has actually posted system requirements here:
http://help.mojang.com/customer/portal/articles/325948-minecraft-system-requirements

They specify a minimum of 2GB of RAM for running the game, with a recommendation of 4GB of RAM, whereas the Raspberry Pi tops out at only 512MB, while you could theoretically use some of the SD card or external storage as swap space, this isn't recommended as it will burn out those sectors of the card/disk faster, not to mention the speed of the swap space isn't that great.
im3733 im37331 year ago
That said, there is a Minecraft Pi edition that is designed to work on the Raspberry Pi, however, I don't know if it supports server play (though my suspicion would be that it does).

http://pi.minecraft.net/
madminor im37337 months ago
Hey

If you go to minecraftforum.net, they now have a dedicated Forum category for the Raspberry Pi.
SoaringMonkey7 months ago
Hey where did you get that case? It looks awesome :)
snakehead0079 months ago
Change the first line into this =>

wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F" "http://www.java.net/download/jdk8/archive/b102/binaries/jdk-8-ea-b102-linux-arm-vfp-hflt-07_aug_2013.tar.gz"
digipup19 months ago
Can it work with raspbian?
KaiGrid10 months ago
Would this server be able to support Feed The Beast Unleashed? If you want to look it up here is a link: http://www.feed-the-beast.com/mod-pack/unleashed
Element_Ike12 months ago
I don't understand Step 7. Should I type that into the Terminal?
AZsid Element_Ike11 months ago
Yes. If you get an error that says "WARNING: The certificate of `edelivery.oracle.com' is not trusted. The certificate has not yet been activated" (like I did) modify the line to read:

wget --no-check-certificate --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F" "http://download.oracle.com/otn-pub/java/jdk/7u25-b15/jdk-7u25-linux-arm-sfp.tar.gz"

You should then see it download about 68Mb from Oracle. (I assumed I could trust Oracle)
Good Luck.
jukees AZsid10 months ago
thank you for the "--no-check-certificate" command, it really helped me out.
digipup111 months ago
How do I get putty?
Minizatic11 months ago
Here is a newer version of java. It has hard float support and runs faster.
Element_Ike11 months ago
How can I update this to work with 1.6.2?
Minizatic11 months ago
Just an idea. You could run the Spigot server instead of vanilla, it would probably give you better performance, along with other things.
Linkz5711 months ago
@Jeppefm1 The Recaptcha wouldn't let me post a reply to your comment, so it's up here, alone.

I use https://github.com/Ahtenus/minecraft-init to have the Minecraft server start automatically (among many other things). If you're looking for a simpler solution, you might be able to do this:

cd ~/MCServer && echo -e '#!/bin/bash \njava -Xmx256M -Xms256M -jar minecraft_server.jar' > startminecraft.sh && chmod +x startminecraft.sh && sudo ln -s startminecraft.sh /etc/init.d/startminecraft

And that will 1: move to the MCServer folder 2: create a simple script that starts the Minecraft server with 256M of RAM (you can change that if you have more to offer) 3: make that script executable 4:make a link to that script in your startup folder. Each of those steps are separated by an "&&". This is my first comment on Instructables, so I don't know if it will automatically format the code to look nicer. If it doesn't, copy between the and tags.
Note: I haven't tried actually using my code snipit for automatic startups, so, you know, RFC and a YMMV.
Jeppefm111 months ago
Can you programme it to, when you start the raspberry pi it starts the server?
How would I go about plugging in in to power? Do I need an actual power supply or will a wall socket work. The materials list only asks for a USB Power Adapter. Thanks in advance!
AZsid Element_Ike11 months ago
It's a USB power supply, the same thing used to charge phones, tablets, etc. It's a micro-USB plug.
I had mine running off of a USB port on a (mini-itx) PC with a USB cord from a local Walgreens for a while. I have since bought an Energizer USB port that plugs into the wall.
mikroskeem1 year ago
Minecraft server is very laggy with 256mb memory(especially 1.5.2)
even on x86 computers -.-
but what about the new 512mb and if you expand root to fill SD to give you more memory wouldn't that be helpful?
No, i've got 512mb version and it's still laggy(tried with raspbian and arch linux)... ofc you could use a swap space... but raspberry pi has problems with fast sd cards when overclocked(swap needs fast device)
Agreed. It's a cool idea, nonetheless.
yes, it is :3
I'm planning on doing this Instructable so I can get back into Minecraft, it looks comprehensive and well done, fantastic job. I have a few questions that I hope you can answer.

Does the download link for the server above go to the most recent available version?
Also I am wondering if anyone has tried updating the server version; is that easy to do?
Finally, if I wanted to keep the Minecraft files on an external drive I would simply write
     mkdir USBDRIVE/MCServer
in Step 8, right?
mbraverman1 year ago
Bro! I don't know how to thank you! Your tutorial ran smooth as Silver Marlboro Menthol sigs! :D Everything worked well. All I had to do is copy and paste your instructions!!

Thank you!
1-40 of 64Next »