Getting it Working (Linux)¶
Once you've compiled the server core, there are still a number of steps you must go through before being able to start your server.
Important: Before running any of the commands below, it is recommended to start a bash session to ensure compatibility. Enter bash by typing:
bash
exit.
1. Extracting data from the client¶
The server requires a large amount of data from the client in order to operate. That includes DBC, Map, VMap and MMap files. To extract all that data you need extractors. You can compile them yourself by selecting the _USE_EXTRACTORS_ option when configuring in CMake. Alternatively you can download the required files from the internet.
Extracting data from client on Linux¶
-
Locate your WoW 1.12.1 client folder Verify it's build 5875 (bottom-left corner of the login screen). Assume your client is installed at
/home/yourname/games/World of Warcraft- adjust the path accordingly. -
Set your WoW path (edit once)
WOW_PATH='/home/yourname/games/World of Warcraft'
- Run extraction (separate commands - run in order)
Create the target data directory:
mkdir -p ~/vmangos/data/5875
cd ~/vmangos/data
Extract maps and DBC:
~/vmangos/bin/Extractors/MapExtractor -i "$WOW_PATH" -o ~/vmangos/data -e 7
Move the DBC folder into the version-specific subdirectory:
mv ~/vmangos/data/dbc ~/vmangos/data/5875/dbc
Extract raw vmap data:
~/vmangos/bin/Extractors/VMapExtractor -d "$WOW_PATH/Data"
Build final vmaps:
~/vmangos/bin/Extractors/VMapAssembler
Generate movement maps (adjust thread count automatically):
~/vmangos/bin/Extractors/MoveMapGenerator --threads "$(nproc)" --silent --configInputPath ~/vmangos/bin/Extractors/config.json --offMeshInput ~/vmangos/bin/Extractors/offmesh.txt
Clean up unused folders:
rm -rf ~/vmangos/data/{Buildings,Cameras}
- Final structure
~/vmangos/data/
├── 5875/dbc/
├── maps/
├── vmaps/
└── mmaps/
2. Setting up the database¶
The server requires a MariaDB (or MySQL) database to store all account, character, and world data.
Set username and password for DB (to reuse in following steps)¶
We'll use the default mangos/mangos expected by the server configuration files. If you change them, remember to update the configs later.
read -p "Database user [mangos]: " DB_USER; DB_USER=${DB_USER:-mangos}
read -sp "Database password [mangos]: " DB_PASS; echo; DB_PASS=${DB_PASS:-mangos}
Create databases and user¶
mysql -u root -p -e "CREATE DATABASE IF NOT EXISTS realmd DEFAULT CHARSET utf8 COLLATE utf8_general_ci; CREATE DATABASE IF NOT EXISTS mangos DEFAULT CHARSET utf8 COLLATE utf8_general_ci; CREATE DATABASE IF NOT EXISTS characters DEFAULT CHARSET utf8 COLLATE utf8_general_ci; CREATE DATABASE IF NOT EXISTS logs DEFAULT CHARSET utf8 COLLATE utf8_general_ci; CREATE USER IF NOT EXISTS '${DB_USER}'@'localhost' IDENTIFIED BY '${DB_PASS}'; GRANT ALL PRIVILEGES ON realmd.* TO '${DB_USER}'@'localhost'; GRANT ALL PRIVILEGES ON mangos.* TO '${DB_USER}'@'localhost'; GRANT ALL PRIVILEGES ON characters.* TO '${DB_USER}'@'localhost'; GRANT ALL PRIVILEGES ON logs.* TO '${DB_USER}'@'localhost'; FLUSH PRIVILEGES;"
Importing the database¶
You have two options: import a fully updated database (recommended) or import the latest release and then apply migrations separately.
Option A: Import the latest database with migrations pre-applied (fast)¶
ZIP_URL=$(curl -s https://api.github.com/repos/vmangos/core/releases/tags/db_latest | grep -o '"name": "db-[0-9a-f]*\.zip"' | sed 's/"name": "\([^"]*\)"/\1/' | head -n1 | sed 's|^|https://github.com/vmangos/core/releases/download/db_latest/|') && wget -qO /tmp/db-latest.zip "$ZIP_URL" && 7z x /tmp/db-latest.zip -o/tmp/ -y && mysql -u"${DB_USER}" -p"${DB_PASS}" --max-allowed-packet=256M realmd < /tmp/mysql-dump/logon.sql && mysql -u"${DB_USER}" -p"${DB_PASS}" --max-allowed-packet=256M characters < /tmp/mysql-dump/characters.sql && mysql -u"${DB_USER}" -p"${DB_PASS}" --max-allowed-packet=256M mangos < /tmp/mysql-dump/mangos.sql && mysql -u"${DB_USER}" -p"${DB_PASS}" --max-allowed-packet=256M logs < /tmp/mysql-dump/logs.sql
After this, you can skip to Step 3.
Option B: Import the latest database release and apply migrations separately¶
- Get the latest world database file
LATEST_DB=$(curl -s https://api.github.com/repos/brotalnia/database/contents/ | grep -o '"name": "world_full_[^"]*\.7z"' | sed 's/"name": "\(.*\)"/\1/' | while read f; do date_part=$(echo "$f" | sed 's/world_full_\(.*\)\.7z/\1/'); echo "$(date -d "$(echo "$date_part" | sed 's/_/ /g')" +%s 2>/dev/null) $f"; done | sort -n | tail -n1 | cut -d' ' -f2-) && wget -qO "/tmp/$LATEST_DB" "https://github.com/brotalnia/database/raw/master/$LATEST_DB"
- Extract the database
7z x "/tmp/$LATEST_DB" -o/tmp/ -y
- Import the base world database
mysql -u"${DB_USER}" -p"${DB_PASS}" mangos < "/tmp/$(basename "$LATEST_DB" .7z).sql"
- Run the VMaNGOS migration merge script
cd ~/vmangos/core/sql/migrations && ./merge.sh
world_db_updates.sql, logs_db_updates.sql, etc., in the same directory.
- Import the core SQL files (logs, logon, characters)
mysql -u"${DB_USER}" -p"${DB_PASS}" logs < ~/vmangos/core/sql/logs.sql
mysql -u"${DB_USER}" -p"${DB_PASS}" realmd < ~/vmangos/core/sql/logon.sql
mysql -u"${DB_USER}" -p"${DB_PASS}" characters < ~/vmangos/core/sql/characters.sql
- Import the merged migration files
mysql -u"${DB_USER}" -p"${DB_PASS}" mangos < ~/vmangos/core/sql/migrations/world_db_updates.sql
mysql -u"${DB_USER}" -p"${DB_PASS}" logs < ~/vmangos/core/sql/migrations/logs_db_updates.sql
mysql -u"${DB_USER}" -p"${DB_PASS}" realmd < ~/vmangos/core/sql/migrations/logon_db_updates.sql
mysql -u"${DB_USER}" -p"${DB_PASS}" characters < ~/vmangos/core/sql/migrations/characters_db_updates.sql
3. Editing the configuration files¶
Copy the distributed configuration templates and adjust them.
mkdir -p ~/vmangos/logs
cp ~/vmangos/etc/mangosd.conf.dist ~/vmangos/etc/mangosd.conf
cp ~/vmangos/etc/realmd.conf.dist ~/vmangos/etc/realmd.conf
Set the data and logs directories (using sed or a text editor):
sed -i "s|^DataDir.*|DataDir = \"../data\"|" ~/vmangos/etc/mangosd.conf
sed -i "s|^LogsDir.*|LogsDir = \"../logs\"|" ~/vmangos/etc/mangosd.conf
sed -i "s|^LogsDir.*|LogsDir = \"../logs\"|" ~/vmangos/etc/realmd.conf
Important: Now open ~/vmangos/etc/mangosd.conf and ~/vmangos/etc/realmd.conf in a text editor (e.g., nano, vim) and verify the database connection strings. The default entries look like:
LoginDatabase.Info = "127.0.0.1;3306;mangos;mangos;realmd"
WorldDatabase.Info = "127.0.0.1;3306;mangos;mangos;mangos"
CharacterDatabase.Info = "127.0.0.1;3306;mangos;mangos;characters"
LogsDatabase.Info = "127.0.0.1;3306;mangos;mangos;logs"
If you used a different MySQL username or password during database setup, replace the mangos;mangos part accordingly.
4. Add your realm to the database¶
Insert a record for your realm into the realmlist table of the realmd database:
mysql -u"${DB_USER}" -p"${DB_PASS}" -e "USE realmd; INSERT INTO realmlist (id, name, address, port, icon, realmflags, timezone, allowedSecurityLevel, population, gamebuild_min, gamebuild_max, flag) VALUES (1, 'VMaNGOS', '127.0.0.1', 8085, 1, 0, 1, 0, 0, 5875, 5875, 0);"
Change 'VMaNGOS' and '127.0.0.1' to your desired realm name and public IP if needed.
5. Starting your server¶
Make sure your MySQL server is running.
Start manually in two terminals¶
Terminal 1 - Realm server
cd ~/vmangos/bin && ./realmd
Terminal 2 - World server
cd ~/vmangos/bin && ./mangosd
Optional: Keep servers running with screen¶
screen -dmS realmd bash -c "cd ~/vmangos/bin && ./realmd"
screen -dmS mangosd bash -c "cd ~/vmangos/bin && ./mangosd"
screen -r realmd or screen -r mangosd.
Optional: Keep servers running with tmux¶
tmux new -d -s realmd 'cd ~/vmangos/bin && ./realmd'
tmux new -d -s mangosd 'cd ~/vmangos/bin && ./mangosd'
tmux a -t realmd or tmux a -t mangosd.
6. Creating an admin account¶
Once mangosd is running, type the following commands in its console:
account create admin admin
account set gmlevel admin 6
This creates an account with username admin and password admin, and grants it full administrator privileges.
7. Connecting with the client¶
- In your World of Warcraft 1.12.1 folder, open the
realmlist.wtffile with a text editor. - Replace its content with:
(If your server is on a different machine, use that machine's IP address.)
set realmlist 127.0.0.1 - Save the file.
Launch the game and login with the account you just created.