Skip to content

Building CMaNGOS TBC

ThoriumLXC publishes container images that include the cmangos-tbc source, along with build scripts. These images can be used to create emulator server binaries.

The Builder Image is the core component responsible for compiling the CMaNGOS TBC emulator server. It handles the entire build process, from source code to final binary artifacts.

Info

If you are uncertain how to run these commands, or what they are doing, check out the build architecture overview. It'll help you understand the high-level concepts behind this.

Running a build

To build cmangos-tbc using the builder image, you can use the following command for the 2025.02.23 version. This will download the image from one of the registries, and run the build. Builder images are built to support argumentless builds.

You can use any of these commands, the differences between them being where the image is downloaded from. The image will be the same regardless of where you download it from, creating a container named cmangos-tbc-build.

docker run --name cmangos-tbc-build ghcr.io/thoriumlxc/cmangos-tbc-builder:2025.02.23
docker run --name cmangos-tbc-build docker.io/thoriumlxc/cmangos-tbc-builder:2025.02.23
docker run --name cmangos-tbc-build gitlab.org/thoriumlxc/cmangos-tbc-builder:2025.02.23
docker run --name cmangos-tbc-build quay.io/thoriumlxc/cmangos-tbc-builder:2025.02.23

Info

These images are typically 1-3 GiB in size. Be aware of this if you are on limited bandwidth connections.

Depending on the capabilities of your system, this can take a while to download the images, and run the build processes. The outputs from the build will be written to the directory /opt/mangos within the container image.

The Build

build of cmangos-tbc

When this has finished, you will need to extract the build emulation binaries from the completed container. We'll do this by copying the files from the cmangos-tbc-build container. In a terminal, run the following command to copy the files from the folder /opt/mangos in the container, to a folder named cmangos-tbc on your machine:

docker cp cmangos-tbc-build:/opt/mangos cmangos-tbc

This will look like the following in the folder structure:

.
├── bin
│   ├── mangosd
│   ├── realmd
│   ├── run-mangosd
│   ├── run-realmd
│   └── tools
│       ├── ad
│       ├── ExtractResources.sh
│       ├── MoveMapGen
│       ├── MoveMapGen.sh
│       ├── offmesh.txt
│       ├── vmap_assembler
│       └── vmap_extractor
├── etc
│   ├── ahbot.conf
│   ├── aiplayerbot.conf
│   ├── anticheat.conf
│   ├── anticheat.conf.dist
│   ├── mangosd.conf
│   ├── mangosd.conf.dist
│   ├── realmd.conf
│   └── realmd.conf.dist
└── run

You can then use the bin/mangosd, bin/realmd or any of the other binaries for running the emulator server on a Ubuntu (linux) environment.