Pinterest Stumbleupon Whatsapp
Advertisement

Want to play Minecraft on your own terms? Set up your own server, create your own worlds Are These The 5 Greatest Minecraft Worlds Ever Built? Are These The 5 Greatest Minecraft Worlds Ever Built? We're almost five years past its first public release and Minecraft is still one of the most played games in the world. Despite the primitive graphics, these worlds are so grand and so lively that... Read More , perhaps build in them with friends and family?

It’s remarkable, but true: you can do all of this on a Raspberry Pi.

My son is a big fan of Minecraft, and is always wanting me to play along with him. It’s not easy to do while he’s playing on his computer — he’s six, so allowing him online seems a bit inappropriate.

The solution was simple: set up a Minecraft server on the little man’s own Raspberry Pi (with him helping out). Within the hour, we were playing Minecraft together on our dedicated, Raspberry Pi powered server!

Forget spending money on a dedicated PC, it can be done with a compact, credit card-sized Linux computer. The Pi is the perfect solution, and the setup is easy to work through.

What You Will Need

To build a Minecraft server on your Raspberry Pi, you will need:

  • A Raspberry Pi 2 (or later) and power cable. We’re assuming your Pi is in a case.
  • Ethernet cable (preferable to wireless networking).
  • 8GB or larger microSD card.

Although earlier Pi models can be used for this, the results aren’t as good. We’re expecting you want the best Minecraft server experience available. As such, these instructions are for the Raspberry Pi 2 and 3.

Raspberry PI 3 Model B 1.2GHz 64-bit quad-core ARMv8 CPU, 1GB RAM Raspberry PI 3 Model B 1.2GHz 64-bit quad-core ARMv8 CPU, 1GB RAM 1.2GHz 64-bit quad-core ARMv8 CPU, 1 GB RAM Buy Now At Amazon $34.00

All of the above, when used with a remote SSH connection Setting Up Your Raspberry Pi For Headless Use With SSH Setting Up Your Raspberry Pi For Headless Use With SSH The Raspberry Pi can accept SSH commands when connected to a local network (either by Ethernet or Wi-Fi), enabling you to easily set it up. The benefits of SSH go beyond upsetting the daily screening... Read More will let you set up your Pi as a Minecraft server. If SSH isn’t an option, you will also need:

  • USB keyboard
  • USB mouse (or a combination of both)
  • 1 x HDMI cable
  • A monitor or other compatible display

Connect these peripherals before powering on your Raspberry Pi.

You will also, of course, need a copy of Minecraft on your computer.

What Sort of Minecrafter Is This For?

Several versions of Minecraft are available. Not all of them are suitable for use with any type of user-managed Minecraft server.

Creating this server will give you a world that you can access from your Windows PC, or game console version of Minecraft. The low spec of the Raspberry Pi means that you won’t be able to host too many people (certainly no more than 10), for example. So if you have several computers within your local network, these could all be used to access the Minecraft environment running on the Raspberry Pi.

For Minecraft users with mobile devices, you’re probably using the Minecraft Pocket Edition (PE). Unfortunately, this version of Minecraft cannot access the Minecraft server you’re about to create on your Raspberry Pi. The same applies to other Raspberry Pis. Mincraft Pi Edition is based on Minecraft PE, so there is pretty much zero wiggle room there.

In short, you’ll need the main Minecraft open world game from Mojang.

1. Install Raspbian and Configure Your Pi

The fastest way to get started is to install a fresh copy of Raspbian on your Pi How To Install An Operating System To Your Raspberry Pi How To Install An Operating System To Your Raspberry Pi Here's how to get a new OS installed and running on your Pi – and how to clone your perfect setup for quick disaster recovery. Read More . This is done by downloading the latest image of the Debian-based operating system, and writing to the microSD card 5 Mistakes to Avoid When Buying Your Next MicroSD Card 5 Mistakes to Avoid When Buying Your Next MicroSD Card MicroSD cards seem simple, but there are a few critical mistakes that you must avoid when shopping for one. If you ignore these, you may regret your purchase. Read More .

If using a Flash media writer is a bit too complicated for you, try the NOOBS installer How NOOBS For Raspberry Pi Can Help First Time Users How NOOBS For Raspberry Pi Can Help First Time Users There is something about the Raspberry Pi that might just put people off: until now, setting it up has not been particularly user friendly. NOOBS aims to change that! Read More .

Prefer to stick with your existing copy of Raspbian? Well, if you’re worried about losing work, you could backup the microSD card Easily Clone Your SD Card For Trouble-free Raspberry Pi Computing Easily Clone Your SD Card For Trouble-free Raspberry Pi Computing Whether you have one SD card or several, one thing that you will need is the ability to back up your cards to avoid the problems that occur when your Raspberry Pi fails to boot. Read More , otherwise, simply upgrade to the latest version and update your packages:

sudo apt update
sudo apt upgrade

Once you’ve done this, it’s time to configure the Raspbian environment for running the Minecraft server. Did you set it up with a monitor and keyboard? If so, simply open the Raspberry Pi Configuration tool in the Preferences menu on the desktop.

If you’re accessing via SSH, use sudo raspi-config to open the text-based configuration tool.

Here, make the following changes:

minecraft server raspberry pi

Go to Advanced Options > Memory Split and change the setting to 16MB. This will free more memory resources for the server. Next, find Overclock on the main menu and set this to High. (Raspberry Pi 3 users can skip this step.) Finally, go to Advanced > Expand Filesystem.

With these changes made, go to Finish and reboot Raspbian at the prompt. Once done, login again, and find the IP address of the device with:

sudo hostname -I

Or:

ifconfig

Make a note of the IP address before continuing.

2. Install the Minecraft Server

The next stage is to install the server into a dedicated directory. Make a directory called “minecraft” and use the change directory command to open it:

sudo mkdir /home/minecraft
cd /home/minecraft

You’re now ready to download the builder tool from spigotmc.org.

minecraft server raspberry pi

sudo wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar

As you may have guessed from the filename, the Spigot server is written in Java. The latest versions of Raspbian (Jessie and later) have Java built-in. The following command will take around 20 minutes to complete:

sudo java -jar BuildTools.jar

Go fix yourself a drink while this stage completes.

3. Build the Minecraft Server

By the time you’ve made a drink and finished it, the Minecraft server should have been built. It’s time to launch the server. First, use the ls command to find the correct name of the latest spigot.jar file.

ls

This should display a filename similar to spigot-[version].jar. At the time of writing, this was spigot-1.12.2.jar. Launch the server with the following command, making sure you enter the correct version number.

minecraft server raspberry pi

sudo java -Xms512M -Xmx1008M -jar /home/minecraft/spigot-[version].jar nogui

Wait for the server to stop (don’t worry) then open the EULA:

sudo nano eula.txt

Confirm you accept the EULA by changing False to True, then press Ctrl > X to exit and save. Next, relaunch the server:

sudo java -Xms512M -Xmx1008M -jar /home/minecraft/spigot-[version].jar nogui

This time, things will take a bit longer as the map is built. We’re talking 3-5 minutes or so, but this is a one-time only delay. Once the map is created, subsequent restarts will only take half a minute or so.

4. Connect to the Raspberry Pi Minecraft Server

Your Minecraft server should now be online on your local network. Check this using a ping command Networking 101: Ethernet, LANs, and How They Work Networking 101: Ethernet, LANs, and How They Work Even for modern users, the language surrounding home networking can be a little confusing. What's a LAN? Why do I need an Ethernet cable? Isn't it all the same? Read More from another device. If the ping returns results from your Raspberry Pi (you already made a note of the server IP) then you’re fine to continue.

All you need to do is launch Minecraft on your computer, then click Play > Servers. Here, Add Server, inputting the new server details, giving it a name, and adding the IP address. The port number should match the one listed in the server properties (see below). If not, change it!

Your server should then be listed as an option to connect to. Simply select the server to start playing.

5. Configure Your Minecraft Server

Once you know the server is setup correctly and on your network, it’s time to configure it. Begin by editing the server properties. This is a text file that can be accessed with the nano text editor:

sudo nano /home/minecraft/server.properties

Various changes are recommended. Whatever you change here, keep in mind that the Pi is a modest device that cannot handle too much processing.

minecraft server raspberry pi

A list of server properties can be found in the Minecraft wiki, but those you should edit straight away are:

view-distance=5
max-players=4

You might be okay with 5-6 players. Several other options are available to configure that you might be interested in, such as:

pvp = true

This is for player vs. player action. There’s also a difficulty setting:

difficulty = [integer 0-3]

Here, the easiest setting is 0.

Finally, you should install the NoSpawnChunks plugin, which is designed to prevent too much RAM being eaten up by the Minecraft server. First, open the /plugins subdirectory:

cd /home/minecraft/plugins

Next, download the NoSpawnChunks.jar Java object.

sudo wget -O NoSpawnChunks.jar http://ci.dmulloy2.net/job/NoSpawnChunks/

This will keep RAM use low, thereby ensuring the server doesn’t run slow.

6. Make Minecraft Server Launch at Boot

If you’re using the Pi as a dedicated Minecraft server, it’s probably a good idea to have the server running at all times. While there’s bound to be some minor downtime, a startup script will ensure the server can start itself automatically.

Start by creating a startup script:

sudo nano /home/startminecraft.sh

You can call it whatever you like — choose something meaningful though.

Copy the following into your startminecraft.sh file:

#!/bin/bash
cd /home/minecraft
sudo java -Xms512M -Xmx1008M -jar /home/minecraft/spigot-[version].jar nogui &

minecraft server raspberry pi

You could stop here and just use the startminecraft.sh file to launch the software, after giving it executable permissions:

sudo chmod +x startminecraft.sh

Then, run it with:

./startminecraft.sh

However, if you prefer to have the script run at boot, find the rc.local file, and edit it:

sudo nano /etc/rc.local

At the end, before the exit 0 line, add:

bash /home/minecraft-start.sh

Again, use Ctrl > X to exit and save the file.

Minecraft Server Running on Your Raspberry Pi!

That’s all there is to it. Your very own Minecraft game server running on the Raspberry Pi. If you leave it up and running, you’ll have an always-on Minecraft world that you can connect to and use. A great solution for Minecraft-loving children, self-hosting the server on your local network keeps their online activity safe — at least as far as playing their favorite game goes.

If your Minecraft constructions are constantly being raided by children or other family members, then take a look at these Minecraft home security tips Minecraft Home Security Tips – Build A Perimeter That No One Could Break Through Minecraft Home Security Tips – Build A Perimeter That No One Could Break Through The world of Minecraft can be harsh. One moment you’re happily cooking a few pieces of bacon in your oven, then next; BAM! Where’d that creep come from? Now you’re back at the respawn point... Read More , which will surely help you to level the playing field!

Have you built a Minecraft server on your Raspberry Pi? How did it go? Tell us about it in the comments below.

Leave a Reply

Your email address will not be published. Required fields are marked *