This page will guide you through all the required steps to compile the server core on Linux.
- g++ Compiler
- CMake
- Git
- MariaDB or MySQL 5.5 (officially supported by VMaNGOS, though EOL). MySQL 8.0 is not supported.
- OpenSSL (if not on Arch)
- Zlib
sudo apt install build-essential
sudo pacman -S base-devel
sudo dnf install make gcc g++
To download the source code for VMaNGOS, you should install Git. This can be avoided if you choose to manually download the zip archive from the website, but it's better to use Git, as it makes pulling updates from the main repository much easier.
sudo apt install git
sudo pacman -S git
sudo dnf install git
Since this is a cross-platform project, we use CMake to generate the appropriate solution files for every environment.
sudo apt install cmake
sudo pacman -S cmake
sudo dnf install cmake
Account, character, and game data is stored inside the database, so we need MariaDB to read and write data to it.
MySQL 5.5 is officially supported by VMaNGOS but is end-of-life and unavailable in modern distribution repositories. If you choose MySQL 5.5, refer to your distribution's documentation or community guides for manual installation steps. MySQL 8.0 is not supported.
Below is how to install MariaDB on common distributions:
sudo apt-get install mariadb-server libmariadb-dev
systemctl enable --now mariadb.service
sudo pacman -S mariadb mariadb-libs
systemctl enable --now mariadb.service
sudo dnf install mariadb-server mariadb-devel
systemctl enable --now mariadb.service
Communication between the game client and server needs to be encrypted, which requires a cryptography library.
sudo apt-get install openssl
sudo apt-get install libssl-dev
OpenSSL is provided as part of coreutils and there is no need to install it.
sudo dnf install openssl
sudo dnf install openssl-devel
In order to reduce network traffic, a number of packets sent from the server are compressed, so we need a library for that too.
sudo apt install zlib1g-dev -y
On arch we can use zlib-ng-compat, which is faster.
sudo pacman -S zlib-ng-compat
On Fedora we have to use zlib-ng-compat as zlib package has been deleted in Fedora 40+.
sudo dnf install zlib-ng-compat zlib-ng-compat-devel
Clone the latest core revision into a vmangos directory inside your home folder using Git:
mkdir ~/vmangos
cd ~/vmangos
git clone -b development https://github.com/vmangos/core
Now let's configure our project. Make another directory called build next to the newly created core folder, and call CMake from there to generate the Makefiles.
mkdir build
cd build
cmake ../core -DCMAKE_BUILD_TYPE=Release -DSUPPORTED_CLIENT_BUILD=5875 -DUSE_EXTRACTORS=0 -DCMAKE_INSTALL_PREFIX=~/vmangos
As you can see, you'll need to set a couple of settings when calling CMake. Here is what each of these means.
This setting lets you choose if you want to compile in Debug or Release mode. The server will run much smoother in Release mode, so set -DCMAKE_BUILD_TYPE to Release.
Since this is a progressive emulator, you can specify the exact client version to support. The build number of the final Vanilla patch 1.12.1 is 5875. You can see your client's build number in the lower left corner of the login screen. Only the final version of each major patch is supported. That means you can play with 1.8.4, but not 1.8.0 for example.
The server needs the map terrain data in order to know where anything is located. This data is extracted from the game client using several tools, which you can choose to build with this setting. If you already have the map files from somewhere else, then you can set this to 0.
This setting lets you choose where to copy the binaries after compilation finishes.
Now that we have all the dependencies, and the project files have been properly configured, we can go ahead and compile the core. This can take quite a while, depending on the computer you are using.
make -j$(nproc)
make install
Congratulations! You should now be able to find the compiled binaries inside the vmangos directory.
Go to the next tutorial to learn how to setup your database and extract data files.