Running a Minecraft Server on a Kubernetes cluster at home.
I use Podman to build images, setup instructions are here.
There are multiple image build files
- Dockerfile: Build image to run a Vanilla Minecraft Server
- Dockerfile-neoforge: If you want to use a mod - use the Neoforge server setup and copy it into the image
- Dockerfile-RL-Craft: If you want to run the RL-Craft mod - use Curseforge with the Neoforge server package
podman build -t my-registry.azurecr.io/minecraft-server:1.21.1 -f .\Dockerfile .
Ok, lets install Java 21 and Neoforge first. Java verion requirements are here. After that - check the required Minecraft version for you Mods on Neoforge, in my case it`s 1.21.1. Download the neoforge server installer version you need from https://maven.neoforged.net/releases/net/neoforged/neoforge/ in my case it's
wget https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.1/neoforge-21.1.1-installer.jar -OutFile neoforge-21.1.1-installer.jar
Run the installer, select install server and give it a target directory. This is the source directy in the Dockerfile server/ Now, select the Mods you want to have in Neoforge and install them. Copy the mods from your Minecraft client installation in /mods to the server/mods directory. You`re ready to build your custom Minecraft image.
podman build -t my-registry.azurecr.io/minecraft-server-neoforge:1.21.1 -f .\Dockerfile-neoforge .
- Install the Cursforge client, search for the RL Craft mod and install it. Open the profile and click
Download Server Pack
-
RL Craft uses Minecraft 1.12.2 which is based on Java 8, lets install it to unpack the server binariesJava 8
-
In my case modloader Forge in version 14.23.5.2860 is used.
- Run the server install und unpack it to folder
minecraft
-
Unpack the sever pack into folder
minecraft -
Read the
FOR SERVERS ONLY - SET THESE IN SERVER.PROPERTIES.txtand copy the server config server.properties file into the minecraft folder. In my case it's using gamemode creative.
Build the image with
podman build -t my-registry.azurecr.io/minecraft-server-rl-craft:1.12.2 -f .\Dockerfile-rl-craft .
podman run --rm -p 25565:25565 my-registry.azurecr.io/minecraft-server:1.21.1
I'm using a Azure Container Registry here. Login with:
az login
az acr login --name my-registry --expose-token --query accessToken -o tsv | podman login my-registry.azurecr.io --username 00000000-0000-0000-0000-000000000000 --password-stdin
push the image
podman image push my-registry.azurecr.io/minecraft-server-neo-jei-world-10-23:1.21.1


