minectl ๐บ
minectl๏ธ?๏ธ? is a cli for creating Minecraft (java or bedrock) server on different cloud provider.
It is a private side project of me, to learn more about Go, CLI and multi cloud.
TL;DR ๐
Install via homebrew:
brew tap dirien/homebrew-dirien
brew install minectlLinux or Windows user, can directly download (or use curl/wget) the binary via
the release page.
Usage โ
Access Token
minectl is completely build on zero-trust. It does not save any API Tokens, instead it looks them up in the ENV
variables.
Civo
export CIVO_TOKEN=xx
Digital Ocean
export DIGITALOCEAN_TOKEN=xxx
Scaleway
export ACCESS_KEY=xxx
export SECRET_KEY=yyy
export ORGANISATION_ID=zzz
Server Config ๐
You need a MinecraftServer manifest file, to define some informations regarding the VM and the Minecraft Server:
apiVersion: ediri.io/minectl/v1alpha1
kind: MinecraftServer
metadata:
name: minecraft-server
spec:
server:
cloud: "provider: civo|scaleway|do"
region: "region see cloud provider for details eg. fra1"
size: "see cloud provider docs for details eg. g3.large"
volumeSize: 100
ssh: "<path to>/ssh.pub"
minecraft:
java:
xmx: 2G
xms: 2G
rcon:
password: test
port: 25575
enabled: true
broadcast: true
edition: "java|bedrock"
properties: |
level-seed=stackitminecraftrocks
broadcast-rcon-to-ops=true
...I created some example configs in the config folder for currently supported cloud provider and Minecraft editions.
Create Minecraft Server ๐?
minectl create -h
Create an Minecraft Server.
Usage:
minectl create [flags]
Examples:
mincetl create \
--filename server-do.yaml
Flags:
-f, --filename string Contains the configuration for minectl
-h, --help help for createDelete Minecraft Server ๐
minectl delete -h
Delete an Minecraft Server.
Usage:
minectl delete [flags]
Examples:
mincetl delete \
--filename server-do.yaml
--id xxx-xxx-xxx-xxx
Flags:
-f, --filename string that contains the configuration for minectl
-h, --help help for delete
--id string contains the server idMonitoring ๐
Every instance of minectl
- Prometheus (https://github.com/prometheus/prometheus)
- Node exporter (https://github.com/prometheus/node_exporter)
The edition:java has on top following exporter included:
- Minecraft exporter (https://github.com/dirien/minecraft-prometheus-exporter)
You can acces the prometheus via
http://<ip>:9090/graphGetting Started
- Civo Java Edition
- Civo Bedrock Edition
- Scaleway Java Edition
- How to monitor your multi-cloud minectl
๐บ server?
Supported cloud provider โ?
- Civo (https://www.civo.com/)
- Scaleway (https://www.scaleway.com)
- DigitalOcean (https://www.digitalocean.com/)
Known Limitation ๐ต
minectl is still under development and supports only creation and deletion of server. There is no mod or plugin
functionality for the Minecraft servers.
Contributing ๐ค?
Contributing via GitHub
Feel free to join.
License
Apache License, Version 2.0
Roadmap ๐ฃ๏ธ?
- Support Bedrock edition #10
- Add monitoring capabilities to minectl server #21
- List Minecraft Server
- Update Minecraft Server
- Support Mods and Plugins
- Add additional cloud provider
- ...
Libraries & Tools ๐ฅ
- https://github.com/fatih/color
- https://github.com/melbahja/goph
- https://github.com/spf13/cobra
- https://github.com/goreleaser
- https://github.com/briandowns/spinner
- https://github.com/civo/civogo
- https://github.com/digitalocean/godo
- https://github.com/scaleway/scaleway-sdk-go
Legal Disclaimer ๐ฎ
This project is not affiliated with Mojang Studios, XBox Game Studios, Double Eleven or the Minecraft brand.
"Minecraft" is a trademark of Mojang Synergies AB.
Other trademarks referenced herein are property of their respective owners.