AzerothCore
Pages :

AzerothCore Debian 12 Install Guide

This is a quickstart guide for installing AzerothCore to a Debian 12 server, securing it, and enabling one-command maintenance from your Windows PC.

Table of Contents

Requirements

PuTTY
  • A Windows program for sending commands to the server.
Debian 12
  • A server with Debian 12 installed. (ex: 4gb/4core VPS from OVH)

Optional

FileZilla
  • A Windows program for transferring files to/from the server. Used during SSH Setup to copy the generated key file to your PC.
HeidiSQL
  • A Windows program for connecting to the servers SQL database. Not used in this guide. If you want to connect to your database using HeidiSQL, read this

Debian Setup

First Login

  • Use PuTTY to connect to your Debian server using the IP address and login credentials supplied by the hosting provider. (If you are logging in as root, first create a new user with sudo privileges and switch to it.)
  • Copy the following code blocks and paste them into the PuTTY terminal with right click, then hit enter.

Change Default SSH Port

sudo sed -i 's/^#Port 22\+$/Port 55022/' /etc/ssh/sshd_config
sudo systemctl restart sshd
  • Remember to use 55022 as the SSH port from now on.

Setup Firewall

sudo apt install ufw
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow 55022
sudo ufw allow 3724
sudo ufw allow 8085
sudo ufw enable

Get Dependencies

sudo apt update && sudo apt install git cmake make gcc g++ clang libssl-dev libbz2-dev libreadline-dev libncurses-dev libboost-all-dev lsb-release gnupg wget p7zip-full screen fail2ban -y

Get MySQL

mkdir -p ~/mysqlpackages && cd ~/mysqlpackages
wget https://dev.mysql.com/get/mysql-apt-config_0.8.32-1_all.deb
sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config_0.8.32-1_all.deb
sudo apt update && sudo apt install libmysqlclient-dev mysql-server -y
sudo mysql_secure_installation
  • Validate password component: N
  • Change the password for root: N
  • Remove anonymous users: Y
  • Disallow root login remotely: Y
  • Remove test database: Y
  • Reload privilege tables: Y

Setup SQL Database

sudo mysql -u root -p
  • Enter the root password you set in the previous step.
DROP USER IF EXISTS 'acore'@'localhost';
CREATE USER 'acore'@'localhost' IDENTIFIED BY 'SQLPASSWORD';
GRANT ALL PRIVILEGES ON * . * TO 'acore'@'localhost';
CREATE DATABASE `acore_world` DEFAULT CHARACTER SET UTF8MB4 COLLATE utf8mb4_unicode_ci;
CREATE DATABASE `acore_characters` DEFAULT CHARACTER SET UTF8MB4 COLLATE utf8mb4_unicode_ci;
CREATE DATABASE `acore_auth` DEFAULT CHARACTER SET UTF8MB4 COLLATE utf8mb4_unicode_ci;
exit
  • Change SQLPASSWORD to something more secure.

SSH Setup

This is an optional step that involves creating a key file and disabling password-based SSH logins to increase security of the Debian server and SQL database.

Key Generation

Debian Public Key

ssh-keygen -t ed25519 -C "Debian12"
cat ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keys

Windows Private Key

  • Use Filezilla to connect to the server and navigate to home/USERNAME/ssh/
  • Copy the id_ed25519 file to your PC and load it into puttygen.exe (located in the PuTTY folder)
  • Generate a private key .ppk file. Store this file somewhere safe and make a backup.

Key-based Login Setup

PuTTY

PuTTY1 PuTTY2

FileZilla

FileZilla

FileZilla

HeidiSQL

HeidiSQL12 HeidiSQL2

Disable Password Logins

  • After confirming that key-based login works, disable password logins.
sudo sed -i -E 's/#?PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
sudo rm /etc/ssh/sshd_config.d/*
sudo service ssh restart

AzerothCore Installation

Clone Repository

git -C ~/ clone https://github.com/azerothcore/azerothcore-wotlk.git --branch master --single-branch azerothcore

Add Anticheat Module

git -C ~/azerothcore/modules clone https://github.com/azerothcore/mod-anticheat

Get Data Files

mkdir -p ~/server/data && cd ~/server/data
wget https://github.com/wowgaming/client-data/releases/download/v16/data.zip
7z x data.zip && rm data.zip

Build Core

mkdir -p ~/azerothcore/build && cd ~/azerothcore/build
cmake ../ -DCMAKE_INSTALL_PREFIX=$HOME/server/ -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DWITH_WARNINGS=1 -DTOOLS_BUILD=db-only -DSCRIPTS=static -DMODULES=static
make -j $(nproc) install

Edit Configs

cp -n ~/server/etc/authserver.conf.dist ~/server/etc/authserver.conf
cp -n ~/server/etc/worldserver.conf.dist ~/server/etc/worldserver.conf
cp -n ~/azerothcore/modules/mod-anticheat/conf/Anticheat.conf.dist ~/server/etc/Anticheat.conf 
sudo sed -i -E 's|^DataDir = .*|DataDir = "/home/USERNAME/server/data"|' ~/server/etc/worldserver.conf
sudo sed -i -E 's|^LogsDir = .*|LogsDir = "/home/USERNAME/server/logs"|' ~/server/etc/*.conf
sudo sed -i -E 's/= "127.0.0.1;3306;acore;[^;]*;/= "127.0.0.1;3306;acore;SQLPASSWORD;/' ~/server/etc/*.conf
  • Change USERNAME to your Debian user.
  • Change SQLPASSWORD to the password for the acore database user.

Launch Server

mkdir -p ~/server/logs
screen -AmdS auth ~/server/bin/authserver
screen -AmdS world ~/server/bin/worldserver
screen -r world

Create GM account

account create USERNAME PASSWORD
account set gmlevel USERNAME 3 -1
  • Detach from the worldserver screen with Ctrl+A -> Ctrl+D

Set Realm IP

sudo mysql -u acore -p
  • Enter the password for the acore database user.
UPDATE acore_auth.realmlist SET address = '0.0.0.0' WHERE id = 1;
exit
  • Change 0.0.0.0 to the public IP address of your Debian12 server.

Finish!

  • You should now be able to log into AzerothCore by setting your realmlist to the public IP address of the Debian12 server. ex: set realmlist 0.0.0.0

Maintenance

Create Alias Command

touch ~/.bash_aliases
echo "alias acoreupdate='
screen -S world -p 0 -X stuff "saveall^m";
screen -X -S "world" quit;
git -C ~/azerothcore/modules/mod-anticheat pull;
git -C ~/azerothcore pull;
cd ~/azerothcore/build;
cmake ../ -DCMAKE_INSTALL_PREFIX=$HOME/server/ -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DWITH_WARNINGS=1 -DTOOLS_BUILD=db-only -DSCRIPTS=static -DMODULES=static;
make -j $(nproc) install;
screen -AmdS world ~/server/bin/worldserver;
screen -r world;'" > ~/.bash_aliases
source ~/.bashrc
  • Now we can save/exit the worldserver, pull the latest changes from GitHub, build the updated core, and restart the worldserver all with one command.

Update AzerothCore

acoreupdate

Common Problems

Auth/Worldserver wont even start.

Successful login but cant enter the realm.


Good things to know that this guide does not cover.
  • Domain name and DNS setup for "set realmlist logon.server.com"
  • Wordpress registration site & acore-cms plugin SOAP connection.
  • Automated database backups to Google Drive using cron and rclone.

Other Resources