Skip to content

Container image for Minecraft control panel and daemon from https://www.multicraft.org/

Notifications You must be signed in to change notification settings

jacobped/Docker-Multicraft

Repository files navigation

Multicraft container image

Docker Image

Docker Pulls Docker Stars Docker Image Size (tag) Docker Image Version (latest semver)

Description

Multicraft container with panel and daemon in one. Used for running one or more easy to use minecraft servers with administration panel and more.

The container will be created with two locations internally '/mc/panel' and '/mc/multicraft', which should be mounted to maintain config and data for both the server and the web front end.

Create a volume mapping to container path /mc.

  • Map container path to "/mc"
  • Map Container port 8080 to whatever you want for the web portal.
  • Map TCP/UDP ports for your game server(s). (Default is 25565 for minecraft but is NOT added by default)

The individual server files can be found internally at '/mc/multicraft/servers/' in their own individual folder as set by within the Multicraft Panel. There are a handful of environmentals which can be set at start up as shown below. If you have purchased a Multicraft licence you should input this into MC_KEY, this will then be updated to allow you to access your full server licencing.

Map the following Variables as needed. (The following are defaulted variables)

  • MC_DAEMON_ID="1"
  • MC_DAEMON_PW="ChangeMe"
  • MC_FTP_IP=""
  • MC_FTP_PORT="21"
  • MC_FTP_SERVER="y"
  • MC_KEY="free"

Helpfull commands

Run

Before running the image, you need to copy and modify the environment configuration file. Copy the file called multicraft-variables.env.example to multicraft-variables.env, and change the values within as needed.

Afterwards you can run the image using the command below.

docker-compose -f "docker-compose.yml" up -d

This will pull the newest image from external image registry and start the container. For building locally see related section.

Persisting your data

If you are running this in an environment where you want to avoide loosing the data from multicraft and your precious minecraft worlds. I would recommend changing the storage type in the compose file, from docker volume to a directory on your local disk. For simplicity and making it easy to use this is not enabled by default. The compose file contains a disabled example for persisting data to disk, and you can switch to it if needed.

The official documentation isn't super helpfull on how to map a directory on the host to the container, so here is a stackoverflow link with lots of examples: https://stackoverflow.com/a/48442262

Build (Optional)

To build the image locally intead of pulling from external image registry, make sure to copy the .env file as previously described. Aftewards you can build the image with the command below.

docker-compose -f "docker-compose.yml" build

Viewing logs

Below is different ways of seeing and following the container logs.

docker-compose -f "docker-compose.yml" logs -f
docker logs docker-multicraft_multicraft_1 -f  

Execute shell inside container:

docker-compose -f "docker-compose.yml" exec multicraft /bin/bash

Delete the install.php file, after setup has been completed

After you have configured multicraft trough their webpanel setup guide, you can restart the container and it will automaticly remove the install.php file. Alternatively use the command below.

docker exec -it docker-multicraft_multicraft_1 rm /mc/panel/install.php

Remove everything

docker-compose -f "docker-compose.yml" down;  docker-compose -f "docker-compose.yml" rm -f; docker volume prune -f; docker system prune -f