Introduction: 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.

Step 1: 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

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

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

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.

Step 5: Configure Internet Access

1. Connect the Pi to a local network via Ethernet cable.  Green and yellow lights should appear on the Pi board itself.
2. Open a Terminal by double clicking on the desktop icon ‘LXTerminal’
3. Type ‘ifconfig’ to ensure and press Enter that the Pi has a valid IP address
4. Type ‘ping 8.8.8.8’ and Press Enter to ensure that the Pi can reach external servers.
     a. (Press CTRL+C to stop Ping and any other programs running in the current terminal)

Step 6: SSH to Raspberry Pi

Now you are fully setup with a working Raspberry Pi. You are ready to SSH into it and start the install.

1. Open Putty
2. Enter your PI's IP address
3. Login using Username: Pi Password: Raspberry
4. You have successfully logged into your headless Pi

Step 7: Install Java

Download Java to the Raspberry PI

    wget --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"

Then we need to make folder in wich should we put our files:

     sudo mkdir -p -v /opt/java

Then we unzip Java files using the following command:

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

Then we move Java files into /opt/java:

     sudo mv -v ~/jdk1.7.0_06 /opt/java

Then we need to tell that new JVM has been installed on Raspberry Pi:

     sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk1.7.0_06/bin/java" 1

     sudo update-alternatives --set java /opt/java/jdk1.7.0_06/bin/java

Then, this command should work and give this result:

     java -version

Step 8: Install the Minecraft Server

Make a Folder for the Server
    mkdir MCServer
Move into the folder
    cd MCServer
Download the Server
    wget https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar
Start it up!
    java -Xmx256M -Xms256M -jar minecraft_server.jar

Step 9: Finished

Congratulations you have just installed a fully functional Minecraft Server on to the Raspberry Pi! It is possible to log in and play with friends now. 

You have to Port Forward just as any other server but the hard part is over.

Comments

author
SamWoT. made it!(author)2016-07-12

On step 5: 'ifconfig' should be 'ipconfig', right?

author
snowdrop1101 made it!(author)2017-05-13

ifconfig is correct. Most Linux distros use this command unlike winblows *cough* which makes use of the ipconfig command.

author
luck+blockstntFUN made it!(author)2016-12-25

Nope ifconfig is right

author
FernandoMelo made it!(author)2016-07-15

I think its right. On linux, the command is ifconfig, not ipconfig like windows.

author
JacobC141 made it!(author)2017-02-03

What different steps, if any, should I take for the Raspberry Pi 3? Java? Wrong link it says.

author
Brent+the+Computer+Guy made it!(author)2016-12-17

Great Project, lots of fun!

author
KafmanV made it!(author)2016-08-03

where do i find the jave package name in step 7 ?

author
TurboProgramming made it!(author)2016-11-01

Hi KafmanV,

If you can't do the Java part and having issues with the name or something, you can just skip it because raspberry pi has it's own Java program.

author
papashok made it!(author)2016-07-25

Wonderful project

Any one need professional help in setting up and have it running on pi

contact

papashok64@gmail.com

Also support over Teamviewer

https://www.fiverr.com/papashok/help-you-with-rasp...

author
snoop911 made it!(author)2016-06-30

So the version of Minecraft that runs on the PC must be the same version that runs on the server?

How much data goes in and out of the Pi during a typical game? Are we talking small status like updates, or huge continous data streams that contain all the scene/environment graphic information?

Aside from a slow gameplay, is it possible to run a minecraft server on an arduino (with an ethernet shield) ?

author
CharlesP92 made it!(author)2016-07-12

@snoop911. The client and server must be the same version or you wont be able to connect.

as for data all online games that connect to a server have a constant back and forth flow of data. its not huge but it it continuous.

and as for question 3 a minecraft server can not be run on an arduino. an arduino is at its core just on and off switches that are programmable to function in a specific way. an ethernet shield only allows for trigger signals to be received over that medium and programed outputs can be replied.

tl;dr 1;yes. 2.alot. 3.no. never.

author
snoop911 made it!(author)2016-07-13

Thanks. Since posting my question, I found an example of minecraft running on an 8-bit avr!

https://www.youtube.com/watch?v=EZRLOanNQ_w

http://pastebin.com/f0HJG4c1

From the video, it looks like the outputs of the device can be controlled from the gameplay! Any thoughts on how this server works?

Does all the map/environment reside on the server? If so, I would imagine inputs to the device can also be represented in the game, maybe using a redstone lamp?

author
MatthewK115 made it!(author)2016-07-05

how do i stop it form running

author
Sean7805 made it!(author)2016-07-06

Press Control+C or type "stop"

author
MatthewK115 made it!(author)2016-07-05

how do i find the ip adress to connect to it

author
bruce_ made it!(author)2015-11-23

A few comments:

1. These basic
instructions work well with a Raspberry Pi 2 model B running raspbian
jessie. I suggest using the flags "-Xms256M" and "-Xmx 768M" or larger
on the java command to start the server.

2. These instructions DO
NOT WORK with Minecraft PE. To setup a Minecraft PE server on a
raspberry pi, you will need to install "pocketmine" which is not
affiliated with Mojang and is done at your own risk.

3. Minecraft
(especially Minecraft PE) servers are sensitive to which version of
Minecraft (PE) you are running on your computer/device. Be sure that
your device software version is compatible with the server software version you are
using.

author
Shackkeel. made it!(author)2015-12-25

My server says its version 1.5.2, how do I update this? Also what will the IP adress of my server be?

author
CTLBWU made it!(author)2016-04-19

I have the same problem anyone help?

author
StevenN41 made it!(author)2016-05-07

link for 1.9 https://s3.amazonaws.com/Minecraft.Download/versions/1.9.2/minecraft_server.1.9.2.jar

author
StevenN41 made it!(author)2016-05-07

link for 1.9 https://s3.amazonaws.com/Minecraft.Download/versions/1.9.2/minecraft_server.1.9.2.jar

author
GerardS10 made it!(author)2016-03-06

[INFO] Starting minecraft server version 1.5.2
[INFO] Loading properties
[WARNING] server.properties does not exist
[INFO] Generating new properties file
[INFO] Default game type: SURVIVAL
[INFO] Generating keypair
[INFO] Starting Minecraft server on *:25565
[SEVERE] Encountered an unexpected exception NoSuchMethodError
java.lang.NoSuchMethodError: method java.net.ServerSocket.setPerformancePreferences with signature (III)V was not found.
at if.<init>(SourceFile:36)
at ie.<init>(SourceFile:16)
at hz.c(SourceFile:132)
at net.minecraft.server.MinecraftServer.run(SourceFile:306)
at gp.run(SourceFile:573)
[SEVERE] This crash report has been saved to: /home/anthonux/MCServer/./crash-reports/crash-2016-03-06_14.55.51-server.txt

author
UnknownLuck15 made it!(author)2016-01-22

Is it possible to update Java 7 to Java 8? Not really for any reason but just to do it.

author
vincentthepurpleguy840 made it!(author)2015-11-08

lolz

author
yror10 made it!(author)2014-04-05

You can now just do

sudo apt-get install oracle-java7-jdk

author
AveryL2 made it!(author)2015-11-07

Thank you for this.

author
SamW29 made it!(author)2015-09-30

thank you saved me

author
GraydonT made it!(author)2015-08-25

i know for bukkit its port 95565 (or atleast it works for me) pe is differnt

author
AlexI7 made it!(author)2015-08-20

And that will suffice?

author
JesusG33k made it!(author)2015-11-05

I'm thinking of running this on a newer Pi, then I can dedicate my Gaming/Render tower to personal use only.

Thanks for sharing! - Sam

author
ChristoO1 made it!(author)2015-09-08

I'm getting this error while trying to install server.... can someone please help.

2015-05-06 23:52:15 [INFO] Preparing spawn area: 97%
2015-05-06 23:52:16 [INFO] Preparing spawn area: 98%
2015-05-06 23:52:17 [INFO] Preparing spawn area: 99%
2015-05-06 23:52:19 [INFO] Done (181.468s)! For help, type "help" or "?"
2015-05-06 23:52:23 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
2015-05-06 23:54:19 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
2015-05-06 23:54:21 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
2015-05-06 23:55:05 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
2015-09-08 12:53:26 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?

author
HarryF-18 made it!(author)2015-11-01

have you changed the setting and saved them (in server properties) while the launcher is open?

author
GalenN made it!(author)2015-09-25

It just means that the server is having a lot of lag. Its not detrimental in any way. If it happens too often its because too many chunks are loaded. You can try restarting the server. In severe cases you may have to disable the nether or the end.

author
SamW29 made it!(author)2015-10-13

it worked!!!!!!!!!!

author
SamW29 made it!(author)2015-09-30

is it minecraft 1.5.2

author
GalenN made it!(author)2015-09-25

Be sure to forward port 25565 on you router with both TCP and UDP. If for some reason you can't use port 25565 you can change the port the server binds to in the server.properties file.

author
Phillie8tor made it!(author)2015-08-06

I was just wondering..... does the pi have to be forever connected with an Ethernet cable? Or can we just keep it on with an adapter after step 5?

author
GraydonT made it!(author)2015-08-25

you can set up portforwarding on your router

author
AlexI7 made it!(author)2015-08-20

Ok, port forward what? Which port?......

author
dimt1 made it!(author)2015-08-07

how can i connect in a minecraft server from pi

author
Morgo297 made it!(author)2015-07-21

At step 7 how do you know the "Name of your Java package file"?

author
yaseenr made it!(author)2015-07-24

You can do this instead to get java, it's new and easier: https://www.raspberrypi.org/blog/oracle-java-on-raspberry-pi/

author
dudelkingL made it!(author)2015-02-05

No way. This the vanilla will hardly run on any RPi

Spigot will outperform any other server here (search for spigotMC)

author
BillylegotaI made it!(author)2015-03-11

I tested it on my B+ and it works fine. Just don't try it on an A/A+. (remember to change the heap to 496M to maximize ram usage)

author
rumo333 made it!(author)2015-07-14

I have also rpi b+ but when i run server it say :

[WARNING] Can't keep up! Did the system time change, or is the server overloaded?


and i cant conect in from minecraf? can you help me

Zaslonska slika 2015-07-14 19:55:53.png
author
ZoeC3 made it!(author)2015-06-23

author
ZoeC3 made it!(author)2015-06-23

^ It's blank??????

Anyway, how do I run this thing on LAN?

author
est+raspi made it!(author)2015-06-20

whether there can only play premium user?

author
gliuzzo made it!(author)2015-06-19

Is rasp b+ strong enough for 3 players server?

author
djchewmacca made it!(author)2015-05-03

I recently made a 10 player server with 30 plugins on my Raspberry Pi 2.

The only thing I notice is that it lags a little if you switch between worlds but apart from that it works pretty well.

Please check it out if you got the time:

81.99.59.115:25566

Don't forget to add the port number otherwise you will be redirected to my other server.

Berryhollow Logo.jpg
author
guillaumechx made it!(author)2015-05-07

Hi djchewmacca,
Yesterday I tried to play on your server, it work fine !
I've got a raspberry 2 and I dont have the same result :( (very laggy when 2 players connected).
Can you details me the steps, servers you use (pm if you want)
Thanks a lot
G.