• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Configuration OT Server, Which,How & Why?

Zisly

Intermediate OT User
Joined
Jun 9, 2008
Messages
7,338
Reaction score
120
Hello and welcome to my first Open Tibia tutorial.
I hope you will understand it :)

I will try to cover the most in this tutorial, the information might not be 100% accurate, so if you notice something which is wrong please inform me.

Content;
  • Start
  • SQL
  • XML
  • How to Setup a SQL server
    and AAC
  • How to Setup a XML server
  • Distribution (server) Downloads
  • FAQ
  • Windows Firewall - Ports
  • Router - Open Ports

Start

Getting a open-tibia server up and running is not really that big of a deal, it's very simple actually.


The first decision to make is which distribution you would like to use and which type of distribution, either SQL or XML.
To make the decision easier I have written the differences.

SQL

The structured query language (most commonly known as SQL) is a query language that is used in conjunction with relational database management systems. It is designed to retrieve, edit, insert, update and delete data via lines of code, instead of manual maintenance.

A SQL server is faster & easier to manage than a XML server, which just seems clumsy,slow.
But a lot of people prefer to use XML server, now you will probably ask yourself;
"If SQL is much better, why use XML?"

Well the reason is that the XML servers are more ready-to-go, which means; change the settings and start it, which normally takes some minutes.

But with SQL you need to setup a database, which isn't really a big deal and there are a bunch of tutorials for it also, it may take some more time than setting up a XML server, but I can secure you, it's worth it.

The most known SQL distribution is The Forgotten Server, which indeed is a great one with a lot of features.
You can get the download link in the Distribution (server) Downloads topic, just scroll down a bit.

XML

XML stands for Extensible Markup Language. It is a system that allows for users to create their own Markup Languages by specifying and defining elements in a document that allows for data to be shared across systems easily.

In OT XML files are used for many reasons such as a means of holding data on items, monsters, accounts, players etc.
But today XML is not used to store accounts & players, that is SQLite's and MYSQL's work, simply because they are faster,easier to manage as pointed out before.
It is not recommended to use XML servers.
The most know XML distribution is Evolutions, which was a great distribution, but has not been updated since 8.0(?)
So it is not recommended using any XML above client 8.0



Ok, now you should have a idea of what you want to go with, if you choose SQL, you should go with The Forgotten Server as mentioned earlier, you can read how to set it up later in this post.

If you chose XML (8.0 and earlier versions only) you should go with Evolutions which is a great XML distribution, but remember, don't use it for client above 8.0, because it will most likely have a lot bugs.
You can read how set it up later in this post.


How to Setup a SQL Server
Let's start with the SQL server :)

The tutorial is divided in 10 simple steps
  • Files & Installation
  • Configure XAMPP
  • The Server Side 1
  • The Server Side 2

Files & Installation
You will need some files to get started, XAMPP and a distribution of course which you already should have.

Download XAMPP here

Now when the download is done, let's install it, which is very simple.
  • Run the XAMPP installer.
  • Chose MYSQL and Apache as service when it asks for it.
  • Now just finish it.
  • Congratulations you have now installed XAMPP, easy eh?

Configure
Now let's configure things.

  • Go to the XAMPP directory where you installed XAMPP.
  • Run XAMPP_START and don't close it.
  • As XAMPP has German as default language it would be smart to change it,
    go to http://localhost/security/ and chose a language that fits for you.
  • Now navigate to http://localhost/security/xamppsecurity.php
  • Set your passwords to keep MYSQL & the XAMPP directory safe.
  • Congratulations, you have configured XAMPP!

The Server Side 1
Now let's configure your server with Mysql
Just follow these steps and you will be fine.
If you haven't chosen a server yet, check the the Distribution (server) Downloads topic, just scroll down a bit.


  • Navigate to http://localhost/phpmyadmin
  • Enter the password you set earlier to enter phpadmin if it asks for it.
  • Now create a new database, name it whatever you want, but OT would be the easiest.

  • Now click "import",chose a file named either
    Schema.mysql,Database.sql or Forgotten.sql
    which is situated in your distribution folder, now import it (click run/ok/kör)
  • Now you have yourself a database, congratulations!

The Server Side 2
Now let's configure the server.

  • Go to your distribution folder and open the file named config.lua
  • Find the part with ip,port etc.
  • Set your ip from http://whatsmyip.net/ in your ip field.
  • Now set the port you would like the server to listen to, 7171 will do fine.
  • Find the database part,and fill it. when your done it should look something like this:
    Code:
    sqlType = "mysql"
    sqlHost = "localhost"
    sqlPort = 3306
    sqlUser = "root"
    sqlPass = "MYSQLPASSWORDHERE"
    sqlDatabase = "DATABASENAMEHERE"
    sqlFile = "forgottenserver.s3db"
    sqlKeepAlive = 60
    passwordType = "plain"

    - MYSQLPASSWORDHERE: set the mysql password you created on step 2.
    - DATABASENAMEHERE set the database name you created on step 3.
  • Congratulations, you have set up your server with mysql, you can now run the server.

    AAC Setup
    So, you made it here huh?
    Now let's create a nice AAC site for you.
  • Download a AAC, we will go with Nicaw's. download HERE
  • Delete all the files in the htdocs folder in the XAMPP folder.
  • Unzip/unrar the nicaw's AAC to the htdocs folder.
  • Now open the config.inc.php file in the htdocs folder.
  • You will see this;
    Code:
    # Set data directory of your OT server
    $cfg['dirdata'] = 'C:/OT/data/';
    
    $cfg['house_file'] = 'world/mapname-house.xml';
    
    # MySQL server settings
    $cfg['SQL_Server'] = 'localhost';
    $cfg['SQL_User'] = 'root';
    $cfg['SQL_Password'] = 'MYSQLPASSWORD';
    $cfg['SQL_Database'] = 'DATABASE';

  • $cfg['dirdata'] = ''; Simply set the whole path to the data folder of your distribution.
    $cfg['house_file'] = ''; Set the house file path.
    $cfg['SQL_User' = '';] if you didn't take another name than root don't change it.
    $cfg['SQL_Password'] = ''; Just set the MYSQL password you created on step 3 here.
    $cfg['SQL_Database'] = ''; Set the database name here which you created on step 3.
  • Now you just need to set the Town Config, find the part Town Config and fill in the wanted settings. (you must at least set one town)
  • Congratulations! you now have a SQL server with a AAC site.
    to visit the site, navigate to your ip address.

How to Setup a XML Server
This will not take long.

  • Open the config.lua file in the distribution folder
  • Find the ip and port part
  • Set your ip from http://whatsmyip.net/ in your ip field.
  • Now set the port you would like the server to listen to, 7171 will do fine.
  • Now you should be good to go, congratulations!


I hope you understood me, not that great writing tutorials :p
If I missed something just tell me.

Feel free to rep++ me :)
 
Last edited:
FAQ

  • I can enter the server but my friends can't, whats wrong?
    First check that you wrote the right external IP, get it from; http://whatsmyip.net
    If you got the right IP, it's probably the ports which are closed.
    If you don't have a router go to the Windows Firewall part else go to the router part.
  • I have a router and I did the router step but the server still can't be accessed, what should I do?
    Then do the Windows Firewall tutorial also.
  • I've done everything to try to open port 80 but still it wont open, what can I do?
    Well you can make listen to another post instead, go to this tutorial:http://otfans.net/showthread.php?t=142517

Windows Firewall - Open Ports
This will explain how to open ports in the Windows Firewall.
  • Go to the Control Panel and click on the Firewall icon.
  • You should now see this, I'm sorry that it's in swedish, but it looks the same in every language;
  • Now click on exceptions and then Add port, just check the pic;
  • A window will appear asking for a name and port, enter a aame, doesn't matter which and then enter a port in the port field.
    Needed ports;
    • MYSQL - 3306
    • Apache - 80
    • Server - Chosen port (usually 7171)

    Example;

  • Now just click OK, and the port will be opened, do this again until you have added all needed ports.
  • Now they should be opened, start your server and go and check if they are open at; http://zisly.com/page-portcheck.html and check the needed ports.
  • Now your done :)

Router- Open Ports

  • Go to http://www.portforward.com/english/routers/port_forwarding/routerindex.htm and search for your router there are a lot of tutorials on how to open the ports on routers, if you don't find your router keep reading.
  • So you didn't find your router eh?, OK no problems, just go to 192.168.0.1
    and login if required.
  • I can't be of any big help here but try to find something named portfarward,ports,firewall or advanced.
    Until you find the right section.
  • When you have found it, just add the ports and to which computer they are for (if required), it's usually very simple to do.
  • Now start the server and test if they are open at; http://zisly.com/page-portcheck.html
    If they aren't, check the Windows Firewall tutorial also.
    Or that you don't got a anti virus firewall.

Thanks for approval! :)
I got a little info from the wiki, so some of the credits go to the people who wrote the articles :)
 
Last edited:
Great tutorial mate!

I already had a server and everything but this certainly will be useful for the starters since most tuts here might be outdated, I suggest you also add some links to updated 8.4 TFS distros because most of the other tutorials lead to older TFS versions and most of the starters look up to learn about setting up a 8.4 server so I think that would be good for your tutorial ;)

Anyways it looks like it took some work and effort to make this, so +rep from me ;)

Maybe you could make an updated tutorial about compiling or stuff like that? All compiling tutorials are pretty old too (old doesnt mean incorrect, but old is old) :)

EDIT: Also, in the part about XAMPP where you link to this page:
http://localhost/security/xamppsecurity.php

You could add a previous step to go to this place first:
http://localhost/security/

And choose the desired user language in the menu from the left in there, because usually the xamppsecurity.php page comes default in german language or something like that and it can be a really confusing task to be able to make your new password in a language you dont know. I say this because, in my case, when I was starting all the tutorials led to the .php page directly and I always had the page in that language so it took me a while to find out how to do it correctly, but maybe thats just me ;)

Im just saying that simple line could be pretty useful for some :)
 
Last edited:
Great tutorial mate!

I already had a server and everything but this certainly will be useful for the starters since most tuts here might be outdated, I suggest you also add some links to updated 8.4 TFS distros because most of the other tutorials lead to older TFS versions and most of the starters look up to learn about setting up a 8.4 server so I think that would be good for your tutorial ;)

Anyways it looks like it took some work and effort to make this, so +rep from me ;)

Maybe you could make an updated tutorial about compiling or stuff like that? All compiling tutorials are pretty old too (old doesnt mean incorrect, but old is old) :)

EDIT: Also, in the part about XAMPP where you link to this page:
http://localhost/security/xamppsecurity.php

You could add a previous step to go to this place first:
http://localhost/security/

And choose the desired user language in the menu from the left in there, because usually the xamppsecurity.php page comes default in german language or something like that and it can be a really confusing task to be able to make your new password in a language you dont know. I say this because, in my case, when I was starting all the tutorials led to the .php page directly and I always had the page in that language so it took me a while to find out how to do it correctly, but maybe thats just me ;)

Im just saying that simple line could be pretty useful for some :)
http://localhost would also work, as it's the first time run you would be able to chose language, anyways I will add it, thanks!
About the compiling tutorial; I'm not that secure on it so I won't make a tutorial.

And thanks for the positive feedback :)


Edit;

Update:
Added how you chose your language in XAMPP.
Added distribution topic with download links.
And some extra info..
 
Last edited:
Even your Tibian character says wow! xP
 
nice Tutorial, but i still can't get my ports opened, the site to check the ports doesnt work and i find my router in portforwarding but its too complicated afterwards, with the internet connection and stuff
 
Nice, just one question... checked out YouGetSignal.com - Open Ports Tool - Check Your IP Address and Test Port Forwarding and everything seems to be fine with the opened ports but still having problems getting my webpage out, when I shutdown the windows vista firewall it goes in with no problem, so... what are the most common problems here,(any program or app sugested to add to firewall??) I have autorized access to appache app and mysql, so what else... no active antivirus on this test, so rule that out...

apreciated...:p

EDIT: NEVER MIND... INSTANTLY FIXED IT... SEEMS IT WAS JUST TAKING A FEW MOMENTS... SEEMED WEIRD DONE THIS MANY TIMES BEFORE, MAYBE JUST A FREAKY WLITCH...

EDIT 2: Well.... now it comes and goes 30%-70% and its slow... sometimes it does open sometimes it doesn't... as soon as I dissable the windows firewall it goes in 80% of the times with no problem and fast, any ideas?? the last time I hosted my server this wasnt a problem, but I didnt have windows vista, maybe something else blocking??
 
Last edited:
Back
Top