Raspberry Pi OS is the latest Raspberry Pi operating system. However, I recommend installing Raspbian Stretch for this project. I tested this release with Buster and ran into a few Java issues. By switching to Stretch, everything went buttery smooth.
Visit our guide on how to install Raspbian Stretch if you need it. When Stretch is installed, follow the setup wizard. Connect to the internet using either an ethernet cable or WiFi. Be sure not to update Stretch to Buster.
Once the OS has been installed, you should prepare your Raspberry Pi with a few settings in the raspi-config menu. If you don't have a screen to connect to the Pi, visit our guide on how to enable SSH without a monitor.
- Open a Terminal on the Raspberry Pi.
- Enable SSH under Interfacing Options > SSH.
- Open Advanced Options and go to Memory Split. Set this to 16MB to free memory resources for our Minecraft server.
- Under Boot Options look for Desktop/CLI and set it to Console.
- Go to Advanced and choose Expand Filesystem.
- Select Finish.
Install Java on the Raspberry Pi by running the following command.
sudo apt install oracle-java8-jdk
Create a folder just for Nukkit using the following command.
Go into the Nukkit folder.
Install Nukkit using the following command.
wget -O nukkit.jar https://ci.nukkitx.com/job/NukkitX/job/Nukkit/job/master/lastSuccessfulBuild/artifact/target/nukkit-1.0-SNAPSHOT.jar
When Nukkit is installed, run it with this command.
You will be prompted to choose a language. Go ahead and set the language for your server.
sudo java -jar nukkit.jar
Once the server is installed and running, you can apply custom settings. Managing your Minecraft server is as easy as editing a file. Make sure you're in the Nukkit folder and run the following.
Edit this file to adjust things like player count, difficulty, game mode, white lists, and more. Save your changes with ctrl + x and close out of the file.
sudo nano server.properties
Restart the Raspberry Pi and run your server with the following command.
This server runs version 1.14. Connect to the server with a client that's running the same version of Minecraft. Nukkit should work with PC, console, and tablet users (but not Minecraft Pi Edition).
sudo java -jar nukkit.jar
Note: The Java version of Minecraft on PC will not connect to the Nukkit server. You must use the Windows version. The screenshot on this step was taken using the Windows edition.
The server IP address and port number will be visible in the Nukkit terminal window. The server IP will be the same as the Raspberry Pi by default.
Congratulations! You should have a private Minecraft server running on the Raspberry Pi.
Not only can you play Minecraft on the Raspberry Pi, but you can also do it for free using Minecraft Pi Edition!