Skip to content

running a Minecraft Server on a Kubernetes cluster at home

License

Notifications You must be signed in to change notification settings

Elektronenvolt/minecraft

Repository files navigation

minecraft

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

1a Build an Vanilla image

 podman build -t my-registry.azurecr.io/minecraft-server:1.21.1 -f .\Dockerfile .

1b Build a NeoForge image

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 .

1c Build a RL Craft image

  • 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.

Lets get the server binaries [here:](https://files.minecraftforge.net/net/minecraftforge/forge/index_1.12.2.html)
  • 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.txt and 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 .

2 Run local

podman run --rm -p 25565:25565 my-registry.azurecr.io/minecraft-server:1.21.1

3 push image to a container registry

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

About

running a Minecraft Server on a Kubernetes cluster at home

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published