Raspberry Pi: Minecraft Server

711,391

1,225

147

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

Share

    Recommendations

    • Electronics Tips & Tricks Challenge

      Electronics Tips & Tricks Challenge
    • Plastics Contest

      Plastics Contest
    • Audio Contest 2018

      Audio Contest 2018

    147 Discussions

    0
    None
    KafmanV

    2 years ago

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

    2 replies
    0
    None
    hbomb9000KafmanV

    Reply 1 year ago

    https://www.raspberrypi.org/forums/viewtopic.php?t=101543

    0
    None
    TurboProgrammingKafmanV

    Reply 1 year ago

    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.

    0
    None
    JacobC141

    1 year ago

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

    1 reply
    0
    None
    hbomb9000JacobC141

    Reply 1 year ago

    https://www.raspberrypi.org/forums/viewtopic.php?t=101543

    0
    None
    SamWoT.

    2 years ago

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

    3 replies
    0
    None
    DarzenSamWoT.

    Reply 1 year ago

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

    0
    None
    FernandoMeloSamWoT.

    Reply 2 years ago

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

    0
    None
    snoop911

    2 years ago

    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) ?

    2 replies
    0
    None
    CharlesP92snoop911

    Reply 2 years ago

    @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.

    0
    None
    snoop911CharlesP92

    Reply 2 years ago

    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?

    0
    None
    MatthewK115

    2 years ago

    how do i find the ip adress to connect to it

    0
    None
    bruce_

    2 years ago

    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.

    2 replies
    0
    None
    Shackkeel.bruce_

    Reply 2 years ago

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

    0
    None
    CTLBWUShackkeel.

    Reply 2 years ago

    I have the same problem anyone help?