- Use docker swarm to leverage docker secrets.
- Docker
- Docker compose 2
- p7zip-full
- A POSIX-compliant shell as well as various core utilities (such as
cp
andrm
) if you intend to use the provided scripts to install, update, and manage VMaNGOS.
Secure your system by understanding the following information: ufw-docker.
The ufw commands you will need to secure your installation:
ufw allow from [your client ip]
ufw route allow proto tcp from [your client ip] to any
ufw route allow proto tcp from any to any port 3724
ufw route allow proto tcp from any to any port 8085
The assumed client version is 5875
(patch 1.12.1
); if you want to set up VMaNGOS to use a different version, modify the VMANGOS_CLIENT
entry in the .env
file accordingly.
The user that is used inside the persistent containers (VMANGOS_DATABASE, VMANGOS_REALMD, VMANGOS_MANGOS) has UID 1000
and GID 1000
by default. You can adjust this if needed; e.g., to match your host UID/GID. This requires editing the entries VMANGOS_USER_ID
and VMANGOS_GROUP_ID
in the .env
file.
Also, please be aware that ./vol/client-data-extracted
gets mounted directly into the mangos server to provide dbc and map data.
git clone --recurse-submodules https://github.com/vanilla-reforged/vmangos-docker
Adjust the .env files for your desired setup:
.env
For Docker Compose.env-script
For Scripts.env-vmangos-build
For compiler image build / to set the cmake options.
To use the scripts, change the DOCKER_DIRECTORY
environment variable in the .env-script
file to the absolute path to your vmangos-docker directory (f.e. /home/user/vmangos-docker
).
To make the server public, change the VMANGOS_REALM_IP
environment variable in the .env-script
file.
Copy the contents of your World of Warcraft client directory into ./vol/client-data
. Generating the required data will take many hours. If you have already extracted the client data, place it in ./vol/client-data-extracted
and skip the 04
script.
Execute scripts 01 to 05:
-
01
- Install and modify Docker, 7zip and ufw.
-
02
- Update the github directories in ./vol/.
-
03
- Compile the core.
-
04
- Extract the Client Data.
-
05
- Initialize the ressource limits, based on the current hardware.
Then create the vmangos network:
docker network create vmangos-network
Then start your environment (execute from the directory where the docker-compose.yml is located):
docker compose up -d
-
06...
- Create and modify the vmangos databases.
-
07...
- Clear the mysql root pw from the database containers .env variable.
Update mangosd.conf
and realmd.conf
with your MySQL root password if you changed it.
Attach to the vmangos_mangos
service:
docker attach vmangos-mangos
Create the account:
account create <account name> <account password>
account set gmlevel <account name> <account level>
Detach from the Docker container:
Press Ctrl+P and Ctrl+Q.
docker compose down
docker compose up -d
#BELOW IS CURRENTLY DEPRECATED, IT IS IN WORK
-
01...
- Import new migrations.
-
02...
- Recreate the world database.
-
03...
- Recompile the core.
-
./21-collect-ressource-usage.sh
- Collect ressource usage for database, mangos and realmd containers.
-
./22-adjust-ressource-limits.sh
- Adjust ressource allocations in docker-compose.yml based on 7 day averages of the Data collected with
25-collect-ressource-usage.sh
.
- Adjust ressource allocations in docker-compose.yml based on 7 day averages of the Data collected with
-
./31-database-backup.sh
- Backup dynamic databases.- Daily Full Backup
- Configurable Incremental Backups
- Weekly Log Database truncation
- S3 Offload - Attention: API calls/immutability are a financial risk. You must know what you are doing with this.
- Cleanup of old local backups
- use with flag --now to run independent of current hour.
-
./32-world-database-backup.sh
- Backup world database.
-
./33-logs-directory-cleanup.sh
- Cleanup mangos logs older than 3 days, honor logs older than 2 weeks, realmd logs older than 1 week.
-
./41-collect-population-balance.sh
- Collect faction balance data.
-
./42-faction-specific-xp-rates.sh
- Set faction-specific XP rates and restart server to activate them. Requires core change Vanilla Reforged - Faction specific XP rates.
crontab -e
# Runs every hour on the hour
0 * * * * /path/to/21-collect-ressource-usage.sh >> /path/to/logs/21-collect-ressource-usage.log 2>&1
# Runs weekly on Sunday at 4:00 AM
0 4 * * 0 /path/to/22-adjust-ressource-limits.sh >> /path/to/logs/22-adjust-ressource-limits.log 2>&1
# Runs every hour on the hour
0 * * * * /path/to/31-database-backup.sh >> /path/to/logs/31-database-backup.log 2>&1
# Runs weekly on Sunday at 5:00 AM if outcommented
# 0 5 * * 0 /path/to/32-world-database-backup.sh >> /path/to/logs/32-world-database-backup.log 2>&1
# Runs daily at 3:00 AM
0 3 * * * /path/to/33-logs-directory-cleanup.sh >> /path/to/logs/33-logs-directory-cleanup.log 2>&1
# Runs every hour on the hour
0 * * * * /path/to/41-collect-population-balance.sh >> /path/to/logs/41-collect-population-balance.log 2>&1
# Runs daily at 5:00 AM
0 5 * * * /path/to/42-faction-specific-xp-rates.sh >> /path/to/logs/42-faction-specific-xp-rates.log 2>&1