Set Up A Minecraft Server On Your Raspberry Pi

From World History
Jump to: navigation, search

Minecraft is one of the most popular game in the world and people are getting additive for this interesting game. You can setup your own Minecraft server and can create your own worlds in the game. For this, you don't need to spend money on a dedicated PC, it can be easily done with a small, credit card-sized Linux computer Raspberry Pi. Raspberry is the right choice if your goal is to play it with friends and family over a small LAN. Although the graphics are not great, it is still fascinating to play this game over a network with others.



Within an hour, you can start playing Minecraft on your dedicated Raspberry Pi powered Minecraft server. While Raspberry Pi isn’t powerful enough for complex automated farms and more players, it is still an affordable way to play this fun game on the network.



So, in this tutorial we will learn about managing Minecraft servers using Raspberry Pi.



1. Raspbian installed in Raspberry Pi 2 or Above



2. LAN cable



3. Power adaptor



In this tutorial I am using External Monitor using HDMI cable to connect with Raspberry Pi. If you don't have monitor, you can use SSH client (Putty) or VNC server to connect to Raspberry pi using Laptop or computer. If you need help, then please see our Getting Started with Raspberry Pi Guide.



To connect with this Minecraft server you need another Raspberry Pi to join the game. The video is available at the end. Here are the steps to set up minecraft for Rasbperry pi.



1. Update the Raspberry Pi



This command will update your raspberry pi system and make it more secure.



2. Set up your environment



Minecraft works only on Java. You can check if Java is installed on your Raspberry Pi with the following commands.



You can have a different version. You can have different versions.



3. Install Minecraft



We are going to install Spigot Minecraft Server, It is a most optimize plugin for small Minecraft servers. Here are the steps:



Step 1: Create the Minecraft folder



Step 2: Download buildtools



Step 3: Use the below command to build the server package you downloaded.



The process of building the files takes time. It will take about one hour to two hours depending on your internet speed. It's a good idea to grab a drink and snacks during this time.



Have patience and come back after an hour. If all things go well you will have a file in your Minecraft folder called spigot-1.12.2.jar (or whatever the latest version is at the time).



4. Launching the Minecraft Server



It's time to launch the server. Use the ls command for the spigot.jar and its version.



There is should be file with a filename similar to spigot-[version].jar. This was spigot-1.2.2.jar at the time of writing.



Step1 - Launch the server by entering the following command.



After launching, server will stop automatically (first-time only) to confirm license agreement.



Step 2:- Open the EULA (end-user license agreement) and file it using the following command:



Accept the EULA by changing False from True, then press Ctrl> X to exit and to save.



Step3:- Next launch the server again with the same command.



It will take some time as the map is still being constructed. It will take about half an hour, so be patient



5. Connect to the Raspberry Pi Minecraft Server



Now, your Minecraft server is online on your local network. Just launch Minecraft from your computer. Then click Play >Servers -> Add Server to fill out the details. Give the server a name. Finally, add the IP Address.



The following commands can be used to find the IP address for your server:



Select the server that you want to start playing.



You can play in your other Raspberry Pis as well. Raspberry Pi includes a Minecraft game. So, you can connect this local minecraft with our newly created Minecraft server:



1. Open the Minecraft pi under the Game option.



2. Start the game using the Raspberry Pi server.



3. Click on Join a game in another raspberry Pi. Next, your server IP display will be displayed. Click it. You can now enjoy your game on the terms you prefer.



Check the Video at the end for full demonstration.



6. Configure Your Minecraft Server



Once you have successfully tested the server on your Rasbperry pi, it is time to configure it. You have to edit server properties. To set the properties, use the following command. It is a text file.



Be aware that Raspberry pi is not a fast processor. EDITUM Set the properties that require less processing. This link Minecraft Wiki outlines the server properties.



Finally after all the setup and configuration, you can optionally install a plugin to prevent using too much RAM of Raspberry pi by Minecraft game. You have to install the NoSpawnChunks plugin to prevent high RAM usage by the Minecraft server. EDITUM



First, open the plugins subdirectory by using this command:



Download the NoSpawnChunks.jar archive:



Now you have your own Minecraft server which you can customize according to you. Now, you can enjoy the game with friends and family.