How to create WoW Private Server using Mangos

This guide is about creating a WoW Private Server (WOTLK) using Mangos. And because previously we’ve learned on how to compile mangos obviously the next step would be setting up Mangos which is going to be covered in this guide :)


World of Warcraft Client version 3.3.3 (11723) or the latest version that Mangos support as stated on Mangos project description here

This guide is tested on WoW 3.3.3a client, and as long as the WoW client is supported by Mangos, it’ll work, although you might need to make some adjustment to several things listed in this guide, like the filename for example


If you currently don’t have MySQL installed on your computer, please follow my previous guide on how to install MySQL on Windows XP or how to install MySQL on Windows Vista or Windows 7

Compiled Mangos Binary / Executable

Check my previous mangos compile guide because without the binary / executable itself, you won’t be able to run your own WoW private server. And beside this guide is based on my mangos compilation guide. So if you follow my previous guide completely (including the directory structure) then it’ll make thing easier for you


This is needed in order to get the database for Mangos, as for the installation process i’ve described it on the compile guide. So if you follow the previous compile guide then you don’t need to reinstall it again

UDB and ACID Database

UDB and ACID is required so you can see NPC and doing quest in the WoW World, see below for instruction to get UDB and ACID

Downloading UDB and ACID

The first step is obviously downloading the required database in order for your WoW server to function as it should be, to do this we’re going to use TortoiseSVN to fetch the required files

1. Open Windows Explorer and right click on an empty space then choose SVN Checkout and type

as the repository address

udb svn co udb done

2. After finished with the above process, wow we need to download SD2 ACID. Type

as the svn repository url

sd2 acid svn co sd2 acid done

And now we’re done with the requirements

Initial Setup

Creating Directory Structure

Create new folder in C:\ named WoW and inside the WoW directory you just created, create two directories named data and mangos. So it’ll look like this

creating directory structure

Although this step can be considered non essential, but if you created a directory structure, it can make upgrading Mangos and the required files such as DBC and Maps much easier later and beside in this guide i’m using the directory structure specified here so other than that it can make things easier for you to follow this guide

Extracting DBC, Maps and VMaps

1. Copy the ad.exe from contrib directory inside your mangos compile directory (on my compile example, the mangos compile directory is C:\Mangos-git) into your WoW installation directory. Then run the ad.exe and when it’s done you’ll see two new folders created named DBC and Maps

copy ad.exe ad.exe done

2. After finished with the extraction process, now you need to move the DBC and Maps directory from your WoW installation directory to C:\WoW\data

Note: Back when i write this, VMaps is disabled by default so i didn’t include it in the steps here but because now it’s enabled by default, to reduce / hopefully prevent further question regarding vmaps, all you have to do:
1. Copy the vmapExtractor3.exe and vmap_assembler.exe from the extractor_binary directory and then copy the make_vmaps.bat from vmap_extractor_v3 directory (both of them are located under contrib directory) to your WoW installation directory
2. Run make_vmaps.bat and wait till it finished and move the vmaps directory to C:\WoW\Data

Copying Mangos Config Files

Remember the directory structure we’ve created earlier? if yes, then that’s good because in this example i’m going to use the directory structure created earlier, if you choose to skip the creating directory structure part then make sure to adjust everything accordingly

1. Now you’ll need to copy the,, from your Mangos compile directory (use the search function as shown at below image) to C:\WoW\Mangos

mangos conf

2. And then copy everything from the Bin directory inside your mangos compile directory into C:\WoW\Mangos and then rename, and into mangosd.conf, realmd.conf, scriptdev2.conf. So in the end, you have these files (see below image) inside C:\WoW\Mangos directory

mangos necessary files

Setting Mangos Datadir

Go to directory C:\WoW\Mangos and open mangosd.conf and search for

DataDir = "."

and replace it with

DataDir = "C:\WoW\data"

mangos datadir

Installing the Databases

Note: For future version (if you didn’t read this at the time this post published), adjust the SQL filename (for Mangos SQL Updates files and UDB SQL files) and directory name accordingly

Installing Mangos Databases

Before starting in this process, please note that the directory structure used is based on the mangos compile guide so if you use different path, make sure to adjust them accordingly. Also if you get "mysql is not recognized as an internal or external command, operable program or batch file." that means you didn’t set up MySQL to be installed to your Environment Variables PATH. See the MySQL Installation Guide on my previous guide for more info

Note: This step is intended for fresh installation only, if you’re upgrading mangos skip this step otherwise you’ll lose all your characters and logins data in your mangos database

1. Open Command prompt, and then type

cd /d c:\mangos-git\sql

then followed by

mysql -uroot -p -v < create_mysql.sql

creating mangos database

This will create mangos database structure and also create the necessary user (because using root is dangerous)

2. Then type

mysql -uroot -p -v -D realmd < realmd.sql

importing realmd

This will import the necessary realmd tables into the realmd database

3. Finally type (but don’t close the command prompt yet)

mysql -uroot -p -v -D characters < characters.sql

importing characters

This will import the necessary tables into the characters database

Installing UDB (Unified Database)

1. Remember the part about downloading database? if yes, then go to the directory where you download the UDB database, and then extract the inside the Full DB directory of your UnifiedDatabase directory so it’ll look like this

extracting udb

2. And now we’re going to import the database (it may take a while depending on how fast your computer is). From the command prompt window from before, type (don’t close the command prompt window yet again)

cd /d C:\unifieddb\Full_DB
mysql -uroot -p -v -D mangos < UDB_0.12.0_mangos_9582_SD2_1639.sql

importing udb fulldb

Updating Mangos Database

Because the Full UDB database is designed for Mangos Revision 9582, and at the time i wrote this the compiled Mangos binary we previously compiled at the compiling mangos guide is at Revision 9771, we need to import all sql files in your mangos compile directory\sql\updates after 9582 to mangos database unless there is no sql update file after that version (which is unlikely)

Tips: look at the UDB filename it state mangos 9582 which means that every mangos core update before and equal to Mangos 9582 has been applied and so we need to apply all sql updates that is released after revision 9582. And to check your mangos revision, just run mangosd.exe or realmd.exe and then open server.txt or server.log file to see the Mangos revision you’re running

For example right after 9582 in sql\updates\0.16 in mangos compile directory there is a sql file named 9589_01_mangos_creature_template.sql, so we need to import that one first and you can do this by simply typing:

mysql -uroot -p -v -D mangos < 9589_01_mangos_creature_template.sql

and right after 9589_01_mangos_creature_template.sql there’s another sql update filename called 9590_01_mangos_db_script_string.sql, so then you need to type

mysql -uroot -p -v -D mangos < 9590_01_mangos_db_script_string.sql

and so on, basically you’ll need to locate each sql update file that contain mangos in the filename (ignore the realmd and characters), and then manually import each sql file accordingly

In the future, in case you want to upgrade your mangos installation, you can do so by importing each sql file including the realmd and characters if there’s any. But why we didn’t import sql files that contains characters and realmd in it’s filename in this guide? the answer is, because we’re doing a fresh installation the realmd database and characters database already using the latest update, but if you’re upgrading in the future chances are there’s an update for either realmd and characters database also

For example, 9767_03_characters_characters.sql. Means that it should be imported to characters database and to import it you need to type

mysql -uroot -p -v -D characters < 9767_03_characters_characters.sql

And for realmd update, the sql filename 9748_01_realmd_realmlist.sql and to import it you need to type

mysql -uroot -p -v -D realmd < 9748_01_realmd_realmlist.sql

That’s it basically, this may be confusing at the beginning but once you get used to it, it’ll be easy for you

Updating UDB

Now we need to update our UDB database too (because there’s an update at the time i wrote this), here’s how to do this

cd /d c:\unifieddb\Updated\0.12.0_additions
mysql -uroot -p -v -D mangos < 389_updatepack_mangos.sql
mysql -uroot -p -v -D mangos < 390_updatepack_mangos.sql

importing udb updatepack 389 importing udb updatepack 390

Tips: if there’s an update for UDB in the future all you have to do is just import the correct update accordingly

Installing and Updating Scriptdev2

From the command prompt type

cd /d c:\scriptdev2\sql
mysql -uroot -p -v < scriptdev2_create_database.sql
mysql -uroot -p -v -D scriptdev2 < scriptdev2_create_structure_mysql.sql
mysql -uroot -p -v -D scriptdev2 < scriptdev2_script_full.sql
mysql -uroot -p -v -D mangos < mangos_scriptname_full.sql

creating scriptdev2 database installing scriptdev2 tables

installing scriptdev2 database install scriptdev2 to mangos database

In the future, if you want to upgrade Scriptdev2 (assuming that you have recompiled Mangos and Scriptdev2 and also imported the updated Mangos sql files and also UDB if there are updates as described in the Updating Mangos and Updating UDB). You just need to execute this from the command prompt:

mysql -uroot -p -v -D scriptdev2 < scriptdev2_script_full.sql
mysql -uroot -p -v -D mangos < mangos_scriptname_full.sql

Installing ACID Database

From the command prompt again type

cd /d c:\sd2-acid\trunk\wotlk\3.0.4
mysql -uroot -p -v -D mangos < 3.0.4_acid.sql

installing acid database

Adjusting Realmlist and Creating Account


The next step would be editing your file located inside your wow installation directory\data\enUS (or your WoW Region like enGB, etc) and insert this

set realmlist

replacing everything inside the (make sure to create backup)

Creating GM Account

Now before getting into the World of Warcraft world, you need to create an account first for you to use, and to do that first you need to make sure realmd and mangosd process is running and then in the mangosd window type

account create username password

Where username is whatever username you want, and password is whatever you want for the account password. And then type

account set addon username 2

To set the expansion pack to Wrath of the Lich King (0 = Classic WoW, 1 = The Burning Crusade, 2 = Wrath of the Lich King) for the username you choose. And finally type

account set gmlevel username 3

To give the highest GM (Game Master) level to the username you choose, so he/she can do anything he/she want from wreaking havoc to causing apocalypse

create mangos gm account

in the example above, i create a new gm account with reaper as username and ilovekeikokitagawa as the password (p.s don’t take the password seriously) :P

Note: later in the game you can to type .commands to see all available commands for you (or feel free to look at the GM Commands List page)

Optional: Setting up Public WoW Server (LAN or Internet)

If you’re planning on allowing people to connect to your server either from the Internet or LAN, then there’s one more thing you need to do so other people can connect to your wow server

First you need to open the command prompt as usual and then type

mysql -uroot -p

now type

use realmd;

and finally type

select * from realmlist;

and you’ll see the realm address is set to by default, but because you’re going to allow other people to connect to your server / computer, you need to change the ip address into your Public IP Address. The easy way to know your public ip address is by visiting and make a note of your IP Address

Once you’ve obtained the public ip address the next step would be changing the ip address in the realmlist table, and to do this just type

update realmlist set address = 'your public ip address';

then to make sure the change has been applied successfully, you need to type

select * from realmlist;

If you’ve changed it then you’ll see your new public ip address instead of

The next step is restart realmd.exe, and mangosd.exe process in order for the change to take effect

Now after finished with the above process, you’ll need to open your and change the set realmlist into your public IP Address …. and tell your client to use the your public ip address in their file and you’re all set ;)

Note: if you’re behind router, make sure to forward port 3724 and 8085 (default port used by WoW) on your router or set up DMZ. And if you’re behind firewall make sure to allow incoming connection on port 3724 and 8085

Special Note: To those with Dynamic IP Address

If your internet provider gave you a dynamic ip address, then the solution is to get yourself a dyndns address first, and to do this you need to go to and register an account there, and i assume that your wow server is called

Then after finished with the registration process, all you have to do is just follow the above but instead of writing your public ip address you need write your address

For example at this part:

update realmlist set address = 'your public ip address';

You need to replace the command with

update realmlist set address = '';

And then continue with the rest of setting up public wow server part. And after finished with all public wow server part, now you need to open hosts file located in Windows\System32\drivers\etc (C:\Windows\System32\drivers\etc\hosts), and then add this at the bottom of the file (for lan users change the below to the LAN IP address where the mangos server located)

And …

WoW Screenshot

That’s it you’re done … if i forgot something, don’t be shy just let me know so i can fix it immediately. And if you got any questions or have a request for the next article, feel free to post your comment :)

And, if you want to create custom npc on your mangos server, please check how to create custom npc guide

Too much work, give me the fastest way

If you feel overwhelmed by everything listed in this guide then feel free to use this option, but make sure you have mysql installed as listed on mysql guide for vista and 7 (for vista users) and mysql guide for xp for windows xp users

  1. Extract the file into C:\
  2. Copy ad.exe from tools directory into your WoW installation directory and let ad.exe finished with extracting DBC and MAPS and then move the DBC and MAPS directory to C:\WoW\data
  3. Run import.bat and when prompted for password, enter your mysql root password
  4. Start realmd.exe and mangosd.exe
  5. Edit the file and create new account as described in the Adjusting Realmlist and Creating Account part … and play

Enjoy, consider this as a supplement for this extremely long guide and oh make sure your WoW client is version 3.3.3 and it’ll create a fresh installation so if you previously have used mangos and don’t want to lose your precious data make sure to create backup first

Download Supplement from Megaupload | Download Supplement from Rapidshare


Note: Comment may not appear right away.

846 comments on “How to create WoW Private Server using Mangos

  1. Hey Reaper,
    I’m trying to update the DB, any chance you can help with this problem?

    c:mangos-gitsqlupdates>type 958*mangos* > output.sql && type 959*mangos* >> o
    utput.sql && type 96*mangos* >> output.sql && type 97*mangos* >> output.sql && t
    ype 98*mangos* >> output.sql
    The system cannot find the file specified.

    1. I met that error myself while trying to update the Mangos database. My guess – and perhaps you shopuld also check with Reaper – is that it is because of the directory structure in the Updates directory.

    2. Yes as Tudor said (why Igor Tudor always came to my mind whenever i saw your nickname lol) you need to type it in the correct path where you put mangos source (for example mymangossourcesqlupdates) :)

  2. Thanks for the guide, used something from you for like two years ago. Good to see you are still around!

    When i open mangosd it is loading and then closing. Same with Realmd. The log says

    “2010-05-01 15:47:24 Using configuration file realmd.conf.
    2010-05-01 15:47:24 Database:;3306;mangos;mangos;realmd
    2010-05-01 15:47:24 ERROR:Could not connect to MySQL database at Access denied for user ‘mangos’@’localhost’ to database ‘realmd’

    2010-05-01 15:47:24 ERROR:Cannot connect to database”

    I have followed the entire guide but i did get an error when installing thw mangos database. It said it couldn’t create it because it already exists.

    Can i fix my installation or how do I delete everything so i can make a new clean install?

    1. Welcome back again Skogshuggaren :)

      Anyway based from your error message it seems that MySQL isn’t running and so mangos and realmd can not connect to the mysql server

      So try starting the mysql process first ;)

    2. Thanks, good to be here

      Nope doesn’t seem to work. The Mysql process is running.

      I think i try to do a fresh install, to be sure I havn’t done anything wrong. But how do i delete everything and start again. Do i need to uninstall some of the program I have used?

    3. Whoops i didn’t noticed that the error message was access denied for user mangos

      If that’s the case, that means mysql is installed and running at the default port, but problem is you haven’t created the mangos username and that’s why you get the access denied message

      If you’re looking to start from beginning again (or fresh installation), you can just uninstall mysql, but before uninstalling check the datadir variable in my.ini located in your mysql installation directory so you know where mysql installed the datadir, and delete it (because uninstalling mysql won’t delete your datadir) :)

  3. Well thats cool i could probaly stay up late. But then now we both have to be on at the same time and what method are you going to use to connect to my computer. I would suggest teamviewer but it doesnt matter and maybe a better way to communicate other than comments would be good as well.

    1. I’m online now, and sure i can try teamviewer (btw i’m usually online at this time .. p.s see the comments time) :)

  4. Hi Reaper,

    I managed to have everything right for my private server, up untill the updating the Mangos and UDB databases, where I got two or three errors. When I try to start mangosd, the CMD window tells me that Not all sql updates are applied…. Can u please help? Thank you very much :)

    1. Ah yes if you got that error message, look at the Installing database > updating mangos part

      basically if the mangos revision is currently at 98xx (for example) you just need to add

      type 958*mangos* > output.sql && type 959*mangos* >> output.sql && type 96*mangos* >> output.sql && type 97*mangos* >> output.sql && type 98*mangos* >> output.sql

      If you previously have executed the type command until 97xx and the current mangos is at 98xx (example), then you just need to type

      type 98*mangos* > output.sql

      and then followed by

      mysql -uroot -p -D mangos

      and if there's additional database upgrade needed for realmd, and characters table you can adjust the above command to match the required database filename upgrade :)

      mangos sql filename tells you right away what kind of database upgrade that is for example 98xx_realmd_xxx.sql means it should be imported into realmd database, 98xx_characters_xxx.sql means it should be imported to characters database

      as for the mysql command, all you have to do is just replace the -D mangos to -D characters or -D realmd depending on the sql type :)

  5. I just really hope you can help me cause this is a thing i have wanted to do for like 3 years that i have always been unsucessful at which sucks

    1. Well actually if you’re still having problem, i can help you by connecting to your computer directly, but problem is … with which method you want me to connect to your computer. Also the most important thing is i live in different timezone (GMT+7) so you’ll need to stay up late if you want me to connect to your computer lol

  6. Um lol still a little confused but if you want to there is this thing that i do with my friend and it allows you to like get on my computer and mess with files and stuff called teamviewer just wondering if you wanted to do that if you had time or something if not ill just tell you what i did. I have done everything you told me lol like putting the line on the hosts file changed the thing on command prompt to (which is the one i made just easy for me to remeber) and then changed it to my but i cant connect. And no matter what i change my realmlist to i can always get on retail wow which i think might be wierd but if that doesnt mean anything oh well

  7. Ok i found everything and changed it but its still not working my realmd still says
    is that the problem if so how do i fix it and what is the internal/lan IP and how to i find it?

    1. this part:


      means that realmd connecting to the MySQL server on (your own computer), and there’s no need to change it unless you host the MySQL server on another computer ;)

      as for internal ip, you just need to type

      ipconfig /all on command prompt and you’ll see your internal / lan ip address

      make sure that the hosts file contain


      but if you’re using router there’s also another step and that is port forwarding, so people can connect to your server or else there won’t be able to connect at all

      btw can you tell me what you’ve done so far? (like the mysql command used, adjusting the realmlist, etc) :)

  8. Yah no idea what folder your talking about in Windows directory and still dont know what IP adress your talking about exactly so thats were i stand

  9. Oh and the realmd database should it still say when i open it??? cause i think that might be it but im no computer wis

  10. oH nvm i know what you mean by that but i cant find the hosts file or whatever file your talking about to add that line

  11. Um two questions what is windows directory i cant find that lol and when you say use your internal/lan IP adress is that just the same as your public IP adress?

  12. i have done all things in this guide and when i open mangosd for creating an account is loading and then closing.I don’t know what to do pls can you help me?

    1. Could you post your server.log (it is located in the same folder as mangosd and realmd), no need to post them all just the last few lines :)

    2. 2010-04-29 17:46:38 Using DataDir ./
      2010-04-29 17:46:38 WORLD: VMap support included. LineOfSight:0, getHeight:0
      2010-04-29 17:46:38 WORLD: VMap data directory is: ./vmaps
      2010-04-29 17:46:38 WORLD: VMap config keys are: vmap.enableLOS, vmap.enableHeight, vmap.ignoreMapIds, vmap.ignoreSpellIds
      2010-04-29 17:46:38 ERROR:Check existing of map file ‘./maps/’: not exist!
      2010-04-29 17:46:38 ERROR:Correct *.map files not found in path ‘./maps’ or *.vmap/*vmdir files in ‘./vmaps’. Please place *.map/*.vmap/*.vmdir files in appropriate directories or correct the DataDir value in the mangosd.conf file.

    3. the problem is mangos couldn’t find the Maps directory, if you’re using the directory structure in this guide (Initial Setup part), then you need to edit mangosd.conf and change DataDir to "C:\WoW\data" and don’t forget to move the DBC and Maps directory to C:\WoW\data

      based from your log you didn’t see the datadir properly (or perhaps you choose to set the datadir to “.” ) … and if that’s the case then you need to move dbc and maps directory to the same directory as mangosd.exe and realmd.exe

      feel free to choose which method fit you best (the first method is described in this guide)

    4. I movied the map and dbc to c:wowmangos and modify in mangosd conf and is still poping.It is open and is closing.This is the problem.

    5. If you moved to the same directory as mangosd.exe as realmd.exe then set the datadir to "."

      If you moved dbc and maps directory to c:\wow\data then set the datadir to


      (this is described at initial setup setting datadir part)

      btw, mangos won’t run at all (in other words automatically close) if there’s something wrong with your configuration, and your server.log file tells me that you didn’t set the datadir properly (in other words, mangos can’t find the dbc and maps directory) ;)

      p.s because it’s already late here (11:30PM), i’m going to get some rest first :)

    6. k here is my yahoo messenger adress tudor_102 pls add me and can you talk with me tommorow?I want to fix the problem beacuse i want my srv to be public (i want to play with my friend i also want the srv for experiments beacuse i am learning c++ and i want to apply all my c++ experiments in wow also spawning and learning how to co-op events so this is why i want an wow srv)so pls add me and i will explain everything on y messnger

    7. @adrion if your not planning to run a HECTIC ONLINE server then try HAMACHI it worked for me after i got those errors you must just change the Realm Ip to YOUR hamachi Ip and restart server and change your and tell your friends to do the same and done =)

    8. Thanks Malach because i never try hamachi (although i often heard people talking about it). Beside, the simple way of doing this (for me at least) is well via the normal method described in this guide other than that there’s no other dependencies lol :D

      as for adrion, well i have YM too, but problem is, i live in different timezone so you won’t be able to see me lol

      btw … if it’s still closing, could you upload a screenshot somewhere about your wow directory structure, and also post the Datadir configuration in mangosd.conf here :)

    9. Based from your configuration, that means you have DBC and Maps directory in C:\WoW\data (so that means there’s C:\WoW\data\maps and C:\wow\data\dbc), right?

      If problem still exist try changing the forward slash to back slash like below (on some case, usually this fixed it although for me i can use both forward slash or back slash):

      DataDir = "C:/WoW/data"

      and if problem is still not fixed, paste several lines before the end in your server.log here :)

    10. Done and this didn’t fixed.I know you are 3 or 4 hours later but if you are stil on-line pls add tudor_102 on ym so we can talk pls you are my only hope for my srv to run.Please

    11. K forget i will do the whole guide from the begining and i will see where i’ve maked mistakes.So i will take thw whole guide from the begininng

  13. Hey my server works but when i follow your instuctions to make it public i do everything right but i cant connect myself i cahnged the stuff in command prompt and in my file but it says servers are down when i try to login

    1. Try this instead, first get a dynamic dns address (even if you have static ip address), check

      then update the realmlist table with your dyndns address, and then point file to your dyndns address

      and finally edit windows\system32\drivers\etc\hosts file to point your dyndns address to your internal ip address

      If it sound confusing here’s a detailed guide

      1. for example you create at
      2. open command prompt and type:

      mysql -uroot -p
      use realmd;
      update `realmlist` set `address` = '';
      select * from realmlist;

      The select part is just to confirm you have changed the address and quit obviously quitting mysql lol

      3. Open and change everything inside to set realmlist

      4. Go to Windows Directory\system32\drivers\etc\ and open the hosts file there using notepad or your favorite text editor

      5. add this add the bottom of the hosts file


      And replace XXX with your internal / lan ip address :)

    1. Thank you very much Chris but i don’t think i deserved that credit, all the credits should be given to the mangos team :)

    1. Actually i put a bonus in this post :P although it’s just a simple importing, but ofc don’t consider it as a repack but think of it as precompiled binary instead :D

    1. If you fetch the mangos source code actually DBC Editor is included (located at dbcediter in contrib directory) although i personally haven’t tested it yet

      But of course you’ll need to read about the DBC structure first, if you want, you can take a look at the DBCStructure.h in mangos source directory