Walkthrough Raspberry Pi Minecraft server, advanced setup


May 13, 2021
Tom's hardware wrote a fairly good guide on setting up a Raspberry Pi Minecraft server, while the guide covers all the essential information I feel like there's some information and/or steps that are missing. Here's some other steps that I think could use a bit of improvement on, and you should read this post in conjunction with their article.

Improvements to the original article
Before you do anything, I highly recommend you changing the download mirrors, as the default Debian mirrors are extremely slow and most likely overused. The official list of mirrors is found at https://www.raspbian.org/RaspbianMirrors and I suggest you to change the mirror location to somewhere close to you.

In step 4 of the Tom's Hardware's guide, they mentioned you need the Default JDK. However, this only installs Java 11, which is sufficient for 1.16 and prior servers. For any newer servers (like 1.17 and 1.19), you need Java 17. Simply run sudo apt install openjdk-17-jdk openjdk-17-jre to grab the package.

While launching the server, I also recommend allocating more RAM to it. You need all the performance you can get, and since RPi OS is very light, you can get away with allocating all except 1-2GB to the OS, so around 2-3GB for the server on a 4GB Pi. Just change the server launch command to java -Xmx2G -Xms2G -jar server.jar

Server Setup and Installing Mods
The default server configuration looks very similar to a regular Minecraft installation, so you should be fairly familiar to it.

When you first fire up the server with the command above, you'll find a folder called "world". This is the world save for your Minecraft server, which is in the same format as a singleplayer world. You can even bring your singleplayer world save to the RPi server. There's also a very important server.config text file in the server folder, and this controls the gamemode of the world, seed(which only works for a new world), and which saved world to load. Do note all config is cAse SeNSitivE and s p a c e s e n s i t i v e.

With the server online and the GUI is up, you can simply treat the input line on the bottom right as the cheat console. Commands like /weather clear and [/SIZE]/kick would work just like in a single player world. This is going to be your admin console until you set up permissions for your own account.

Once players start joining, you're probably going to feel lag and want to optimize your server. I'm going to use Fabric and Lithium as an example here, which I also strongly recommend you to install.

  1. Download the Universal/.Jar option from Fabric's download page, as we don't need the dedicated server installation.
  2. Type cd /home/USERNAME/Downloads/ and then java -jar fabric-installer-0.11.1.jar to launch the installer.
  3. You'll see two tabs, switch to the Server tab and choose the install location as the location of your Minecraft server (which in the case of Tom's Hardware's guide, is in /home/USERNAME/mcserver/)
  4. Launch your server again, but this time with the command java -Xms2G -Xmx2G -jar fabric-server-launch.jar to launch Fabric's server. It'll create all the Fabric specific files when you start it, including the important mods folder.
That's it, you have Fabric installed. Let's just install one server optimization mod to make the Pi's life a bit easier.

  1. Grab Lithium.
  2. Simply move the downloaded .jar file to the aforementioned modsfolder.
The same instruction applies to Fabric API and any other Fabric mods, which is very straightforward to say the least.

This is it for my own guide, which included some information the Tom's Hardware article didn't include. Do let me know in the comments how you think and ask any questions.
Last edited: