Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Mangos How To Make a MaNGOS Server Easily (Windows)

Lord of the Legion
Joined
Jul 28, 2005
Messages
426
Reaction score
35
How To Make a MaNGOS Server Easily (Windows) - Updated 1/2015

Preamble
I try to keep this guide as up-to-date as possible although over time, some details may become outdated. If you find something has changed, please notify me and I will fix it as soon as possible. Please note this guide DOES NOT contain information for dealing with mmaps. I have not tried mmaps yet and they take hours (Can be even a day on slow computers) to extract.

A lot of guides I've read contain a whole lot of useless or overly technical information. This is not needed in any way shape or form. So here is a better guide. How to properly and easily download, compile and setup a MaNGOS server of any version using YTDB.

Why compile your own server? This way you know it is absolutely up-to-date, contains no malicious crap from little kiddies screwing around and will actually work.

Needed Tools


(I'll explain the installation later)
An SQL DB editor (I'll be using ).

Downloading MaNGOS
Once you've installed all the programs mentioned in the above section, needed tools. Go ahead and open up GIT Bash (Not GIT GUI). First we need to change the directory. Type cd /c to change it's working directory to the root of your C: drive, otherwise it will download it all the way in your root user folder. Now we can download the latest MaNGOS. Type git clone git://github.com/mangostwo/server.git mangos. Let it finish and close GIT Bash. Your server should now be located in C:\mangos.

Downloading Scripts Library
NOTE: Some versions of the MaNGOS core have the scripts library already built in. If you do not have a C:\mangos\src\bindings folder, skip this step.
Do the same as you did for downloading MaNGOS but type git://github.com/mangostwo/scripts.git ScriptDev2

Compiling MaNGOS
Open C:\mangos\win\. Open mangosdVC100.sln in Visual Studio Express C++ 2010. Once it loads, go to Build>Configuration Manager now change the Active solution configuration to Release and the Active solution platform to Win32 and click Close. Now go to Build>Rebuild Solution. It will seem like it's doing nothing if you do not have the Output window enabled (Ctrl+Alt+O). It will take a while to compile.

Compiling ScriptDev2
STOP. Do not do continue until MaNGOS has finished compiling. If you continue on, your server will not work.
NOTE: Some versions of the MaNGOS core have the scripts library already built in. If you do not have a C:\mangos\src\bindings folder, skip this step.
Once MaNGOS has finished compiling, copy the your ScriptDev2 folder you downloaded to C:\mangos\src\bindings. This step is pretty much the same at compiling the core. Open scriptVC100.sln in the ScriptDev2 folder. Go to Build>Configuration Manager now change the Active solution configuration to Release and the Active solution platform to Win32 and click Close. Now go to Build>Rebuild Solution. This will also take a little while.

Setting Up MYSQL
This part is relatively easy. Install MYSQL, when it asks you about setting up an instance. Go to Standard Configuration then click Next. Make sure Include Bin Directory in Windows PATH is unchecked. Click Next. Set up your password. It doesn't matter what it is. Most people use root as their password and click Next and let it set itself up.

Setting up the Database
Open Navicat. Go to Connection>MYSQL. Type anything for Connection Name. Type localhost for Host Name/IP Address and 3306 for Port. Type root for User Name (MYSQL uses root for the root user) and whatever your password is. Click OK and connect to the SQL server over in the sidebar by double clicking the connection. Click on User and go to New User. For User Name type mangos, localhost for Host and mangos for the Password and click Save. Now your MaNGOS server can, by default settings, properly connect to the SQL server.

Creating Databases
Now right click on your SQL connection in the sidebar and click Execute SQL file and browse to C:\mangos\sql\. Open mangos.sql and click Start. Let it finish and click Close. Repeat that step with characters.sql and realmd.sql. Now we need to set up ScriptDev2's database. Do the same as before but browse to C:\mangos\src\bindings\scriptdev2\sql\ and open scriptdev2_create_database.sql, execute it and then run scriptdev2_create_structure.sql.

Populating Databases
Now that we have our databases set up. We need to populate them. There are different ways we can do this but for this we'll use the default YTDB database. Open up GIT Bash and do as before but type git clone git://github.com/mangostwo/database.git database. Now run install_Windows.bat and press Enter 3 times until it prompts you for your password. Type mangos and press Enter twice more and then type y and wait for it to finish. Now we need to add ScriptDev2's database. Open up Navicat and right click your mangos database (Not the connection) and click Execute SQL File. Browse to:
1a. If scripts are not built in: C:\mangos\src\bindings\scriptdev2\sql\ and execute mangos_scriptname_full.sql.
1b. If scripts are built in C:\mangos\sql\scripts_sql\ and execute mangos_scriptname_full.sql.
Now in the ScriptDev2 database, execute scriptdev2_script_full.sql. Now comes the most annoying part it my opinion. We need to update the databases. In Navicat, open up the mangos database and go to Tables and open the db_version table. The last field should say something like required_blahblah. Remember what it says. Now right click the database and click Execute SQL File and browse to C:\mangos\sql\updates\ find that file name that we needed to remember (Make sure names are assorted ascending), execute the next file. Make sure the next file says mangos and not realmd or character. Then execute the next file and so on and so forth until you are at the latest file. Look for the same table in both realmd and characters and do the same. Usually you wont need to update characters or realmd. Note if you do not do these steps, the server will not work.

Extracting DBC, Maps & VMaps
First browse to C:\mangos\contrib\extractor_binary\, if there are no executables in this folder, you will need to get the individual files from the other folder, as described below.
Browse to C:\mangos\contrib\extractor\release\ and copy ad.exe to your root World of Warcraft installation folder. Then go to c:\mangos\contrib\vmap_assembler\ and copy the files to your root World of Warcraft installation folder and do the same with c:\mangos\contrib\vmap_extractor\. Run ad.exe and makevmaps_SIMPLE.bat. Let them finish, it will take a while. Once done, go to C:\mangos\bin\Win32_release\ and make a new folder called Data. Copy the folders dbc, maps and vmaps from your World of Warcraft folder into there.

If ad.exe or the 3 files in \contrib\vmap_extract_assembler_bin\ are not there, scroll down to the Compiling Tools section to learn how to compile them.

Compiling MMaps
MMaps are not required but they make pathing a hell of a lot better but they do take a very long time to extract so if you have a slow computer, be prepared for extraction to take place overnight. I also wrote this based off of SkyFire's mmaps guide rather than MaNGOS but I am assuming it is exactly the same procedure so bear with me if I turn out to be wrong and as always, feel free to correct me if you know something is incorrect.

Browse to C:\mangos\server\contrib\mmap\win and into the folder that corresponds with your version of Visual Studio and run the project file and build it like you would anything else. MMap building requires you to first extract and compile your VMaps, so if you haven't done that yet, do it. After building the VMaps, you should have a folder called "buildings" in your root World of Warcraft folder. Take all the files from that folder (Not the folder itself, just the files in it) and move them into your VMaps folder and create a new folder inside the VMaps folder called mmaps. Move the compile mmap generator into the VMaps folder as well and run the MMap generator. This process will take a long time.

Configuring Your Server
Browse to \mangos\src\bindings\scriptdev2\ (Or \mangos\src\scripts\) and move scriptdev2.conf.dist.in to \mangos\bin\Win32_Release\. Now remove the .dist.in from mangosd.conf.dist.in and realmd.conf.dist.in and scriptdev2.conf.dist.in. Now open mangosd.conf, scroll down to DataDir = and type "./Data". Scroll down to BindIP = and type "127.0.0.1". LoginDatabaseInfo, WorldDatabaseInfo and CharacterDatabaseInfo should be correct by default if you followed this guide correctly.

You can also customize your server by editing values in mangosd.conf. Every value is explained within the configuration file. Most tutorials explain changes you need to make in the file, fortunately for you, if you followed this guide, you don't need to change anything as we set up the server so, by default settings, we would need to change very little.

Setting Up Your Client
Make sure first you have the proper version of World of Warcraft installed. Now go to \World of Warcraft\Data\enUS\ and open realmlist.wtf in Notepad and change set realmlist and set patchlist to 127.0.0.1.

If you need to update your copy of World of Warcraft, I suggest looking for the patches you need at .

Starting Your Server
Go to \bin\Win32_Release\ and start realmd.exe and mangosd.exe. If it automatically closes, look for a file in that folder named Server.log (If mangosd.exe closed) or Realmd.log (If realmd.exe closed), read what happened. If you cannot figure out the problem, PM me and I will tell you what to do. If they did not close, wait till you hear mangosd.exe make a beep sound. This means it has finished starting.

You can now start World of Warcraft and log in with the username and password administrator Note, never start World of Warcraft through Launcher.exe or it will attempt to update the client.

Compiling Tools
This section is only if ad.exe and 3 files in \contrib\vmap_extract_assembler_bin\ were not there. Go to \contrib\extractor\ and open VC100_AD.sln and go to Build>Rebuild Solution. Once it's finished, ad.exe should be in \extractor\release\. Now go to \contrib\vmap_assembler\ and open vmap_assemblerVC100.sln, rebuild it and do the same with vmapExtractor3_VC100.sln in \contrib\vmap_extractor_v3\win\. Copy the files we just compiled to your World of Warcraft folder and also copy over makevmaps_SIMPLE.bat from \contrib\vmap_extract_assembler_bin\. Now if makevmaps_SIMPLE.bat is not there, create a notepad document, open it and copy the following:

Code:
vmapExtractor3.exe
md vmaps
vmap_assembler.exe buildings vmaps

pause

Save and close it. Change the extension from .txt to .bat and move it to your World of Warcraft folder. Now you can extract the vmaps, dbc and maps.

Additional poop
If I left out anything, please feel free to tell me. If you need help, PM me, I will do my best to help you but for the love of God, please use proper grammar. I hate deciphering what people say when they use broken English or teen texting lingo.

This guide can easily be also used for compiling and setting up non-MaNGOS servers, since setting up most servers is relatively the same.

If you require compiling a 64-bit server, follow the guide but when you compile ScriptDev2 and the MaNGOS core just change the Active solution platform to x64. This will also change the directory of your compiled binaries. They would be in \mangos\bin\x64_Release\. Although please note, as of the latest update to this guide, 64-bit compiles seem to suffer from the god-awful realmlist loop issue and none of the usual suspects cause it.

If you are importing a very large database using Navicat, you may run into a problem where the execution gets stuck at like 70 commands, that's cause Navicat sucks at executing large queries. Here's a simple workaround:

Make a copy of the SQL file you need to execute and put it in C:\Program Files\MySQL\MySQL Server X.X\bin\ (Replace X.X with whatever version folder is in there). Press Win+R to open the Command Prompt and type CD C:\Program Files\MySQL\MySQL Server X.X\bin\ (Replace X.X with whatever version folder is in there) then type mysql -u root -p database_name < FileToExecute.sql, it'll prompt you to enter your MySQL server password (By default it's "root"). It'll only take a couple of seconds this way.

Warning as of 1/2015: I reverted this guide to using MaNGOS instead of CMaNGOS (Originally it was pre-split MaNGOS, then MaNGOS, then CMaNGOS and now MaNGOS again). If you do use CMaNGOS, as far as the script library which I refer to as "ScriptDev2" in this guide, you will need to instead download the real ScriptDev2 from and for the database, you'll need use UDB from , but you can choose to use YTDB as it is compatible.. Everything else is exactly as described in the guide, sans populating the mangos database, which instead I suggest following the tip directly above this paragraph to execute the very large SQL file located in unified-db/Database/Current_Release/Full_DB/, then follow the updating section as described.

Tip for advanced users: If you desire to compile a TrinityCore or SkyFire server, you will need to install (Unfortunately downloading just the MSVC++ 2013 runtime libraries isn't good enough), and . You will need to generate the solution files with CMake before compiling.


Now that's what I call a Ducking guide.
 
Last edited:
Experienced Elementalist
Joined
Aug 13, 2010
Messages
226
Reaction score
5
Can you make some pictures or video Tutorials? :D

I Dont Know How I Can Download This :git://github.com/mangos/mangos.git XD
 
Last edited:
Lord of the Legion
Joined
Jul 28, 2005
Messages
426
Reaction score
35
I'll try to make a video tutorial. Never made one so it might take a few hours, lol.

To download the git, you'll need to run Git Bash (From MSYSGIT).
 
Initiate Mage
Joined
Feb 26, 2011
Messages
1
Reaction score
0
i am having some trouble compiling mangos can you please help me
 
Newbie Spellweaver
Joined
Aug 7, 2004
Messages
22
Reaction score
0
can anybady confirm this guide i think some steps is missing or its not right.
 
Lord of the Legion
Joined
Jul 28, 2005
Messages
426
Reaction score
35
ctcp: The problem is most likely on your end. If you want help, you have to actually post the problem you're having not just a blatant "it's not working."

bolt2100: If you read the tutorial, you'd see it's for both x86 and x64. There is no required operating system. Any NT OS that can run those programs will do. If it were otherwise, I would have specified clearly.

bdogod: See first reply. If you need help, post the problem or in your case, the error that was output during the compile.
 
Last edited:
Joined
Aug 19, 2010
Messages
2,737
Reaction score
2,603
Firstly, thank you very much for this guide. Quite easy to understand, even for a beginner like myself.

And now, onto my problem, with which I require some assistance please.

a.) When compiling MaNGOS I get a "cannot open input file kernel32.lib" error, as well as "cannot open input file ws2_32.lib".

Darkicon - How To Make a MaNGOS Server Easily (Windows) - RaGEZONE Forums



b.) When compiling ScriptDev2 I get "cannot open input file kernel32.lib" error, as well as "cannot open input file mangosd.lib"

Darkicon - How To Make a MaNGOS Server Easily (Windows) - RaGEZONE Forums


Any advice would be greatly appreciated.
 
Last edited:
Newbie Spellweaver
Joined
Jan 16, 2011
Messages
83
Reaction score
8
when compiling mangos 1. open c:\mangos\win\ = cannot find incorrect file path.

2. open mangosdVC100.sin in visual studio express c++ 2010 = cannot find incorrect file path.
 
Lord of the Legion
Joined
Jul 28, 2005
Messages
426
Reaction score
35
Kreeate: Take a look at this, maybe it will help:

jh281978: Are you saying you could not find the path or files? If you followed the step for downloading Mangos via GIT exactly, the path should be c:\mangos\. Are you sure you did a change directory to C: (cd \c) in GIT prior to downloading mangos?. If not, the folder will be in your user folder (C:\Users\<Name>\)
 
Last edited:
Joined
Aug 19, 2010
Messages
2,737
Reaction score
2,603
Thanks again. The microsoft links refer to older versions of Visual Studio.
The setup/configuration has changed since then and thus the help offered there is not really solving my problem. I'll let it be on my laptop for a while and try the same procedure on my desktop PC. That way I could at least eliminate (or confirm) the possibility of the problem being with my system.

Will post my findings back here.
 
Last edited:
Newbie Spellweaver
Joined
Jan 16, 2011
Messages
83
Reaction score
8
nope followed it all but when i look into the file folder the win folder sits in another folder not directly in the mangos folder. Also when looking through the folders for the file i couldn't find it all i found was VC100_AD.sin

but i will try again from the beginning to see if i did something wrong. i'll let you know lol.


oh yes another issue i was having was my C++ visual will not allow me to choose x64 only Win32 or another x32 application for the active solution platform.
 
Last edited:
Joined
Aug 19, 2010
Messages
2,737
Reaction score
2,603
Read the bit under "Additional poop"

"If you require compiling a 32-bit server, follow the guide but when you compile ScriptDev2 and the MaNGOS core just leave the Active solution configuration and Active solution platform at Win32. This will also change the directory of your compiled binaries. They would be in \mangos\bin\Win32_Release\."
 
Lord of the Legion
Joined
Jul 28, 2005
Messages
426
Reaction score
35
nope followed it all but when i look into the file folder the win folder sits in another folder not directly in the mangos folder. Also when looking through the folders for the file i couldn't find it all i found was VC100_AD.sin

but i will try again from the beginning to see if i did something wrong. i'll let you know lol.


oh yes another issue i was having was my C++ visual will not allow me to choose x64 only Win32 or another x32 application for the active solution platform.

That is strange. I don't know what that file is. The \win\ folder should only have 3 VS solutions (VC80, VC90, VC100) and a folder for each containing all the data for building.

As far as the building problem, I'm just gonna take a guess and say you're using a 32-bit processor and that's why it won't allow you to build a 64-bit-native application. I'd check myself but I'm running a 64-bit processor with a 64-bit OS. But if you are running 64-bit, compiling the emulator in 32-bit shouldn't cause any problems since 32-bit programs are compatible with 64-bit, just not the other way around. Only very few 32-bit programs will not work or be buggy in 64-bit (Antivirus and drivers mostly).

You can verify all your files by looking through here:
 
Last edited:
Newbie Spellweaver
Joined
Jan 16, 2011
Messages
83
Reaction score
8
ok i got it figured out im at the maps stage got everything in it was connecting last night but now it will not connect even through navicat. lol well ill go back trough to see what happend lol.

ok got it connected just having to download client patches, and update maps, vmaps, & dbc accordingly should be up soon. :) Thanks.
 
Last edited:
Initiate Mage
Joined
Apr 26, 2011
Messages
1
Reaction score
0
Big thanks :) Works perfect for me but only in step [Compiling MaNGOS > Active solution platform] I used 32bit compiling method because, I don't know why, x64 didn't work.
 
Newbie Spellweaver
Joined
Jan 16, 2011
Messages
83
Reaction score
8
ok i got it all patched getting ready to log in, how do i make other accounts for this test server so my family can get on to it as well?

ok im in looks good Thanks for the tut.
 
Last edited:
Back
Top