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

  • Installing Mangos on Windows (Manually for Zero, One and Two)


    Since there's currently no tutorial in full for compiling and setting up a MaNGOS server on Windows, I'm brushing off the old dev21 build guide and updating it to be relatively current. If something needs to be changed, let me know and I'll do so.


    NOTE : Always use 64-bit version of dependencies where possible. There is no reason to compile and run the server in 32-bit mode unless you are restricted by OS or hardware.



    For the sake of this tutorial we will be using Mangos Zero, but the same steps apply for One and Two. Change the GitHub links below accordingly.

    Create a folder named "Source" anywhere on your computer. This is the folder we will use to download the server and the database.

    Right click on the "Source" folder and click "Git Bash Here".

    Once the command prompt window opens, type in the following command and hit enter :

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

    This clones t he source as well as the submodules into the folder "Source/server". Once this is done, keep the command line window open and type the below command and hit enter :

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

    You should now have the database cloned to "Source/database", and you can close the command line window.



    To generate the build files, which is what we will use to compile the server itself, open the CMake software you have previously installed on step 1.

    You now have two fields you need to fill in. Specifically :

    • "Where is the source code : "  In this field, you point to the "Source/server" folder you created earlier. (See below for example).
    • "Where to build the binaries : " For this tutorial, we will use the same "Source" folder, however specify a new folder within "Source" and call it "build". (See below for example).


    After you have filled in both of these fields, hit "Configure".

    This will also prompt you which compiler to use! Make sure you select the correct compiler !

    If you for some reason change any of the default values after configuration, you need to click "Configure" again BEFORE going to the next step.

    Once configuration is done, hit "Generate".

    If this finished without any errors, proceed to the next step. If you did however receive any errors, most likely you are missing one of the dependencies, have pointed to the wrong folders or selected the wrong compiler. Usually the error message you receive will make enough sense for you to isolate the issue. If not, make a new thread and provide the full output showing the error.



    Once the build files are generated, either click the Open Project button next to Generate, or go to your "Source/build" folder and open the file MaNGOS.sln. This will open Visual Studio and you build your server like normal. I would recommend to compile the core in Debug mode (default) as that will provide you with crash dumps should the core crash for whatever reason, making it easier for us to help you debug.

    Once the core is done compiling, the server binaries, tools etc is located inside the "Source/build/bin/" folder, under either Debug or Release, depending on your choice.

    Copy the following files to wherever you want to run the server from. For the sake of this tutorial, make a new folder somewhere on your computer and call it "Server".

    • lua_scripts folder
    • ace.dll
    • ahbot.conf.dist
    • libmysql.dll
    • mangosd.conf.dist
    • mangosd.exe
    • realmd.conf.dist
    • realmd.exe

    If you compiled in Debug mode, also copy the following files to the "Server" folder.

    • ace.pdb
    • mangosd.pdb
    • realmd.pdb

    If the core built successfully, move to the next step. If you have any compile errors, please post a full log displaying the error messages. Warnings can be ignored for now.



    NOTE: Tools should ALWAYS be compiled under Release mode, unless you are told otherwise during support. Debug tools will take A LONG TIME. You have been warned.

    Inside the "Source/build/bin/" and either Release or Debug folder there will be a folder named "Tools". Enter this folder and copy the following files:

    • ExtractResources.sh
    • make_vmaps.bat
    • map-extractor.exe
    • mmap_exclude.txt
    • MoveMapGen.sh
    • movemap-generator.exe
    • offemsh.txt
    • vmap-assembler.exe
    • vmap-extractor.exe

    Paste these into your WoW directory and run ExtractResources.sh. Follow the prompts to extract.

    This can take a LONG time depending on your computer.

    Once this is complete, copy the following folders to your "Server" folder.

    • dbc
    • maps
    • mmaps
    • vmaps



    Enter the database folder located at "Source/database"

    Run InstallDatabases.bat and follow the on screen prompts to install the base database. Do mind, this database is the base database and will require you to run updates accordingly.

    The updates can be found in the separate folders inside "Source/database", specifically "Character", "Realm" and "World".

    The server will always notify you when you run the server files from the "Server" folder whether your database is up to date or not.

    If updates are required, apply them using your preferred SQL tool, like sqlyog, heidisql etc.

    NOTE : It is not a problem if runnign server with a higher DB content version.



    Once all the above steps are complete, you are ready to configure your server and start playing !

    Go to your "Server" folder copy and and rename the following files :

    • ahbot.conf.dist -> ahbot.conf (This file is optional, depending if you want to use the AH bot or not!)
    • mangosd.conf.dist -> mangosd.conf
    • realmd.conf.dist -> realmd.conf

    Open mangosd.conf and edit lines 66, 67 and 68 to reflect your database information.

    Open realmd.conf and edit line 110 to reflect your database information.

    All other edits to the config files are completely optional.

    At this point your server should be completely operational for a local test. If you have any other questions or require further support, please feel free to create a new thread for your specific issues on teh appropriate section (not on commenting this post).

    User Feedback

    Recommended Comments

    Sample CMake/Generate command:


    cmake "$rootDir/$coreName/server" -DCMAKE_INSTALL_PREFIX="$rootDir/$coreName_install" -B "$rootDir/$coreName_build" -G "Visual Studio 16" -A x64;

    Sample, optional, non-string CMake parameters:



    Sample VS build command:


    MSBuild "$rootDir/$coreName/server_build/MaNGOS.sln";


    Link to comment
    Share on other sites

    more detailed about my problem can be found here


    my problem in short is this error


    23>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: The command "setlocal
    23>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: "C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake
    23>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
    23>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmEnd
    23>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
    23>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmErrorLevel
    23>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: exit /b %1
    23>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmDone
    23>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd
    23>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :VCEnd" exited with code 1.
    ========== Rebuild All: 20 succeeded, 3 failed, 1 skipped ==========

    so my problem i cant find the next folder!! on this exact step 


    Once the core is done compiling, the server binaries, tools etc is located inside the "Source/build/bin/" folder, under either Debug or Release, depending on your choice.

    Source/build/bin/" folder doesnt exist at all! 


    this link above shows my files

    also i would appreciate for you to confirm HOW this step is


    This will open Visual Studio and you build your server like normal. I would recommend to compile the core in Debug mode (default)

    as im complete noob on this topic

    What i have done? i went like this i assume its the right way after ALOT of research!

    from microsoft visual studio - 2015 on the bar "build>>Rebuild Solution" 

    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

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use