Jump to content
  • We are looking for staff for the Wiki area!
    If interested please
    click here and select "Documentation Team"

  • Sign in to follow this  

    linux Installing Mangos on Debian 9 or a Debian based Distribtion


    I tested this on Debian 9.6 however this guide should work on any recent Debian distribution such as Ubuntu.

    Required Packages

    First we need to install all of the required programs and library's.

    Open up a root terminal. If your not root, enter this to become root

    sudo su

    Install the following packages

    apt install git make cmake libssl-dev libbz2-dev build-essential default-libmysqlclient-dev

    We need to grab the mysql stuff from here. Follow the instructions there. Also, choose mysql 5.7. A script needed later requires this so don't install mysql 8. Install the server with

    apt install mysql-server

    You also need to grab and compile libace. You can get it from here. Extract it and read the instructions.They're pretty straight-forward. It should be named 'ACE-INSTALL.html' or something similar.

    When thats done, enter this command. I highly recommend doing this even if your just keeping the server to yourself


     I suggest these options:

    Don't use the password plugin
    Change the root password
    Remove the anonymous user
    Disable remote access for root
    Remove the test database
    Reload privileges

    Restart your system with

    init 6

    Getting the Mangos source code

    Now we need the source code for mangos. Open up a terminal as root and go to the home directory:

    cd ~

    Lets create a root directory for all of the mangos files

    mkdir mangos

    Now we clone the source code. Mangos servers above two are unstable or incomplete. Don't be surprised if something doesn't work or is missing.

    git clone https://github.com/mangoszero/server.git --recursive --depth 1

    For the database

    git clone https://github.com/mangoszero/database.git --recursive --depth 1

    If you want a different server(say mangos one), simply change the url. For example

    git clone https://github.com/mangosone/server.git --recursive --depth 1

    For the mangos one server. If you want mangos two, simply do the same. Do the same with the database.

    Wait for the repos to be cloned (the server is about 200-250mb-ish)


    The good part. Enter the mangos source directory

    cd server

    Make a new directory for the build files.

    mkdir build

    Go into it

    cd build

    Now run this to configure the makefiles

    cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/bin/mangos

    If cmake doesn't complain about anything, your good to go with compiling it.  To speed up compilation, you need to know how many cores your cpu has. Most cpus have 2 or 4 cores. Search it up if your not sure. Now to compile it, simply enter this

    make -j2

    Change -j2 to how cores you have. If you have 4 cores, change it to

    make -j4

    If you only have one core, don't bother with the -j flag, just type in 'make' and hit enter.

    This will take a while depending on how fast your cpu is. Just be paitent.

    After a bit, mangos will be compiled(yay)and you will need to separate the needed files from the source code. To install it into your install prefix(default is /usr/local/bin/mangos), do this

    make install

    Database Setup: The Sequel
    Now for another database setup (i know, its crazy). This time, we will be loading some stuff into it. Enter the database folder you cloned earlier and execute InstallDatabases.sh


    If it says something similar to 'bash: ./InstallDatabases.sh: Permission denied', the script isn't marked as executable. Mark everything needed as executable by running this

    chmod -R +x *.sh

    Now have a go at running the script again. When execute it, you'll be brought to a menu. The defaults are fine for a new server so just press 'n' and hit enter

    You will have to give it your mysql details. This needs to be your server hostname(ip address), username, password and server port. The only things you need to change are the username and password. Keep in mind all of this must be done as the ROOT user.

    Game Data

    Now this is the longest part if decide to get mmaps. To run the server, you MUST extract the .dbc and .map files. To do this, copy everything in the tools folder to where your wow client is. Keep in mind the version of the client as it must be a specific version for this(mangoszero is a bit more lenient then others). You need 1.12.x (x can be any number) for mangoszero, 2.3.4 for mangosone, 3.3.5 for mangostwo(favourite), 4.3.4 for mangosthree and 5.4.1 for mangosfour. To extract the data, execute 'ExtractResources.sh'


    Server Configuration

    Now to configure the server. Go to the mangos configuration folder

    cd /usr/local/bin/mangos/etc

    Copy the files to their proper name. DON'T delete them. They're a backup in case your .conf files get corrupted.

    cp mangosd.conf.dist mangosd.conf
    cp realmd.conf.dist realmd.conf

    Edit realmd.conf and find the line 'LoginDatabaseInfo', change the information to suit your database. For example if my database hostname is localhost or, the port is 3306, username is root, the password is mangos and my realm database is realmd, it would look like this

    LoginDatabaseInfo = ";3306;root;mangos;realmd"

    Save the file and edit mangosd.conf. Look for lines, LoginDatabaseInfo, WorldDatabaseInfo and CharacterDatabaseInfo. Do the same to those lines as you did to the one in realmd.conf. You may wish to fully read mangosd.conf to fine-tune your server if you wish.

    Save the file.

    Starting the Server

    Now to see if your hard work has paid off. Go to where you installed the server and start realmd


    Now start mangosd


    If theres a error mangosd or realmd can't fix, it'll tell you problem then exit. It will be up to fix it however. The most common problem is that the password or username is wrong. Try editing mangosd.conf or realmd.conf if thats the case.

    If it started and gives you a prompt, the server is loaded and awaiting a connection from a client.

    Starting the server with systemd

    This allows you to startup your computer and have mangosd and realmd load with it. Very useful on a dedicated server. We need to make 2 .service files to do this.

    touch /etc/systemd/system/mangosd.service
    touch /etc/systemd/system/realmd.service

    Edit mangosd.service with your preferred text editor. Don't type 'edit /etc/systemd/system/mangosd.service' unless you know how to quit vi.

    Description=WoW server
    After=network.target mysql.service
    ExecStart=/usr/local/bin/mangos/bin/mangosd -c /usr/local/bin/mangos/etc/mangosd.conf

    Do the same with realmd.service

    Description=WoW server
    After=network.target mysql.service
    ExecStart=/usr/local/bin/mangos/bin/realmd -c /usr/local/bin/mangos/etc/realmd.conf

    Let systemd reload.

    systemctl daemon-reload

    Start realmd via systemd to see if the .service file is valid

    systemctl start realmd

    Do the same with mangosd

    systemctl start mangosd

    Check the status of both services with

    systemctl status realmd
    systemctl status mangosd

    If it's working, you should see something like a green OK on both daemons (fun fact: daemons and services are the same thing) then you should be good to enable them at startup. Do this for realmd

    systemctl enable realmd
    systemctl enable mangosd

    Restart your system

    init 6

    Check that they started as root

    systemctl status realmd

    Do the same with mangosd

    If its good then mangosd and realmd will always start with your system until you disable them.

    Letting WoW clients connect to your server
    This is the 2nd last thing you need to do. This will allow WoW clients to connect to your server. We need to edit a table in the database. If you know what your doing with mysql, follow along but do the equivalent on the terminal. If you prefer doing things with a gui(graphical user interface, your using one right now!), lets install a gui mysql client. We'll use 'mysql-workbench'

    apt install mysql-workbench

    After its installed, check your start menu in 'Programming'. Start mysql workbench and click on your server. Enter your password and look on the lower left. Click on the little arrow next to realmd and scroll down to realmlist. Right click on it and click on 'Alter Table'. Go down to localAddress and double click on the ''. Change this to your lan ip. You can find out your lan ip by opening a terminal and typing in


    You will see about 4-5 interfaces. If your connection is a wired one, you should look at a interface named 'enp' followed by letters and numbers. For example, 'enp14s0'. Then look at the 'inet' part. This is your lan ip. Do the same if your connection is wireless or wi-fi. Wireless connections will be named like 'wlp' with some letters and numbers. 'wlp20s0' is a example.

    Once you have changed localAddress to your lan ip, you need to change address to your external ip. Go here to find out your ip. Now we need to let realmd know that the database has changed. Stop it with

    systemctl stop realmd

    Now start it again with

    systemctl start realmd

    Connecting a WoW client to your server

    Nearly there! Go to where your wow client is and look for a file named realmlist.wtf. Delete everything in this file and put the following stuff in it

    set realmlist
    set patchlist

    Change to your server ip. It can be the lan ip if its on the same network as the server. Now for the moment of truth. Open up WoW.exe(not the launcher)and wait for it to load. Skip the cinematic if want by pressing escape(esc). Now login into the server by using administrator as the email and no password.  Choose the only realm and create your character. You now have a functioning WoW server for you and your friends to play on! Also, since you logged in using the admin account, you can use game master commands. Type in the chat '.gm help' for a list of commands currently in mangos. Have fun with it!

    Sign in to follow this  

    User Feedback

    Recommended Comments

    Thanks for the guide got stuck at:

    The error was that I did not have the CMAKE_CXX_COMPILER

    cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/bin/mangos


    sudo apt-get update
    sudo apt-get install build-essential

    The error was that I did not have the MYSQL dev libs and headers, in case anyone else has this issue on a headless Debian 9


    cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/bin/mangos


    sudo apt-get install default-libmysqlclient-dev


    Edited by Stu Art

    Share this comment

    Link to comment
    Share on other sites

    It should be in where you installed it under tools. For example, if mangos is installed in /home/onixiya/mangos0 it will be at /home/onixiya/mangos0/tools

    Share this comment

    Link to comment
    Share on other sites

    Hello sir! Sorry for such inconvenience. But now I get an error message when start ./mangod . The ./realmd starts flawlessly. But I get this message when running ./mangosd:



    The table `db_version` indicates that your [Character] database does not match the expected structure! 

    [A] You have database Version: 21
                          Structure: 2
                            Content: 2
                        Description: Remove field from dbDocs

      You need database Version: 21
                          Structure: 4
                            Content: 1
                        Description: Add_Field_Comments

    You must apply all updates after [A] to to use MaNGOS with this database.
    These updates are included in the database/Character/Updates folder.



    How can I apply those updates? Thanks a lot!

    Edited by Fernando Oliveira

    Share this comment

    Link to comment
    Share on other sites

    Now this is the longest part if decide to get mmaps. To run the server, you MUST extract the .dbc and .map files. To do this, copy everything in the tools folder to where your wow client is. Keep in mind the version of the client as it must be a specific version for this(mangoszero is a bit more lenient then others).

    Hello, could you be more specific about the game data please ?

    I created a Debian 9.8 VM with VirtualBox on my Win 10 PC. I followed your steps until this one, I'm a bit at a loss to what should I do now ? Do I have to copy the files from my Wow client to my Debian VM ?
    If yes, wich files from the Wow client and where on the Linux VM ?

    Thank you for your tutorial, I hope I will be able to run a few tests before classic release 🙂




    Share this comment

    Link to comment
    Share on other sites

    Also if you installed the guest stuff on it, you should be able to link the folder from windows to your vm. No copying necessary

    Share this comment

    Link to comment
    Share on other sites

    [email protected]:~# apt install git make cmake libssl-dev libbz2-dev build-essential default-libmysqlclient-dev
    正在读取软件包列表... 完成
    正在读取状态信息... 完成
    没有可用的软件包 libbz2-dev,但是它被其它的软件包引用了。

    没有可用的软件包 default-libmysqlclient-dev,但是它被其它的软件包引用了。

    E: 软件包 libbz2-dev 没有可安装候选
    E: 软件包 default-libmysqlclient-dev 没有可安装候选

    Share this comment

    Link to comment
    Share on other sites

    database isn't installing properly :/ i've tried five times now with a fresh database install, updates, everything. the updates don't work, keeps saying "update skipped". and when i try running mangosd, it tells me i'm missing quest 8332 text and revision refactor.

    Share this comment

    Link to comment
    Share on other sites

    Try applying the update manually. Open up your mysql client and log in. Now notice what file is above when it says, "update skipped". Open that file with a text editor like nano and copy everything in it. Now paste it in editor on workbench(or whatever your preferred client is) and execute it. If it fails for some reason, show the results here.

    Share this comment

    Link to comment
    Share on other sites

    No, sorry. But from what i heard, it's pretty similar to mysql so try following the same things. Otherwise, i'm sure the forums will be able to help you

    Share this comment

    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

Contact Us

To contact us click here
You can also email us at [email protected]

Privacy Policy | Terms & Conditions


The Link to the master list
of MaNGOS repositories:
Copyright © getMaNGOS. All rights Reserved.

This website is in no way associated with or endorsed by Blizzard Entertainment®
  • Create New...