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 :)

Requirements

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

MySQL

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

TortoiseSVN

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

http://unifieddb.svn.sourceforge.net/svnroot/unifieddb/trunk

as the repository address

udb svn co udb done

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

 http://sd2-acid.svn.sourceforge.net/svnroot/sd2-acid

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 mangosd.conf.in, realmd.conf.in, scriptdev2.conf.in 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 mangosd.conf.in, realmd.conf.in and scriptdev2.conf.in 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 UDB_0.12.0_mangos_9582_SD2_1639.zip 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

Editing realmlist.wtf

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

set realmlist 127.0.0.1

replacing everything inside the realmlist.wtf (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 127.0.0.1 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 whatismyip.com 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 127.0.0.1

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 realmlist.wtf and change the set realmlist into your public IP Address …. and tell your client to use the your public ip address in their realmlist.wtf 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 www.dyndns.com and register an account there, and i assume that your wow server is called mycoolwowserver.dyndns.com

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 dyndns.com 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 = 'mycoolwowserver.dyndns.com';

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 127.0.0.1 below to the LAN IP address where the mangos server located)

127.0.0.1 mycoolwowserver.dyndns.com

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 realmlist.wtf 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

Comment?

Note: Comment may not appear right away.

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

  1. Everything has been going well so far, except when I get to Extracting DBC and Maps the only files are

    dbcEditor
    dbcFormat
    extractor
    git_id
    mysql_to_pgsql
    soap
    vmap_assembler
    vmap_extract_assembler_bin
    vmap_extractor_v3

    Did I compile mangos incorrectly?

    1. If you’re looking for the ad.exe to extract the maps and dbc files, the ad.exe can be found at the extractor directory :)

  2. Hey Reapers-X, i’ve been testing your Mangos private recently, i must admit that you’ve done a great work, I encountred many problems but all the solutions were in the comments :) i managed to make it accessible to my frinds with the DynDns and it’s running smoothly. However, there’s something annoying when playing PvE, Trial of the crusader isn’t scripted as i can see, and once i get in , i fall down heading to Anub’Arak, when i went back to the entrance i found that the floor iss all messed up, the cercle of the floor is misplaced x)
    the Trial of the champions npc does NOT launch the event,clicing on “I’m Ready” doesn’t launch anything.
    Well, i found all doors misplaced too ! it’s like they’ve been rotated 90° somehow ! i fixed some of them like the pit of saron entry but there’s still a lot of work to do >.<
    i just wanted to kow if there was a fix for that or some Script update or something like that ! especially for the argent tournament raids and ICC =)
    Thank you for your work again ! I am grateful !

  3. is there a way to setup mangos on a linux box and if so can you send me the instructions and a list of the downloads ill need to get im running dedian and kde

    thanks

  4. Hi reaper-x (and anyone on the forum). Everything works fine for me until installing scriptdev2, which gives me this error, though i used the mysqpl password i’ve used up to now:

    c:\scriptdev2\sql>mysql uroot -p -v < scriptdev2_create_database.sql
    Enter password: *******
    ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: N
    O)

    Any idea what went wrong and what should i do?

    1. I gave up on the long process and tried the “fastest” way to see if i was luckier.
      All fine until mangosd.exe gives me the error on startup:

      Map file ‘C:\WoW\data/maps/0004331.map’ is non-compatible version (outdated?). P
      lease, create new using ad.exe program.
      Correct *.map files not found in path ‘C:\WoW\data/maps’ or *.vmap/*vmdir files
      in ‘C:\WoW\data/vmaps’. Please place *.map/*.vmap/*.vmdir files in appropriate d
      irectories or correct the DataDir value in the mangosd.conf file.

      Reaper, (or anyone else willing to) could you configure it via teamviewer for me? You can contact me at

      psygore[at]gmail[dot]com

    2. Nevermind, i gave up and installed a Trinity repack instead. Awesome guide, tho, keep up the good work.

    3. Experiencing the same problem, only that i got to the 3rd line:
      mysql -uroot -p -v -D scriptdev2 < scriptdev2_script_full.sql
      with the same password error.

    4. nvm, got it to work not knowing the solution, don’t even know where it came from but right now i’m trying to create vmaps somehow

  5. So anyone try the fast way with patch 4.2.0?
    any success?
    im a newb at this and didnt understand the guide very well so im trying the fast way

  6. I just want to start off by saying that your install is very easy to understand and has helped me provide a safe enviroment for my daughter and my nieces and nephews to play in. we are having trouble with the Death Knights quests. They are not able to complete any of them and I was wondering if you had any thoughts as to why?

  7. I know.

    But if your “bin”-folder is empty (or at least doesn’t have the needed files), it’s because the compiling of mangos or scriptdev didn’t work. Those files should be created by the compiling process.

  8. hey reaper found an error in the guide when extracting the dbc and maps the ad.exe file is located inside the contrib/extractor folder not just in contrib

  9. I have been trying to install the UDB. For the longest time, command prompt was telling me it could not find the file which I have in C:\unifieddb. Now it tells me access is denied. The zip of the UDB I’m trying to install is “mysql -uroot -p -v -D mangos < UDB_0.12.1.393_mangos_10545_SD2_1833.sql" I'm running Vista 32. I also did notice that I did not have MaNGOSScript.dll, MaNGOSScript.exp, and MaNGOSScript.lib in my WoW folder I created. I can't find them anywhere on my PC. Is this part of the problem I'm having?

  10. Ok, I’ve got an older WoW version.
    Next problem is updating the Mangos database.
    1.:
    UDB sais mangos_10545, in the update folder are the files “10537_01_mangos_command.sql” and “10551_01_mangos_spell_proc_event.sql” -> no “10545_…”.

    2.:
    If I try to update the database, it says that I need newer versions of the files. Even if I use .sql’s in the “0.13”-folder.

    3.:
    There are 714 files (the 0.13-folder included)! Do I really have to update them one by one?!
    Is there perhaps a way to get a newer versoion of mangos?

  11. if you still check this how do you the bin part because that is where you lose me my bin folder does not have those items in it

    1. Then you dont have compiled mangos and scriptdev2 correctly.
      make sure you have set the right version (x64 or win32).

    2. it isn’t the bin as in recycle bin.

      under the mangos dir there is a folder called bin that needs to be copied

  12. Hi, thx for the tut!!!
    Everything is working fine. But when I have to open ad.exe, it just closes.
    I think the problem is that Im using Catacysm 4.0.6 is there a way to get it running?
    thx in advance

  13. My mangosd.exe just closes, doesn’t even run, as it just disappears after I tried opening it. Any thoughts?

    1. Never mind, I found my problem. Mangos was looking for vmaps. So I created vmaps, using vmaps in contrib folder of mangos-git.

    2. Now Im having trouble making this server public. I set the server to my external IP. Forwarded those ports mentioned above, and changed my realmlist to my external IP. But it says theres now an error and I can’t connect. Any thoughts?

  14. Reaper, great guide and everything! My friends and I are trying to setup Mangoes for a LAN game. Server side (on a laptop) went smoothly; the person on the server laptop can connect to it and play (All of us using 3.3.3a). However, the WOW clients are having problems. All of us are connected to Internet through a router. When a client computer tries to connect to the server laptop (realmlist is already set to the laptop’s IP; all Downloading preferences in the Wow launcher are disabled), it DOES connect successfully, handshaking and all, BUT it starts downloading the next patch…and if it does complete it, the client won’t be compatible with the mangoes server version. I’ve tried disabling the internet connection of the laptop and when I tried connecting the WOW client it won’t even log in and handshake and all that good stuff? Any ideas?

  15. It’s the best guide which I see ever. I’m ordinary housewife with two small children, and I haven’t any skills in computers (also my English is very poor) but with this site everything what I did works properly. Topics are clear and easy.

    Thank you very much. Great job, great guides. Everything what I’m dreaming now – guide for private WOW server Cataclysm version :) Will it soon? :)

  16. hey I’m having some problems opening up mangos.. this is the error it gives me..
    2011-02-05 22:05:06 SQL: SELECT required_11058_01_mangos_spell_proc_event FROM db_version LIMIT 1
    2011-02-05 22:05:06 query ERROR: Unknown column ‘required_11058_01_mangos_spell_proc_event’ in ‘field list’
    2011-02-05 22:05:06 The table `db_version` in your [WORLD] database indicates that this database is out of date!
    2011-02-05 22:05:06
    2011-02-05 22:05:06 [A] You have: –> `10537_01_mangos_command.sql`
    2011-02-05 22:05:06
    2011-02-05 22:05:06 [B] You need: –> `11058_01_mangos_spell_proc_event.sql`
    2011-02-05 22:05:06
    2011-02-05 22:05:06 You must apply all updates after [A] to [B] to use mangos with this database.
    Whenever i try to update mangos with the updates it tells me columns dont exist and it doesnt update for me..

  17. Great guide, not very computer savvy but I got through most of it fine. I’m running into a problem at the Create GM Account step. The processes immediately open and then close when I try to run them. Help would be greatly appreciated.

    1. OK so I believe if found the problem, I didn’t fully update the mangos database. I’ve tried to go back a fix my mistake, but the command prompt says it can’t locate the files. Any advice?

    2. means that u have missed some updates through mangos they all need to be done or it will just keep doing it

  18. Hello!
    I am bout to start setting all this up as a test but be for i do i would like to know can this run off of a “web server /MySql-db” & be hook/looped in to phpbb3 forum? So when a user make’s a user on the forum it makes a user for the game/server ???

    side note.
    can you run this off of just a web-server if you tell the MySql an so on where the files are?