How to Make a Raspberry Pi Minecraft Server

With a little effort, you can play this popular title with friends at home

Raspberry Pi case in front of a Minecraft screen on a MacBook Pro

It’s not super tricky to create a Minecraft server on a Raspberry Pi, though it does take some careful entry of text-based commands. While it won’t have the power of a larger home server or a Minecraft Realm, your Raspberry Pi Minecraft server will let several people connect and play the popular game from their own devices. Multiplayer Minecraft is a fun way to spend time with family and friends, whether you’re a kid or just a kid at heart.

First, though, let’s look at what hardware you’ll need to run your own Minecraft server on a Raspberry Pi.

This will set up a server for the Java version of Minecraft. If you want to set one up for the mobile version of the game, check out this tutorial.

Needed Raspberry Pi Hardware

We’re assuming, for the purposes of this guide, that you have a Raspberry Pi kit of some sort that includes the tiny motherboard, a case, a keyboard and mouse, and that you have an HDMI-enabled monitor to connect it to. The cost for these varies (you can use pretty much any wired mouse or keyboard you might already have, which will save you some cash), but we tested on a Raspberry Pi 4 starter kit from CanaKit

The option with the mouse and keyboard was only $99, and included 4GB of RAM. You can get an earlier version (Raspberry Pi 2 or 3) for less money, too, though if you have less experience with the Pi system and computers in general, you might want to opt for a kit with all the parts you need. 

Minecraft Server Software Essentials

Once you get your Pi, you’ll need to make sure it has an operating system on the Micro SDHC card. The CanaKit Pi came with the NOOBS OS (a newbie-friendly version of Raspbian, the Debian Linux-based operating system that powers the Pi) already installed. If that’s not the case for you, you can follow the instructions that come with your kit (or that live here on the Raspberry Pi website) to download it from the internet

If you want to access your Minecraft server, you’ll also need a paid copy of Minecraft for your Mac or PC, along with a user name and login for the game. The server provides the world you’ll play in, but you’ll need a “client” on your computer to actually play the game.

You can do all of the installation below via an SSH connection to your Pi, but we found it easier to use the Graphical User Interface (GUI) version of Raspberry Pi’s OS, NOOBS, to perform the following steps. It’s just one less layer of tech to have to troubleshoot, and makes things a bit easier on beginners.

Set up Your Raspberry Pi

First, you'll need to enter some commands to get your Pi ready to go.

  1. First up, make sure your Pi is connected to your home internet with Wi-Fi or Ethernet.

  2. Open a Terminal window and type the following commands (with a Return after each one) to make sure all your software is up to date. 

    sudo apt-get update
    sudo apt-get upgrade
    Pi Terminal app with

    Depending on your installation, the second command may take a few minutes. Just wait until the lines stop scrolling and you see the Rasbian prompt again.

  3. Next, type the following to get into the Raspberry Pi configuration settings: 

    sudo raspi-config
  4. Choose Advanced Options, then Memory Split.

    Memory Split option in Raspberry Pi configuration tool
  5. Leave as is, unless it’s less than 16. If so, change it to 16 and then save your changes. This installation had 64 by default.

    Memory Split options set to 64
  6. Next, use the following command to find out your local IP address: 

    sudo hostname -I

    Keep track of that number, as it will allow your users to connect to the Raspberry Pi Minecraft server after you’ve installed and configured it. 

    Terminal with
  7. Next up, you’ll need to install Java. This command should make that happen for you. If you run into any errors, simply Google the exact wording of your error and you’ll likely find a solution. 

sudo apt install default-jdk

Installing Minecraft Server

Now it's time to download and install the actual Minecraft server software.

  1. Type the following commands into your Terminal, with a return after each line. If you like, copy and paste them exactly from below. Commands like this are very specific; if you miss a single bit of punctuation or spelling, it will not work. 

    sudo mkdir /home/minecraft
    Terminal with
    cd /home/minecraft
    Terminal with
    sudo wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
    BuildTools.jar download command in Terminal
  2. Type the following to make sure you see a file that looks like "BuildTools.jar."

    ls
    ls command showing BuildTools.jar
  3. Now you'll want to run the app we just downloaded (BuildTools.jar). Type the following into Terminal on the Raspberry Pi. This will create a Minecraft server on your Raspberry Pi. 

    sudo java -jar BuildTools.jar
  4. When it finishes installing, you'll see a message that the compilation is done. Hooray!

How to Launch Your Minecraft Server

Now you're just about ready to launch and run your Minecraft server.

Type the following command into Terminal (making sure you’re still in the /home/minecraft/ directory:

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

If you have a Pi 4 with 4M of RAM, you can increase the second term to give your server more “room” to run in. If you want to try, use -Xmx2016 as your maximum memory term. 

Tthe Minecraft server will try to launch, then fail, because it checks the End User License Agreement (EULA) it just created to see if you’ve agreed. Since you haven’t, things stop. Weirdly, you’ll need to open the text document and change the wording. 

  1. To open the EULA document, type or paste the following command into your Terminal.

    sudo nano eula.txt
  2. Change the word ‘false’ in the text file to ‘true’ and Write Out (control-O) to the same file name. Then press control-X to exit. 

  3. Now run the launch command again, and your Minecraft server should launch successfully. Depending on how much RAM you have on your Pi, it will take from a few minutes to many minutes to complete. The second time you launch your server, it will go much faster, as it’s already done much of the work needed the first time.

  4. To stop your Minecraft server, simply type ‘stop’ at the cursor while the server is running.

Connecting to Your Raspberry Pi Minecraft Server

Now that your server is up and running, all you need to do is connect to it.

  1. Launch Minecraft on your Mac or PC and login with your Minecraft credentials.

  2. Press Play and let Minecraft launch on your computer.

  3. Choose the Multiplayer button.

  4. If you want to enter the server details each time you connect, click Direct Connect. If you want to save the details, click Add Server.

  5. Give your Pi server a name, then type in the IP you found in the Hostname step above. Click Done.

  6. Select the server you just created, then click Join Server

  7. And now you have it, your very own Minecraft server running on a Raspberry Pi. Give your friends and family the IP address (as long as they're in your network), and they can hop on and play with you, as well.