Minecraft server CLI for Agones GameServers
Explore the docs »
View Example
·
Report Bug
·
Request Feature
This application was built to run as a sidecar container alongside Minecraft server in an Agones GameServer Pod to integrate it with the Agones SDK and assist with lifecycle management, health checking, world loading and backup, and configuration editing.
-
Kubernetes
- Set up a Kubernetes cluster using local or cloud solutions
- https://agones.dev/site/docs/installation/creating-cluster/
-
Agones
- Set up Agones in your cluster
- https://agones.dev/site/docs/installation/install-agones/
-
Minecraft Server
- Compatible with Java and Bedrock editions
- You'll need a container to run the Minecraft server. Highly recommend using itzg/docker-minecraft-server or itzg/minecraft-bedrock-server
kubectl create -f example/mc-server.ymlFull GameServer specification example
A Minecraft server container will serve as the GameServer container. Every GameServer Pod also contains the an sdkServer that will report lifecycle changes to the Agones controller. To signal Minecraft server lifecycle updates, a seperate application integrated with the Agones SDK will ping the Minecraft server and report lifecycle updates to the sdkServer.
template:
spec:
containers:
- name: mc-server
image: itzg/minecraft-server # Minecraft server image
imagePullPolicy: Always
env: # Full list of ENV variables at https://github.com/itzg/docker-minecraft-server
- name: EULA
value: 'TRUE'
- name: mc-monitor
image: saulmaldonado/agones-mc
args:
- monitor
imagePullPolicy: AlwaysFull Java GameServer specification example
Full Bedrock GameServer specification example
Run an example Minecraft GameServer Pod locally with docker-compose
docker-compose -f monitor.docker-compose.yml up
# or
make docker-compose.monitorUsage:
agones-mc monitor [flags]
Flags:
--attempts uint Ping attempt limit. Process will end after failing the last attempt (default 5)
--edition string Minecraft server edition. java or bedrock (default "java")
-h, --help help for monitor
--host string Minecraft server host (default "localhost")
--initial-delay duration Initial startup delay before first ping (default 1m0s)
--interval duration Server ping interval (default 10s)
--port uint Minecraft server port (default 25565)
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Clone the Project
- Create your Feature or Fix Branch (
git checkout -b (feat|fix)/AmazingFeatureOrFix) - Commit your Changes (
git commit -m 'Add some AmazingFeatureOrFix') - Push to the Branch (
git push origin (feat|fix)/AmazingFeatureOrFix) - Open a Pull Request
-
Clone the repo
git clone https://github.com/saulmaldonado/agones-mc.git
-
Build
make build # or CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/agones-mc .
-
Clone the repo
git clone https://github.com/saulmaldonado/agones-mc.git
-
Build
docker build -t <hub-user>/agones-mc:latest .
-
Push to Docker repo
docker push <hub-user>/agones-mc:latest
Distributed under the MIT License. See LICENSE for more information.
- Raqbit/mc-pinger
- ZeroErrors/go-bedrockping
- itzg/docker-minecraft-server
- itzg/minecraft-bedrock-server
- 🐱 Github: @saulmaldonado
- 🤝 LinkedIn: @saulmaldonado4
- 🐦 Twitter: @saul_mal
- 💻 Website: saulmaldonado.com
Give a ⭐️ if this project helped you!