Skip to main content
Before building, make sure you have all required dependencies. See Requirements for the full list.
1

Clone the repository

The repository must be cloned as a git repo — plain file extraction is not supported (required by dbtool.py).
git clone https://github.com/LandSandBoat/server.git
cd server
2

Initialize submodules

git submodule update --init --recursive
3

Install Python dependencies

The build system calls Python during CMake configuration to generate IPC stubs.
python3 -m venv .venv
source .venv/bin/activate       # Linux/macOS
# .venv\Scripts\activate        # Windows
pip install --upgrade -r tools/requirements.txt
4

Configure with CMake

Run CMake to configure the build. The flags below match the defaults used in the CI pipeline and Docker image.
cmake -G Ninja -S . -B build \
    -DCMAKE_BUILD_TYPE=Release \
    -DTRACY_ENABLE=OFF \
    -DPCH_ENABLE=ON \
    -DWARNINGS_AS_ERRORS=TRUE
CMake option reference:
OptionDefaultDescription
CMAKE_BUILD_TYPERelease, Debug, RelWithDebInfo
TRACY_ENABLEOFFEnable Tracy profiler instrumentation
PCH_ENABLEONEnable precompiled headers (speeds up builds)
WARNINGS_AS_ERRORSTRUETreat compiler warnings as errors
ENABLE_CLANG_TIDYOFFRun clang-tidy during build
5

Build

cmake --build build -j$(nproc)   # Linux/macOS
cmake --build build              # Windows
On a successful build, the following executables are placed in the repository root:
  • xi_connect — login/connection server
  • xi_search — search and auction house server
  • xi_world — world/lobby server
  • xi_map — zone map server (one or more instances)
6

Set up the database

Before starting the server, run the database tool to import all SQL files and run migrations:
python tools/dbtool.py update
See Database setup for full details.
7

Start the server

Launch each process. The map server must start after xi_world.
./xi_connect --log log/connect-server.log &
./xi_search  --log log/search-server.log  &
./xi_world   --log log/world-server.log   &
sleep 1
./xi_map     --log log/map-server.log     &
Alternatively, use python tools/dbtool.py and select Launch Server from the interactive menu, which reads zone settings from the database to launch the correct number of map processes.

Building the Docker image

If you want to build a custom Docker image (for example, to include C++ modules), use the provided Dockerfiles.
docker build -f docker/ubuntu.Dockerfile .
Available build args:
BASE_TAG=24.04
UNAME=xiadmin
UGROUP=xiadmin
UID=1000
GID=1000
COMPILER=gcc
GCC_VERSION=14
LLVM_VERSION=20
CMAKE_BUILD_TYPE=Release
TRACY_ENABLE=OFF
ENABLE_CLANG_TIDY=OFF
PCH_ENABLE=ON
WARNINGS_AS_ERRORS=TRUE
REPO_URL="https://github.com/USERNAME/server"
COMMIT_SHA="$(git rev-parse HEAD)"
REPO_URL and COMMIT_SHA are required for dbtool.py unless you mount the host .git directory at runtime. They also add org.opencontainers.image labels that link to your source code.
docker build -f docker/ubuntu.Dockerfile \
    --tag USERNAME/server:latest \
    --build-arg REPO_URL="https://github.com/USERNAME/server" \
    --build-arg COMMIT_SHA="$(git rev-parse HEAD)" \
    .
Alpine-based images are also available:
docker build -f docker/alpine.Dockerfile .

Build docs developers (and LLMs) love