This series of tutorials are going to show you how to build a low cost (~100USD ) Minecraft server on Raspberry pi 4 with web-based management tool and auto backup.
Before we get started, we have to prepare some hardwares:
|Raspberry Pi 4B
||8GB version (minecraft server is a memory cumsuming application)
|Micro SD card
||SanDisk Extreme Pro MicroSD 64GB
Install Ubuntu for Raspberry Pi 4B
Download Ubuntu for Raspberry 4
Download and install Etcher
Flash Ubuntu image to your micro SD card by Etcher
Insert the micro SD card to your Pi, then connect your lan cable and power supply to it
Connect to your Raspberry Pi
Find IP address of your Raspberry Pi
Method 1: Goto your router dashboard and find the device with name “ubuntu”
Method 2: Run nmap command to scan your network
You may need to download nmap first
The ip range depends on your subnet setting for your router
e.g. If your router dashboard IP address is 192.168.0.1, you may need to change the IP scanning range to 192.168.0.0-255
Find the circled host and that is the IP address for your Raspberry Pi
Connect to your Raspberry Pi via ssh(Mac/Linux), Putty(Windows)
|IP address / Hostname
||From previous step
|User name (Default)
For Windows users:
You can download Putty below:
For Mac and Linux users:
Open terminal and run the following command:
You will be asked to change your password, just change and remember your new password.
After you changed your password, you need to logon with your new password.
Install Docker, Minecraft Server and Portainer
Your Raspberry is ready to use and we are going to install
- Minecraft Server
Add the docker repository for ARM64 + Ubuntu Linux.
Update the repository again.
Set higher priority for docker official repository, instead of using default Ubuntu Repository
Add current user to docker group
Now we have installed docker, then we can install Minecraft Server with single command now.
You can change the parameters to fit your actual requirement, here are some common parameters you may want to change:
||port assigned to minecraft, 25565 is default port for minecraft server
||“always” means the container will restart automatically when the mincraft server is down
||Volume name (for storing data), suggest you to follow this, so that you can setup auto backup easier in part 2
||Just name the container
||Accept minecraft server end-user license agreement (EULA), you cannot use the software if you don’t accept it
||Minecraft server version, you can change it to “LATEST” to get the latest version
||Memory assigned to minecraft server, for 8GB Raspberry Pi, I would recommend you to assign 7GB for minecraft server
||Timezone for minecraft server, just change it to your timezone
||Use PaperMC server, it claim that it is high performance minecraft server
||User ARM64 architecture build docker image, you cannot change this
After installed Minecraft server, we will install Portainer for managing the Minecraft server container with web-based UI.
Create volume for Portainer
Create Portainer container
You can access Portainer by entering the following URL to your broswer:
Choose Docker and connect to it
Congrat! You can manage your Raspberry Pi Minecraft server by Portainer now. By using Portainer, you can:
- Start/Stop the Minecraft server
- View the Minecraft server log
- Manage your dockers in web-based UI
Congrat! You can connect to your Minecraft server now.
I hope this tutorial can help you to setup your own Minecraft server on Raspberry Pi.
Part 2 “Auto backup your Minecraft Server” here.