A minecraft server. You need to provide the minecraft .jar file as a resource.
Uses 'mcstatus' to get information from the server.
The running server can be managed/operated by screen.
- social ›
Minecraft is the ever so popular game. This charm deploys a stand alone minecraft server for you.
You have to download the server jar first, which you attach as a resource.
The server needs about 2GB ram and 2 cpus to be happy (might need more).
Start by downloading the official server jar.
Deploy with the server jar as a juju resource:
juju deploy cs:~erik-lonroth/minecraft-server --constraints "mem=2G cores=2" --resource server-jar=minecraft_server.1.14.jar juju expose minecraft-server
You can attach a server-jar after deploy also with juju attach-resource if you like to upgrade later for example.
juju attach-resource minecraft-server server-jar=minecraft_server.1.14.jar
The server runs default on port 25565 in survival mode.
If you enable the query-port with juju config, you can query the server with mcstatus.
All configuration changes triggers a server restart.
Example, set gamemode and server-port like this:
juju config minecraft-server gamemode='creative' server-port=12345
Operating the server
The charm sets up a 'screen' session named 'minecraft' as the user minecraft.
You can attach to this at any time to operate the server.
juju ssh minecraft-server/0 sudo -u minecraft screen -R minecraft # ctrl-a d (Gets you out)
Contact & Attribution
Erik Lönroth email@example.com - author of the charm
Nathan Adams at Mojang for the mcstatus code. firstname.lastname@example.org
All Minecraft developers for a great game!
Upstream Project Name
- Minecraft https://www.minecraft.net
- Charm code: https://github.com/erik78se/layer-minecraft-server
- mcstatus (Gets server status) https://github.com/Dinnerbone/mcstatus (Apache 2.0)
- (boolean) Allow players to fly, true or false
- (boolean) Allow generation of the nether, true or false
- (int) Level of complexity 1-5
- (boolean) Allow quering the server, true or false
- (string) Space separated list of extra deb packages to install.
- (string) survival|creative
- (string) List of signing keys for install_sources package sources, per charmhelpers standard format (a yaml list of strings encoded as a string). The keys should be the full ASCII armoured GPG public keys. While GPG key ids are also supported and looked up on a keyserver, operators should be aware that this mechanism is insecure. null can be used if a standard package signing key is used that will already be installed on the machine, and for PPA sources where the package signing key is securely retrieved from Launchpad.
- (string) List of extra apt sources, per charm-helpers standard format (a yaml list of strings encoded as a string). Each source may be either a line that can be added directly to sources.list(5), or in the form ppa:<user>/<ppa-name> for adding Personal Package Archives, or a distribution component to enable.
- (string) Name of the level, will be generated if it doesn't exist
- (int) Maximum players allowed on the server
- (string) Message of the day displayed to users in the server list
- Juju Powered Minecraft Server
- (string) The status of service-affecting packages will be set to this value in the dpkg database. Valid values are "install" and "hold".
- (int) Port for which Minecraft can be queried
- (int) Port for which Minecraft runs upon
- (boolean) Generate animals, true or false
- (boolean) Generate monsters, true or false