Go to file
2022-03-23 06:25:44 +00:00
app Further fix files to conform with Black pylintrc 2022-03-23 06:16:22 +00:00
config_examples Create pylintrc, code review pipeline & correct codebase errors 2022-01-26 01:45:30 +00:00
docker Correct yml for compose file and example for lint 2022-03-23 02:37:52 +00:00
.dockerignore Remove unrequired files from image 2022-02-27 18:33:48 +00:00
.editorconfig Amend editor config for black 2022-03-23 01:53:43 +00:00
.gitignore Add ignore files 2021-08-26 03:54:39 +01:00
.gitlab-ci.yml Last lint correction on gitlab-ci file 2022-03-23 02:48:55 +00:00
.pylintrc Add pylint compatability for black 2022-03-23 02:51:37 +00:00
DBCHANGES.md Update DBCHANGES.md 2021-08-22 10:00:39 +00:00
docker_launcher.sh Use sudo to drop perms to non-root 2022-03-07 01:51:25 +00:00
docker-compose.yml.example Correct yml for compose file and example for lint 2022-03-23 02:37:52 +00:00
Dockerfile Use sudo to drop perms to non-root 2022-03-07 01:51:25 +00:00
main.py Further fix files to conform with Black pylintrc 2022-03-23 06:16:22 +00:00
README.md Update readme to add Black Badge 2022-03-23 06:25:44 +00:00
requirements.txt Sort requirements.txt alphabetically 2022-03-19 16:23:31 +00:00

Code style: black

Crafty Controller 4.0.0-alpha.3.5

Python based Control Panel for your Minecraft Server

What is Crafty Controller?

Crafty Controller is a Minecraft Server Control Panel / Launcher. The purpose of Crafty Controller is to launch a Minecraft Server in the background and present a web interface for the server administrators to interact with their servers. Crafty is compatible with Docker, Linux, Windows 7, Windows 8 and Windows 10.

Documentation

Documentation available on wiki.craftycontrol.com

Meta

Project Homepage - https://craftycontrol.com

Discord Server - https://discord.gg/9VJPhCE

Git Repository - https://gitlab.com/crafty-controller/crafty-web


Basic Docker Usage 🐳

With Crafty Controller 4.0 we have focused on building our DevOps Principles, implementing build automation, and securing our containers, with the hopes of making our Container user's lives abit easier.

- Two big changes you will notice is:

  • We now provide pre-built images for you guys.
  • Containers now run as non-root, using practices used by OpenShift & Kubernetes (root group perms).

🔻WARNING: [WSL/WSL2 | WINDOWS 11 | DOCKER DESKTOP]🔻
BE ADVISED! Upstream is currently broken for Minecraft running on Docker under WSL/WSL2, Windows 11 / DOCKER DESKTOP!
On 'Stop' or 'Restart' of the MC Server, there is a 90% chance the World's Chunks will be shredded irreparably!
Please only run Docker on Linux, If you are using Windows we have a portable installs found here: Latest-Stable, Latest-Development


- To get started with docker 🛫

All you need to do is pull the image from this git repository's registry. This is done by using 'docker-compose' or 'docker run' (You don't need to clone the Repository and build, like in 3.x ).

If you have a config folder already from previous local installation or docker setup*, the image should mount this volume and fix the permission as required, if no config present then it will populate its own config folder for you.

As the Dockerfile uses the permission structure of crafty:root internally there is no need to worry about matching the UID or GID on the host system :)


- Using the registry image 🌎

The provided image supports both arm64 and amd64 out the box, if you have issues though you can build it yourself with the compose file in docker/.

The image is located at: registry.gitlab.com/crafty-controller/crafty-commander:latest

Branch Status
:latest pipeline status
:dev pipeline status

While the repository is still private / pre-release, Before you can pull the image you must authenticate docker with the Container Registry.

To authenticate you will need a personal access token with the minimum scope:

  • For read (pull) access, read_registry.
  • For write (push) access, write_registry.

When you have this just run:

$ docker login registry.gitlab.com -u <username> -p <token>

or

$ echo <token> | docker login registry.gitlab.com -u <username> --password-stdin

or

$ cat ~/my_password.txt | docker login registry.gitlab.com -u <username> --password-stdin

Then use one of the following methods:

docker-compose.yml:

# Make your compose file
$ vim docker-compose.yml
version: '3'

services:
  crafty:
    container_name: crafty_commander
    image: registry.gitlab.com/crafty-controller/crafty-commander:latest
    environment:
      - TZ=Etc/UTC
    ports:
      - "8000:8000" # HTTP
      - "8443:8443" # HTTPS
      - "8123:8123" # DYNMAP
      - "19132:19132/udp" # BEDROCK
      - "25500-25600:25500-25600" # MC SERV PORT RANGE
    volumes:
      - ./docker/backups:/commander/backups
      - ./docker/logs:/commander/logs
      - ./docker/servers:/commander/servers
      - ./docker/config:/commander/app/config
      - ./docker/import:/commander/import
$ docker-compose up -d && docker-compose logs -f

docker run:

$ docker run \
	--name crafty_commander \
	-p 8000:8000 \
	-p 8443:8443 \
	-p 8123:8123 \
	-p 19132:19132/udp \
	-p 25500-25600:25500-25600 \
	-e TZ=Etc/UTC \
	-v "/$(pwd)/docker/backups:/commander/backups" \
	-v "/$(pwd)/docker/logs:/commander/logs" \
	-v "/$(pwd)/docker/servers:/commander/servers" \
	-v "/$(pwd)/docker/config:/commander/app/config" \
	-v "/$(pwd)/docker/import:/commander/import" \
	registry.gitlab.com/crafty-controller/crafty-commander:latest

Building from the cloned repository:

If you are building from docker-compose you can find the compose file in ./docker/docker-compose.yml just cd to the docker directory and docker-compose up -d

If you'd rather not use docker-compose you can use the following docker run in the directory where the Dockerfile is:

# REMEMBER, Build your image first!
$ docker build . -t crafty

$ docker run \
	--name crafty_commander \
	-p 8000:8000 \
	-p 8443:8443 \
	-p 8123:8123 \
	-p 19132:19132/udp \
	-p 25500-25600:25500-25600 \
	-e TZ=Etc/UTC \
	-v "/$(pwd)/docker/backups:/commander/backups" \
	-v "/$(pwd)/docker/logs:/commander/logs" \
	-v "/$(pwd)/docker/servers:/commander/servers" \
	-v "/$(pwd)/docker/config:/commander/app/config" \
	-v "/$(pwd)/docker/import:/commander/import" \
	crafty

A fresh build will take several minutes depending on your system, but will be rapid thereafter.