A Docker setup for VMaNGOS
In particular, I did not like the convoluted Python script used to control everything, the lack of an easy way to back up the databases, a missing built-in solution to extract client data and the fact that all the containers are executed as root, causing potential security issues and permission headaches on the host; among other, more minor things.
rm) if you intend to use the provided scripts to install, update and manage VMaNGOS
This assumed client version is
1.12.1); if you want to set up
VMaNGOS to use a different version, search the provided
for occurrences of
client_version=5875 and modify them accordingly. You will
also have to adjust the
./src/data/5875:/opt/vmangos/bin/5875:ro bind mount
vmangos_mangos service in
The user that is used inside the containers has UID
1000 and GID
default. You can adjust this, if needed; e.g., to match your host UID/GID. This
requires searching the scripts for
modifying these values as well as adjusting the environment variables
First, clone the repository, initialize the submodules and generate the config files:
user@local:~$ git clone https://git.sr.ht/~mser/vmangos-docker user@local:~$ cd vmangos-docker user@local:vmangos-docker$ git submodule update --init --remote --recursive user@local:vmangos-docker$ ./00-create-or-reset-config-files.sh
At this point, you have to adjust the two configuration files in
./docker-compose.yml for your desired setup. The default setup will
only allow local connections (from the same machine). To make the server
public, it is required to change the
VMANGOS_REALM_IP environment variable
vmangos_database service in
./docker-compose.yml. Simply replace
127.0.0.1 with the server's WAN IP (or LAN IP, if you don't want to make it
accessible over the Internet).
VMaNGOS also requires some data generated/extracted from the client to work
correctly. To generate that data automatically during the installation, copy
the contents of your World of Warcraft client directory into
After that, simply execute the installer:
Note that generating the required data will take many hours (depending on your hardware). Some notices/errors during the generation are normal and nothing to worry about.
Alternatively, if you have acquired the extracted/generated data previously,
you can place it directly into
./src/data, in which case the installer will
skip extracting/generating the data.
After the installer has finished, you should have a running installation and
can create your first account by attaching to the
user@local:vmangos-docker$ docker attach vmangos_mangos
After attaching, create the account and assign an account level:
account create <account name> <account password> account set gmlevel <account name> <account level> # see https://github.com/vmangos/core/blob/79efe80ae39d94a5e52b71179583509b1df75899/src/shared/Common.h#L184-L191
When you are done, detach from the Docker container by pressing Ctrl+P and Ctrl+Q.
For your convenience, a number of shell scripts are provided to keep managing your VMaNGOS installation simple, without requiring detailed knowledge about how VMaNGOS or Docker work.
These scripts are all in the root directory of this repository and prefixed
00 (so they are grouped together when viewing the directory).
I recommend taking a look at them to understand how they work and, if needed, modifying them to better suit your needs.
VMaNGOS can be started and stopped using the following scripts:
user@local:vmangos-docker$ ./00-start.sh user@local:vmangos-docker$ ./00-stop.sh
Updating can be done via the provided update script. This will update the submodules, rebuild the Docker images and run databases migrations:
If the update script fails with the notice that there is new world database import, simply follow the instructions that are also printed in such a case.
At times, this repository might also get updated. Please do not blindly run
git pull without looking at the commits to see what (potentially breaking)
changes have been introduced.
The three important databases VMaNGOS uses,
realmd, can be exported as SQL dumps with the following script:
The dumped databases can, by default, be found in
./backup. If you want to
change that path, adjust the
./backup:/backup bind mount for the
vmangos_database service in
If at any point after the initial installation you need to re-extract the client data, you can do so by running the following script:
Note that this will also remove any existing data in
./src/data, so make sure
to create a backup of that in case you want to save it.
You are welcome to help out!
AGPL-3.0-or-later © Michael Serajnik