-
Notifications
You must be signed in to change notification settings - Fork 0
Home
These instructions will provide a quick start to using cmangos-in-docker..
-
This guide assumes you have docker and docker compose installed on your machine and assumes you know the basics of how to edit a compose file.
-
You will need a copy of your specified WoW expansions client data files, this can be obtained in a manner of ways including getting them from your copy of the game :)
Use this docker-compose.yml file as an example, this can also be found in the repository.
The below compose file will create a The Burning Crusader CMaNGOS server, if you wish to change this or use a different expansion please go to the customisation page here.
mariadb:
image: mariadb:11.2.3
restart: unless-stopped
container_name: mariadb
environment:
MARIADB_ROOT_PASSWORD: SecretPassword # IMPORTANT should be set the same as the MARIADB_ROOT_PASSWORD environment variable for the cmangos-in-docker service
volumes:
- mariadb_data:/var/lib/mysql
ports:
- "3306:3306"
healthcheck:
interval: 30s
retries: 3
test:
[
"CMD",
"healthcheck.sh",
"--su-mysql",
"--connect",
"--innodb_initialized"
]
timeout: 30s
cmangos-in-docker:
image: cmangos-in-docker:latest
container_name: cmangos-in-docker
stdin_open: true
tty: true
environment:
MARIADB_ROOT_PASSWORD: SecretPassword # IMPORTANT should be set the same as the MARIADB_ROOT_PASSWORD environment variable for the mariadb service
MARIADB_MANGOS_USER_PASSWORD: MangosSecretPassword
IP_ADDRESS: <IP_ADDRESS> # IP Address of your docker host or your WAN address if you want to expose this server
volumes:
- <PATH_TO_YOUR_CLIENT_DATA>:/home/mangos/Client-Data
- cmangos_data:/home/mangos
depends_on:
mariadb:
condition: service_healthy
ports:
- "8085:8085"
- "3724:3724"
healthcheck:
interval: 10s
retries: 3
test:
[
"CMD",
"healthcheck.sh"
]
timeout: 30s
start_period: 15s
volumes:
mariadb_data:
name: mariadb_data
cmangos_data:
name: cmangos_data
MARIADB_ROOT_PASSWORD
: This should be changed within both services (mariadb and cmangos-in-docker) to include a secure password that does not contain special characters, pass phrases such as Secret-Password-Mine are good examples. DO NOT use special characters/symbols/spaces.
MARIADB_MANGOS_USER_PASSWORD
: This should be changes to something secure, this is the password for the "mangos" user created within mariadb by the cmangos-in-docker container during first setup so that root isn't used going forward. DO NOT use special characters/symbols/spaces.
IP_ADDRESS
should be changed to the IP address of the host running the docker container e.g. 192.168.1.98 etc.
<PATH_TO_YOUR_CLIENT_DATA>
under volumes:
should be changed to the local path on your device of the WoW Client data files, ensure that the files have a folder called Data within them that includes your .MPQ files etc.
The folders should look similar to below
Once the container has been started using your docker-compose file using docker compose up -d
you can keep an eye on it's progress by using docker logs cmangos-in-docker
.
The first time setup of the CMaNGOS server can take anywhere from 45 minutes to over an hour depending on your hardware (Extracting and making the maps etc from the WoW client data is the most time consuming part).
Once the container has completed the first time setup it will terminate on it's own providing logs similar to below.
At this point you can now run docker compose up -d
again and it will start the container again, for the first time starting of a CManGOS server this can take some time before it's ready to connect to especially when using playerbots as it will create them during the first time start.
You can use docker attach cmangos-in-docker
this will bring you into the terminal for the mangos user inside the container, cmangos-in-docker uses screen to start mangosd and realmd in seperate processes.
- To access mangosd you can enter
screen -r mangosd
. - To access realmd you can enter
screen -r realmd
.
You can now view logs for realmd and mangosd as well as enter in commands to mangosd as per the cmangos documentation.
- To exit a screen without closing it, press
Ctrl
,A
andD
at the same time on your keyboard. - To exit the docker terminal without stopping the container, press
Ctrl
andP
followed byCtrl
andQ
.
If you accidentally close down the realm or mangosd processes or stop the container it can easily be started again using docker compose up -d