I wrote this quickly, bare with me!
Setting up a local environment is really simple, but how documentations are written in general makes it look harder than it actually is, they just go into detail. Any technical tutorial will have lots of text but don't feel overwhelmed, once you know how, I promise you, you wouldn't even give someone 5 dollars to teach you how to setup your server.
All you need are
two things for local (windows) hosting:
1# ROUTER ACCESS
You need to be able to login to your router. If you've never accessed it before,
passwords are often blank with username "admin".
To find your router's IP address:
- Open Command Prompt
- Type: ipconfig /all
- Look for "Default Gateway" - this is your router's IP address
- Enter this IP in your browser URL (often something like 192.168.178.1 or 192.168.1.1)
2# WEB SERVER SOFTWARE
Choose one of the following:
- XAMPP: Good for localhost development
- Uniform Server: Highly recommended if opening to the public
(XAMPP needs additional configuration to make it more secure, which many
people forget to set. For local hosting only, it shouldn't matter much.)
If you plan to just host locally to develop, use either one.
How-to-do
STEP 1: INSTALL XAMPP
Download and install XAMPP from the official website.
(We will be using XAMPP for this example)
View attachment 96175
Beide (dutch) = Both
STEP 2: OPEN PORTS IN YOUR ROUTER
Open the following ports in your router:
- Port 7171 (Login Protocol Port)
- Port 7172 (Game Protocol Port)
- Port 80 (HTTP/Web Server)
Note: When configuring ports, you may see an option for "Both" (TCP and UDP).
For Tibia servers, typically only UDP needs to be opened, but opening both
won't cause issues.
View attachment 96174
STEP 3: START APACHE AND MYSQL
1. Open XAMPP Control Panel
2. Start Apache
3. Start MySQL
STEP 4: VERIFY INSTALLATION
If two browser pages do not open automatically:
- Press "Admin" next to Apache - this should bring you to a homepage template
- Press "Admin" next to MySQL - this should bring you to phpMyAdmin (a database interface with MySQL columns and tables)
View attachment 96176
STEP 5: CREATE A NEW DATABASE
1. In phpMyAdmin, click "New" on the left sidebar
2. Create a new database (e.g., name it "test" or your server name)
3. Click "Create"
View attachment 96193
STEP 6: IMPORT DATABASE SCHEMA
1. In phpMyAdmin, click on your newly created database
2. Click on the top menu: "Import"
3. Click "Choose File" and select schema.sql from your TFS folder
4. Click "Go" to import the database entries
This will import all the needed database tables and structure for your server.
STEP 7: INSTALL WEBSITE (MyAAC)
You need a website so you can create accounts and manage your server.
1. Download MyAAC from:
Releases · slawkens/myaac (https://github.com/slawkens/myaac/releases)
(Download the most recent version)
2. Navigate to your XAMPP installation directory
(Usually: C:\xampp\htdocs)
3. Open the HTDOCS folder and EMPTY IT completely
4. Extract the MyAAC ZIP file
- Extract the CONTENTS of the myaac folder (not the folder itself)
- Copy all extracted files into the HTDOCS folder in your XAMPP installation
STEP 8: CONFIGURE MYAAC
1. Open your browser and type: localhost or go to 127.0.0.1
This will bring you to the Installation Page of MyAAC
2. Follow the installation wizard step by step:
- Enter your IP address in a text file (as instructed)
- Set your server path
- Complete all required fields
3. After installation is complete, REMOVE the "install" folder from your
HTDOCS directory for security
STEP 9: CONFIGURE SERVER (config.lua)
Open config.lua inside your TFS Server Folder and edit the following settings:
-- Server IP Configuration
ip = "" -- Your public IPv4 address (leave blank for localhost)
bindOnlyGlobalAddress = false
loginProtocolPort = 7171
gameProtocolPort = 7172
statusProtocolPort = 7171
-- MySQL Database Configuration
mysqlHost = "127.0.0.1"
mysqlUser = "root"
mysqlPass = "" -- Leave blank for XAMPP, set "root" for Uniform Server
mysqlDatabase = "NAMEOFYOURDATABASE" -- Replace with your database name from Step 5
mysqlPort = 3306
mysqlSock = ""
IMPORTANT: Replace "NAMEOFYOURDATABASE" with the actual name of the database
you created in Step 5.
STEP 10: START YOUR SERVER
1. Make sure Apache and MySQL are running in XAMPP
2. Restart Apache/MySQL if needed
3. Run your server executable (theforgottenserver-x64.exe)
4. You should now be able to:
- Create accounts via the website (localhost)
- Login with OTClient or your preferred client
- Connect to your local server
P.S. If using OTClient (prefered) just edit init.lua to configure OTC to connect to localhost/127.0.0.1)