A Raspberry Pi Minecraft server is a cost-effective way to have your very own private server with your friends or just for stuffing around on.

Raspberry Pi Minecraft

I have had mine running for quite some time now and haven’t come across too many problems. It is very important to know that this server will not be able to hold many people.

From my experience, anything over five people and the server will start to get a bit wonky. I found the optimal amount of people is only two to three, but this can be improved upon by tweaking the server.

We are also going to be using the spigot version of Minecraft as the default install didn’t work for me. I found that it will crash a lot, be laggy, and is very unstable. The official Java version may improve over time.

In this project, we will utilize Java that should already be installed on the Raspberry Pi (If you’re using the full version of Raspbian).

We will make a few changes to optimize the server for the Raspberry Pi 2 or 3 if you have one.  We will also set it up so you can access it on the web and reboot if the Pi goes offline for any reason.


Please find the equipment that I used for making this Raspberry Pi Minecraft server below.


Raspberry Pi

SD Card or Micro SD Card if you’re using a Raspberry Pi 2, 3 or B+

Ethernet Cord or WiFi dongle (I recommend using an Ethernet cord for the best network performance)

Power Supply


USB Keyboard

USB Mouse

HDMI Cable

Raspberry Pi Case


If you want to see how to setup the server, then check out my video below. Otherwise, I have a detailed text explanation immediately below the video.

If you like the video, please make sure you subscribe or follow us on social, so you’re kept up to date.

Setting up the Raspberry Pi Minecraft Server

Firstly, we will need to install Raspbian onto the Raspberry Pi. If you haven’t already done this, then check out my awesome guide on installing NOOBs Raspberry Pi. It will take you through all the steps that you will need to do.

Important: You will need to be on the latest versions of Raspbian Buster. If not, then you will find that Java is not installed, this will need to be done if you wish to get this server working. I highly recommend updating to Jessie, Stretch, or Buster.

In this tutorial, we will work entirely in the terminal. It is probably best we boot straight into the terminal so we can save on memory by not loading the GUI.

1. First, let’s bring Raspbian up to the latest version by entering the following.

sudo apt-get update
sudo apt-get upgrade

2. Now we will need to make a couple of changes in the config tool. Let’s bring the tool up by entering the following line.

sudo raspi-config

(If you need more information regarding the raspi-config tool check out my guide)

3. First, let’s go to Advanced Options->Memory Split, update this to 16. (This will allow for more memory to be free for the server)

4. Also, you don’t want to boot into the Raspbian desktop so ensure boot options is set to the CLI (Command Line Interface) instead. This change will help give the server as much processing power as possible.

5. If possible, change overclocking to High.

6. Finally, also enable SSH so we can access the Pi remotely if required (Unless you already have it enabled).

7. Now go to finish and reboot.

8. We will now want the IP address of our Pi for when we try to connect to our server. To get the Raspberry Pi IP address enter the following command.

sudo hostname -I

8. Next, we need to make sure that Java is installed. Otherwise, we will not be able to build or launch the server.

Enter the following command to install the default JDK package for Raspbian.

sudo apt install default-jdk

9. Now we will need the Minecraft server file, and we’re going to use a builder tool that is supplied by spigot, to get this enter the following commands.

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

10. Now we will want to run the build tools file, so it creates our Spigot server. It will take about 15-30 minutes to finish.

Add --rev 1.9 to the end of the command to get the latest version. Don’t forget to change 1.9 in the command to the latest version number.

sudo java -jar BuildTools.jar

Important: If you have a Raspberry Pi B+, B or any variation before the Raspberry Pi 2, then the build tools will likely fail.

You can instead download the spigot.jar directly from our file mirror by using the following command. Please leave us a comment if this version is out of date.

sudo wget https://files.pimylifeup.com/minecraft/spigot-1.14.4.jar

11. To make sure the Spigot server successfully downloaded and saved simply type ls and should see spigot-1.14.4.jar.


Make sure you remain in the /home/minecraft folder as we want all the server files to be created in here. If you start the server in a different folder, it will create the files in there.

12. Now we’re ready to launch the server, to do this enter the following command. (You may need to change the version number depending on what version you’re using e.g. spigot-1.9.jar)

Raspberry Pi

sudo java -Xms256M -Xmx496M -jar /home/minecraft/spigot-1.14.4.jar nogui

Raspberry Pi 2, 3, or 4

sudo java -Xms512M -Xmx1008M -jar /home/minecraft/spigot-1.14.4.jar nogui

With the 2GB and 4GB variants of the Raspberry Pi 4, you can increase the Xmx value even higher.

The server will stop straight away as we will need to agree to the Eula. You can do this by opening the Eula by typing the following command.

sudo nano eula.txt

13. In here, change false to TRUE, once done save and exit by pressing ctrl+x then y.

14. Now relaunch the server, it will take a while to create a map so give it about three to five minutes. If you ever reboot again, it will only take thirty seconds to load if the map has already been created.

15. The server should now be running and accessible over the local network.

16. You might want to mod your user now so that you can use all the server commands when you log in if we have it auto-boot on startup accessing the server is slightly more difficult.

To mod your user, simply run the following command when the server has launched (Replacing username with your username).

op username

17. The Minecraft server on the Raspberry Pi will now be up and running fine, but you may want to do some optimizations to the server to make it run even better.

Raspberry Pi Minecraft Server

Connecting to the Minecraft Server on the Raspberry Pi

If you’re on a local network, then it should be pretty easy to connect to the Raspberry Pi Minecraft server. To test it out, do the following steps.

Load up the Minecraft Java client on a PC within the same local network as the Pi.

Go to multiplayer and then your server might pop up in the local list. If it doesn’t simply go to direct connect and enter the IP we got earlier on the Pi using the command hostname -I.

If you want to allow access to the Minecraft server via the internet, then you will need to setup port forwarding.

If you want to learn how to do this, then head over to my guide on setting up Raspberry Pi port forwarding. You will need to port forward the port 25565 (unless you change it in the server properties) to the IP of your Pi.

Configuring the Server

Here are a few tips for configuring the server and getting it up and running.

Optimizing the Raspberry Pi Minecraft Server

Now to get the most out of our Raspberry Pi Minecraft server, we will want to install a plugin to help optimize the performance.

Firstly let’s install the NoSpawnChunks plugin, this will help prevent the Minecraft server from chewing up too much RAM.

cd /home/minecraft/plugins
sudo wget -O NoSpawnChunks.jar https://files.pimylifeup.com/minecraft/NoSpawnChunks.jar

There are other plugins out there that can help with performance, just simply use the wget command to download them to the Pi as we did above.

Editing the Minecraft properties

Now you probably want to know how to edit the server properties. This ability to edit is very important for optimizing the server and customizing it to how you want the server to be.

If you want more information for each of the server settings you can find a good page on all the server properties here.

To enter the server properties, enter the following line.

sudo nano /home/minecraft/server.properties

Now in here, we will want to change a few settings to help optimize the performance of the server.

You change these and other settings to whatever you like however you want but keep in mind the Pi can’t handle too much processing.


Boot on Startup

Let’s first start by making a simple startup script. To do this let’s first create the file by entering the line below.

sudo nano /home/minecraft-start.sh

In here simply add the following lines so that the Raspberry Pi Minecraft server will start up correctly. (Make sure the spigot version is correct)

cd /home/minecraft
sudo java -Xms512M -Xmx1008M -jar /home/minecraft/spigot-1.13.2.jar nogui &

If you want the server to startup automatically on reboot, then we need to add it to the rc.local file. To do this enter the following line.

sudo nano /etc/rc.local

In here, add the following line right before the exit line.

bash /home/minecraft-start.sh

Once done, exit and save.

Now the server should start on reboot automatically. If you want to test this simply enter the following command.

sudo reboot

To check if the script is running either try to load the server in Minecraft or the terminal of your Pi enter the line below.

ps aux | grep "minecraft-start.sh"

This command will return two results you only need to pay attention to the first.

If you need to kill the process get the process id from the above command, it is the first number after the username (In this case it should be root).

To kill the process, simply enter the following command. Replace {pid} with process id.

sudo kill {pid}

If you want to get access to the server on the command line then you will need to shutdown the server and load it back it back using the normal command (not the autostart file).

I hope this tutorial has helped you in setting up a stable version of a Raspberry Pi Minecraft server. If you like this tutorial, then be sure to check out our many other Raspberry Pi Projects.

Also feel free to drop us a comment below if you have better optimization settings, plugins or ideas. Also if you’re having trouble let us know below.

Get projects delivered to your inbox weekly.