Introduction: Minecraft Server on Raspberry Pi 1.8.9

Minecraft 1.8 Server on Raspberry Pi!

Here are the things you are going to need to download before we begin-

Win32DiskImager and Putty

In this tutorial I will explain how to create and run a full 1.8 Minecraft server on the Raspberry Pi, completely headless! I will be using the Raspberry Pi B+ model for this project,(This should work with newer versions as well) and a 16gb microsd card. However, 4gb is plenty for the server. This will be a very in-depth guide, as I hope to make this possible for the people who are not as familiar with the Raspberry Pi. Enjoy!

Step 1: Installing Raspbian

You can download Rasbian Jessie here. Create a new folder on your desktop (or wherever), and once Rasbian is done downloading, extract the .zip file into the folder.

Then, insert your MicroSD card and open Win32Disk Imager.

Click on the blue folder and navigate to the file you put the Raspian image in. Click on the Image.

On the device tab, make sure you have the correct card selected, the click write.

Now, insert your car into the slot on the Raspberry Pi, then connect Ethernet and power.

Step 2: Finding the Pi's IP, Headless

Once your Pi is powered up and connected to the internet, get back on your computer and open cmd.

Do this by going to Start - type "cmd" -Enter

Now in command prompt, type: ipconfig

Write down or copy your default gateway, then put it in your browsers URL box.

This should take you to your router, every service provider is different, but there should be a section for devices.

Find the device named raspberrypi and the Pi's IP should be right there.

Step 3: Using Putty SSH

In order to access your Pi' headless, you need to use Putty.

Open Putty

Under host name, add the Pi's IP you found earlier. Make sure SSH is selected and the port is 22.

Click open

And you're in! It may give you a warning, this is normal, just click Ok.

The username is pi and the password is raspberry

Step 4: Updates, Java, and Settings

Before you can begin with the server setup, there is a few things you need to do.

First check for updates:

sudo apt-get update

Then, install the updates:

sudo apt-get upgrade

This may take a while.

Java: The most recent version of Raspbian comes with Java pre-installed, so just check the version to make sure we have the correct version of Java:

java -version

Settings: We are going to need to re-size the SD card in order to make sure we have enough room to install the .jar file to run the server:

sudo raspi-config

This will open up the config menu. Find Expand Filesystem. Hit enter. Finish. Then reboot.

Step 5: Server Setup

Now we can move on the setup. First you need to create a file to house the server:

sudo mkdir Server

Now you can move to it using:

cd Server

Now that you are in the file you need to download the .jar file for the server:

sudo wget https://s3.amazonaws.com/Minecraft.Download/versio...

Now run it using:

sudo java -jar minecraft_server.1.8.9.jar

Let it run for a while. Once it's done running. You should get and error that says eula.txt is set to false. To fix this:

sudo pico eula.txt

Change the setting from false to true.

Now, once all of this is completed go to the config panel and set overclock to high. (This is to prevent lag, and I highly recommend getting a case with a fan for your Pi, such as this.) Finish and reboot.

Step 6: Start Up the Server an Connect!

For the final step, lets actually run the server! First navigate to the server file again-

cd Server

Now you can run it!

sudo java -Xms32M -Xmx512M -jar minecraft_server.1.8.9.jar

(NOTE: -Xms and -Xmx may be different depending on your Pi. Ex) B+ Model has 512mb of RAM but the Pi 2 has 1gb)

Now you can connect on your local network using your Pi's IP address, but anyone outside your network must use this.

You are done! I hope this tutorial was helpful!

Comments

author
electric guy made it! (author)2017-03-14

is this for mcpe?

author
bwente made it! (author)2016-12-28

Thanks for the instructable! I finally got around to doing it. But the lag is so bad it is unplayable. During the holiday break I tired it again but with different server software. It works great now! I used spigot, which is made for performance.

author
ZombieSheepman made it! (author)2016-11-27

My RPi 3 is saying it can't be overclocked. Is that a new problem or just my Pi?

author
Oggar2 made it! (author)2016-10-21

Is there any way to install plugins (just a few) on this server?

author
PowerPierce made it! (author)2016-05-19

Hey there, great guide! The only problem I have is when it happens to be running, I am getting errors saying that it can't keep up, and then saying it is skipping ticks. Is the only way to fix this by overclocking it to high? I currently have it overclocked to medium, because I don't have an easy way of keeping the RPi cool.

author
Oggar2 made it! (author)Oggar22016-10-21

I'm having the same problem with mine overclocked to high. It helped when i turned down the render distance but I still get that message.

author
Oggar2 made it! (author)2016-04-18

I am not sure what you mean with

"Now you can connect on your local network using your Pi's IP address, but anyone outside your network must use this."

Do I use ipchicken on my pi or on any computer in my network?

author
MattSea made it! (author)MattSea2016-04-25

Anyone on the same network as the server uses the pi's ip. Anyone outside the network uses the ip in ipchicken(You must port forward first). Hope this clears it up.

author
nasario made it! (author)2016-01-31

Hi I don't get which value we have to use on the last command ... SInce I have a Pi 2 what should I type for the Xms and Xmx value ?

author
Oggar2 made it! (author)Oggar22016-04-18

sudo java -Xms32M -Xmx1008M -jar minecraft_server.1.8.9.jar (or 1.9.jar, I have that)

author
Karsaell made it! (author)Karsaell2016-02-03

I am not defibitely sure, but I think Xms is the self-allocated memory, some space that is garanteed for this process [minecraft] that other programs cannot access. It's value isn't that essential, since the os [raspbian] will almost always allocate more memory to demanding processes, like minecraft here.

Xmx is the maximum memory accessible for the program : here, since minecraft should be the only process running on the pi (no gui, no other simultaneous uses like torrent), you can set it to the total memory of your raspberry (ie. 1024MB for a pi2), thus ensuring maximal capacity for your server.

author
MattM14 made it! (author)MattM142016-02-04

You don't want to allocate all of your memory to the server, although it's the only thing you'll be running the raspberry pi also needs to run system things. In practice I've found that 75% to 80% of maximum memory tends to prevent issues.

author
Big EZ made it! (author)2016-01-23

Hi there,

I was wondering if there are any limits to the number of mod packs or to mod packs in general?

For example crazy craft, FTB or crundeecraft, etc...

Cheers

EZ

author
MattSea made it! (author)MattSea2016-01-24

Hey, mod packs tend to take more processing power than a traditional server. The Pi would probavly not be able to run them, and even if it does, it would almost be unplayable because of lag. Hope this helps!

author
Big EZ made it! (author)Big EZ2016-01-25

Thank you for getting back to me.

would that be the same for running one or two mods?

Cheers
EZ

author
AlternateLives made it! (author)AlternateLives2016-03-25

based on my experiences running mod packs on my older computer, a few mods shouldn't cause too much trouble. I wouldn't run more than 10-15 max, especially with large tech mods (such as IC2) or biome generation mods (such as Twilight Forest), but it shouldn't bring the machine to a crawl.

author
percsy made it! (author)2016-01-20

Hey great tutorial ! I wonder why you use "sudo" to run the jar file. Is it really necessary ?

author
MattSea made it! (author)MattSea2016-01-20

Thanks! I tried, but if you do not run it as root, it will give you a string of permission errors. Running as root fixes this.

author
percsy made it! (author)percsy2016-01-21

I just added a "chmod +x " on the jar file before the first launch and it works fine without any sudo.

author
bsykes3487 made it! (author)2016-01-19

Cool! I so will do this on my pi! I already have raspbian Jessie too! Thanks!

author
ljlind made it! (author)2016-01-18

Awesome! Is there a way to make a player admin, and run the whitelist through putty?

author
MattSea made it! (author)MattSea2016-01-18

Thanks for the feedback! Yes, once the server is running, to make a player admin just do: op nameofplayer

For the whitelist, first before you start the server-

cd Server (Takes you to the file)

sudo pico server.properties

And here you need to sent whitelist to true. Start the server. To add someone to the list just do-

whitelist add nameofplayer

Hope this helps!

author
ljlind made it! (author)ljlind2016-01-18

I'll try this after I mess with Pi Radio! Thanks!

About This Instructable

13,412views

222favorites

License:

More by MattSea:Minecraft Server on Raspberry Pi 1.8.9
Add instructable to: