Set Up A Minecraft Server On Your Raspberry Pi

From Pediascape
Revision as of 07:57, 14 August 2022 by Sistersecond77 (talk | contribs)
Jump to: navigation, search

Minecraft is a very popular game. People are becoming more and more addicted to this 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 best choice if you want to play it over a small LAN network with family and friends. 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. However, Raspberry Pi is not powerful enough to handle high complex automated farms and more than 5 players but still is it one the best low cost option to play this interesting game on network.



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



1. Games Raspbian installed in Raspberry pi 2 and above



2. LAN cable



3. Power adaptor



This tutorial uses External Monitor with HDMI cable to connect to Raspberry Pi. You can also use SSH client (Putty), VNC server, or a monitor to connect to Raspberry pi via your laptop or computer. If you find any difficulty then follow our Getting stared 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 the complete process to setup minecraft on Rasbperry pi is explained in the below steps:



1. Update the Raspberry Pi



This command will first update and upgrade your raspberry Pi system.



2. Setup your Environment



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



Your version can be different. 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. These are the steps to follow:



Step 1: Create a Minecraft folder



Step 2: Download buildtools



Step 3 - Use the following command to create the server packages you have downloaded.



It takes time to build the files. It can take anywhere from one hour to two hours, depending on the speed of your internet. So, this would be a good time to get yourself a drink or snacks.



Be patient and come back after an hours. If everything goes well, you will find a file called spigot-12.2.jar in your Minecraft folder (or whatever the current version).



4. Launching the Minecraft Server



It's time to launch the server. Use ls command to find the spigot.jar file and it's version.



There is should be file with a filename similar to spigot-[version].jar. At the time of writing, this was spigot-1.12.2.jar.



Step1 - Launch the server by entering the following command.



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



Step2:- Open an end-user license agreement (EULA) and file it using this command.



Accept the EULA and change False to True. Then press Ctrl >X to exit.



Step3:- Next, launch the server again using the same command:



As the map is being built, it will take some time. It will take approximately half an hour, so please be patient



5. Connect to the Raspberry Pi Minecraft Server



Now, your Minecraft server is online on your local network. Start Minecraft on your computer. Click Play > Servers->Add server to fill in the details. Give it a name and add the IP address.



You can find the IP address of your server by typing following commands in the terminal:



Select the server you wish to play on.



You can also play on another Raspberry Pi. Raspberry Pi comes with a Minecraft game. So, you can connect this local minecraft with our newly created Minecraft server:



1. Open the Minecraft pi in Game.



2. Start the game on the server Raspberry Pi.



3. Click on Join game with another raspberry pi. Your server IP will then be displayed. Click on it. Now, you can enjoy your game on your own terms.



For a complete demonstration, see the Video at the End.



6. Configure Your Minecraft Server



After you have tested the server, and it works on your Rasbperry pi computer correctly, it's now time to set it up. Edit the server properties. Use the below command to set the properties, it is a text file.



You can change anything here, but remember that Raspberry pi does not have a high speed processor. So, choose the properties that require less processing. Let's talk about games The Minecraft Wiki has a list of server property.



After all the configuration and setup, you can optionally install a plugin that will prevent Raspberry pi from using too much RAM by Minecraft game. You have to install the NoSpawnChunks plugin to prevent high RAM usage by the Minecraft server.



First, use this command to open the plugins directory.



Download the NoSpawnChunks.jar.



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