Raspberry Pi Minecraft Server



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.



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



From my experience, anything over five people and the server will start to get a bit wonky. I found that two to three people is the ideal number, but you can increase this by tweaking your server.



We will also be using spigot Minecraft because the default install didnt work for me. It crashes a lot, is very slow, and is very unstable. The official Java version may improve in the future.



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



If you have a Raspberry Pi 2, 3, 4, or 4, we will make some changes to optimize it. We will also set it all up so that you can access it online and reboot it if it goes offline.



Equipment



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



Recommended



Raspberry Pi MicroSD Card Ethernet Cable or WiFi (I recommend using an Ethernet for the best network performance).


Power Supply


Optional



USB Keyboard


USB Mouse


HDMI Cable


Raspberry Pi Case


Video Tutorial



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 enjoyed the video, please subscribe or follow us socially to keep up with what's happening.



Setting up the Raspberry Pi Minecraft Server



First, we'll need to install Raspbian into the Raspberry Pi. If you haven't already done this, then check out my awesome guide on installing NOOBs Raspberry Pi. It will walk through all the steps required.



Important: Raspbian Buster will require you to have the most recent version installed. 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 recommend that you update to Jessie or Stretch, or Buster.



This tutorial will be performed entirely in the terminal. It is probably best to just boot into the terminal and not load the GUI.



1. Let's first bring Raspbian up-to-date by entering the following.



2. We'll need to make a few changes in the configuration tool. Let's bring up the tool by entering these lines.



For more information about raspi-config, please see our guide.



3. First, go to Advanced Options->Memory Split. Update this to 16. This will give you more memory for your server.



4. Also, you dont want to boot into Raspbian desktop. So make sure that the boot option is set instead to the CLI (Command Line Interface). This change will help give the server as much processing power as possible.



5. If possible, switch to High overclocking



6. Finally, if you don't already have SSH enabled, enable it to remotely access the Pi.



7. Now go to the finish and reboot.



8. Now we need the IP address of our Pi to connect to our server. Enter the hostname command to get the Raspberry Pi's IP address.



You might set up a static IP address to ensure that your IP address doesn't change.



8.Another day another cube Next, we need Java and Git installed. We won't be able launch or build the server if we don't.



Enter the following command in order to install the default JDK packages for Raspbian and the Git software.



9. Now we need the Minecraft server files. This will be done using the Spigot builder tool.



10. We will now need to run build tools. It creates Spigot server. It will take approximately 15-30 minutes to complete.



To get the latest version, add --rev1.14.4 to the end. Change 1.14.4 in your command to the most recent version number.



Important: If your Raspberry Pi B+, or B version is before the Raspberry Pi 2, the build tools will likely fail. You will need to instead generate the spigot.jar on a more powerful computer.



11. To check if the Spigot server has been successfully downloaded, use ls.



As we want all server files to be created here, make sure you are still in the folder /home/pi/minecraft. If you start the server under a different folder, it will create all the files there.



12. We are now ready to launch the server. To do this, enter the following command. (Depending on which version you're using, you might need to change the version number. spigot-1.14.4.jar)



Raspberry Pi 1



Raspberry Pi 2, 3, 4,



You can increase the Xmx value with the Raspberry Pi 4's 2GB and 4GB versions.



The server will be stopped immediately as we have to agree to the Eula. This can be done by typing the following command in the Eula.



13. Change false to TRUE in this section. Save and exit by pressing CTRL+X, then Y.



14. Relaunch the server. The server will take a few minutes to create a new map. Give it three to five hours. If the map is already created, it will only take 30 seconds to load the server if you restart.



15. The server should now be available on the local network and running.



16. You may want to modify your username now so you can access all the server commands whenever you log in. Accessing the server backend will be slightly more difficult if it is set to auto-boot at startup.



You can modify your user by running the following command after the server has launched: (Replace username with your username)



17. The Raspberry Pi's Minecraft Server will now be operational. You may need to optimize it to make it run better.



Connecting to the Minecraft Server



If you're connected to a local network it should be very easy to connect with the Minecraft server running on your Raspberry Pi. To test it out, do the following steps.



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



You might see your server in the local listing if you go multiplayer. If it doesnt, you can go to direct connection and enter the IP address we have previously obtained on the Pi by using the command hostname --I.



Port forwarding is necessary if you wish to allow access to Minecraft servers via the internet.



Assuming you want to learn how to do this, then head over to my guide on setting up Raspberry Pi port forwarding. Unless you change it in your server properties, port forwarding port number 25565 will be required to the IP address of your Pi.



Here are some tips and tricks to help you configure your server and get it running.



Optimizing the Minecraft Server



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



Let's first install NoSpawnChunks, which will help to stop the Minecraft server from eating up too much RAM.



There are many plugins that can increase performance and extend the server functionality. You can use the command wget to download them to Pi like we did.



Editing the Minecraft Properties



You probably want to learn how to modify the server properties. This ability to edit is essential for optimizing the server and customizing the server to your needs.



Here are more details about each of the server settings.



Enter the following line to access the server properties.



Here are some settings that can be changed to improve the performance of the server.



These and other settings can be modified however you'd like. However, the Pi cannot process too much.



Startup Bootcamp



To have the server start on boot, we will need to do a few extra steps.



1. We will need the service file to be created for Minecraft server. Enter the command below to get started.



2. This file will contain the following text.



This file defines the service, so the service manager knows how and what to run. Make sure to update the version number of your spigot whenever you upgrade.



Once you're done, save the file using CTRL + X followed by Y and ENTER.



3. Now, we need to enable it. Run the below command to enable the service.



4. The following command should allow you to start the Minecraft server.



5. You can check the status by using a similar command. Checking the status is great for debugging.



5. The following command will stop the server.



Now, your server should boot. You can test it by restarting the Raspberry Pi. It will take a while to start.



To gain access to the server via the command line, you will need to shut down the server and then load it using the normal command.



I hope you found this tutorial helpful in setting up a stable Raspberry Pi Minecraft server. If you liked this tutorial, please check out our other Raspberry Pi Projects.


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