craftycontroller
A Helm chart for Crafty Controller, a web-based GUI for Minecraft Server administration.
About this chart
craftycontroller
A Helm chart for Crafty Controller, a web-based GUI for Minecraft Server administration.
Source code can be found here:
This is a 3rd party maintained chart, and supports several features not supported by the Crafty Controller team.
The default installation is intended to be similar to the official Docker Installation Guide
Limitations
This chart is designed to make it simple to run many instances of Crafty.Doing so permits resource isolation and allows simple service and port customizations for mods and plugins that require it. Therefore, it is encouraged to deploy an instance of Crafty for each Minecraft server being run.
As this is a 3rd party chart, the default image tag is set latest. This is intended to simplify maintainence, but may not be desired for your use-case.
Minecraft servers managed by Crafty must also have their ports defined in this chart. This is also true for mods and plugins that require exposed ports, such as those that provide proximity chat and web-based mapping.
Basic usage
Expose Crafty and Minecraft server on default ports
By default, no services are exposed outside the cluster. An Ingress or LoadBalancer service may be required to access Minecraft and/or the Crafty GUI.
services:
https:
ingress:
hosts:
- crafty.example.com
tls:
- secretName: crafty-tls
hosts:
- crafty.example.com
minecraft:
type: LoadBalancer
Setup persistence
By default, only required PVC are created (app config and servers). Here are all the volume mounts Crafty supports.
persistence:
crafty-app-config: # Defaults shown
enabled: true
requests: 1Gi
crafty-servers: # Defaults shown
enabled: true
requests: 10Gi
crafty-backups:
enabled: true
requests: 20Gi
crafty-logs:
enabled: true
requests: 1Gi
crafty-import:
enabled: true
requests: 5Gi
Enabling the SFTP server
The SFTP server is provided by atmoz/sftp
Due to the limitations of Crafty Controller's file manager, an SFTP server is provided to help ease management. This container is configued to be fully compatible with Crafty Controller's permissions requirements, and will not break Crafty on its own.
Note: The Crafty Controller maintainers will state that Crafty can not support FTP. This is not true, the maintainers are choosing not to support FTP. This chart fully supports FTP, and is compatible with Crafty Controller. If you believe Crafty Controller is unhappy due to files updated using the FTP server, please open an Issue and describe the problem experienced.
sftp:
enabled: true
service:
type: LoadBalancer
By default, two secrets are required by the FTP server to provide user credentials and SSH keys.
The sftp-users secret's users key is used to define accounts for the FTP server. This value must be in the following format. It is critical that the username, UID, and GID do not change:
crafty:password:1000:0:
By default (sftp.users.generate: true), the same PreSync hook creates this
secret if and only if it does not already exist, generating a random 20
character password (configurable via sftp.users.passwordLength, username,
uid, gid). The password is never logged. To retrieve it after creation:
kubectl get secret sftp-users -o jsonpath='{.data.users}' | base64 -d
To manage it yourself instead, set sftp.users.generate: false and create the
secret manually:
kubectl create secret generic sftp-users --from-literal=users='crafty:password:1000:0:'
In addition, the sftp-host-keys secret stores the server SSH keys.
By default (sftp.hostKeys.generate: true), a PreSync hook job generates these
keys and creates the secret automatically if and only if it does not already
exist. An existing secret is never modified, so host keys remain stable across
upgrades. For auditability the job logs only the public key fingerprints — the
private keys are never written to logs. The job runs as a Helm/Argo CD PreSync
hook with a namespaced Role that can only get and create secrets.
To manage the keys yourself instead, set sftp.hostKeys.generate: false and
create the secret manually:
ssh-keygen -t ed25519 -f ssh_host_ed25519_key < /dev/null
ssh-keygen -t rsa -b 4096 -f ssh_host_rsa_key < /dev/null
kubectl create secret generic sftp-host-keys --from-file=ssh_host_ed25519_key,ssh_host_ed25519_key.pub,ssh_host_rsa_key,ssh_host_rsa_key.pub
Deploy craftycontroller with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has craftycontroller on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartcraftycontroller is pinned at v0.3.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply