Want to play Minecraft on your own terms? Set up your own server, create your own worlds, perhaps build in them with friends and family?
It's remarkable, but true: you can do all of this on a Raspberry Pi.
My son is a big fan of Minecraft and is always asking me to play alongside him. It's not easy to do while he's playing on his tablet. As he's only young, allowing him online seems inappropriate.
The solution is simple. Here's how to setup a Minecraft server on Raspberry Pi.
What You Will Need for a Raspberry Pi Minecraft Server
To install a Minecraft server on your Raspberry Pi, you will need:
- A Raspberry Pi 3 or Raspberry Pi 4 and power cable.
- Ethernet cable.
- 16GB or larger microSD card.
Although earlier Pi models can be used for this, the results aren't as good. Note that an Ethernet cable is recommended because it is faster than Wi-Fi. You can use wireless networking, but a faster connection means superior server provision and better in-game performance.
These instructions for the Raspberry Pi 3 and 4 will give you the best Minecraft server possible.
All the above, when used with a remote SSH connection, will let you set up a Minecraft server on your Raspberry Pi. If SSH isn't an option, you will also need:
- USB keyboard
- USB mouse (or a combination of both)
- 1 x HDMI cable
- A monitor or other compatible display
Connect these peripherals before powering on your Raspberry Pi.
You will also, of course, need a copy of Minecraft on your computer. Note that the system spec of the Raspberry Pi means that you won't be able to host too many people. For the Pi 3, certainly don't attempt to host more than 10. If you plan to install Minecraft server on Raspberry Pi 4, you can host more players depending on the choice of RAM.
Read More: What's the Difference Between Raspberry Pi 4 and Other Models?
What Sort of Minecrafter Is This For?
Several versions of Minecraft are available.
Learning how to create a Minecraft server on Raspberry Pi will give you a world that you can access from any device running Minecraft, except, curiously, MinecraftPi. So, versions of Minecraft on a Windows PC, game console, Android, iOS, and Amazon Fire tablets and TV devices will work with this server.
As such, if you have several devices on your local network, these could all access the Minecraft server.
In short, you'll need the main Minecraft open world game from Mojang.
Step 1: Install Raspberry Pi OS and Configure Your Pi
Start off with a fresh copy of Raspberry Pi OS. You'll find the latest version at www.raspberrypi.org/software/operating-systems. For speed you can use the Raspberry Pi Imager tool to write the Raspberry Pi OS image to your microSD card.
Related: How to Install an Operating System on Raspberry Pi
Next, configure the Raspberry Pi OS environment for running the Minecraft server. Did you set it up with a monitor and keyboard? If so, simply open the Raspberry Pi Configuration tool in the Preferences menu on the desktop.
If you're accessing via SSH, use sudo raspi-config to open the text-based configuration tool.
Here, make the following changes:
- Go to Advanced Options > Memory Split and change the setting to 16MB. This will free more memory resources for the server.
- Next, go to Boot Options > Desktop/CLI and select Console. (No need to do this on Raspberry Pi OS Lite.)
- If you're trying this with a Raspberry Pi 1 or 2, find Overclock on the main menu and set this to High. (Raspberry Pi 3 and 4 users can skip this step.)
- Enable SSH in Advanced Options > SSH.
- Finally, go to Advanced > Expand Filesystem.
With these changes made, go to Finish and reboot Raspberry Pi OS at the prompt. Once done, login again, and find the IP address of the device with:
sudo hostname -I
Or:
ifconfig
Make a note of the IP address before continuing.
Step 2: Install the Minecraft Server on Raspberry Pi
Installing Minecraft on the Raspberry Pi relies on the Nukkit server software from Cloudburst. Developed specifically for Minecraft: Pocket Edition, Nukkit can be easily installed on the Pi via the command line.
Start by installing Java. This is required for Nukkit to run:
sudo apt install oracle-java8-jdk
Next create a new directory (labelled "nukkit") then open it:
mkdir nukkit
cd nukkit
With that done, download the Nukkit server software. Be sure to enter this accurately---it's easier to copy and paste into an SSH session.
wget -O nukkit.jar https://ci.opencollab.dev/job/NukkitX/job/Nukkit/job/master/lastSuccessfulBuild/artifact/target/nukkit-1.0-SNAPSHOT.jar
(You can find the most up-to-date builds at the project page.)
Once downloaded, run Nukkit:
sudo java -jar nukkit.jar
This prompts Nukkit to set up the server. When prompted, choose your language (we used eng) then watch as the Minecraft server is generated.
Step 3: Configure Your Minecraft Raspberry Pi Server
Once you know the Minecraft server is setup correctly it's time to configure it. Two configuration files are included with Nukkit: nukkit.yml and server.properties.
To edit these, simply open them in your preferred text editor. On Raspberry Pi OS, nano is preinstalled, so use
sudo nano nukkit.yml
or
sudo nano server.properties
Various changes are recommended. Whatever you change here, keep in mind that even the Raspberry Pi 4 is a modest device that cannot handle too much processing.
A list of server properties can be found in the Minecraft wiki, but several should be edited right away. Start off with:
max-players=10
Older Raspberry Pi models will struggle with more than 10. You might be okay with 5-6 players. Several other options are available to configure that you might be interested in, such as:
pvp=on
This is for player vs. player action. There's also a difficulty setting:
difficulty=1
Here, the easiest setting is 0.
When you're done, press Ctrl + X to save and exit, then run:
sudo java -jar nukkit.jar
This will restart your Minecraft server, but not the Raspberry Pi.
Step 4: Connect to the Raspberry Pi Minecraft Server
Your Minecraft server should now be online on your local network. Check this using a ping command from another device, using the IP address you noted down earlier. If the ping returns a response from your Raspberry Pi, then you're fine to continue.
All you need to do is launch Minecraft on your computer or tablet, then:
- Click Play > Servers
- Here, select Add Server
- Input new server details (name, IP address)
- Ensure the port number matches the one listed in the server properties
If your Raspberry Pi Minecraft server is running and online, it should be listed as an option to connect to. Simply select the server to start playing.
Step 5: Extend Your Minecraft Server Functions With Nukkit Plugins
The default configurations for the Nukkit server might not be wholly to your liking. Tweaking nukkit.yml and server.properties is one option, but will only get you so far.
Plugins have been developed for Nukkit that allow you to enhance the basic gameplay. This adds features to the online session that have been omitted, such as the inclusion of animals.
Suggested Nukkit plugins include:
- MobPlugin: adds mobs and animals to the Minecraft environment
- WorldEssentials: enables different game modes
- EssentialsNK: includes additional game modes, multiplayer management tools, and more
These plugins are compatible with a Minecraft server on Raspberry Pi 3 and 4 and can be installed simply by downloading to your Pi and copying the file to the plugins directory.
For example, the MobPlugin can be moved with:
sudo mv MobPlugin-1.9.0.1.jar plugins
Head to the Cloudburst website and click Resources to choose from over 250 plugins for your Raspberry Pi Minecraft server.
Now You Know How to Make a Raspberry Pi Minecraft Server
By now you should have Minecraft server running on your Raspberry Pi.
That's all there is to it. If you leave it up and running, you'll have an always-on Minecraft world that you can connect to and use. A great solution for Minecraft-loving children, self-hosting the server on your local network keeps their online activity safe---at least as far as playing their favorite game goes.
You have created your very own Minecraft game server running on the Raspberry Pi. For more fun with the game, check out the best Minecraft seeds for cool worlds and how to use Minecraft command blocks.