Guest User

Tibia Server Setup

a guest
May 31st, 2026
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.62 KB | None | 0 0
  1. Hey, I wanted to write a guide for setting up a 2007 Tibia server. A friend of mine who knows about 50% of the stuff has given me information, and I've attempted to enrich the guide further with the help of Claude. The aim is to set up a private server for friends only, using the 2007 Christmas update.
  2.  
  3. I'd greatly appreciate feedback; please point out any errors and especially flesh out any parts of the guide you think might need more information. Thanks.
  4.  
  5.  
  6.  
  7. Hosting a Private Tibia 8.10 Server (Christmas 2007 Patch) on OVH VPS
  8. A complete guide from renting the server to your first login
  9.  
  10. Overview
  11. The Tibia 8.10 client (also known as the "Winter Update 2007" or "Christmas 2007 patch") introduced the Rookgaard revamp, Venore sewers, and several skill/mechanic adjustments. To replicate this era we'll use The Forgotten Server (TFS) 0.3.6, which natively supports protocol 8.10, paired with the MyAAC web panel for account creation, all running on an Ubuntu 22.04 LTS VPS from OVHcloud.
  12.  
  13. Stack summary:
  14.  
  15. VPS: OVHcloud VPS Starter or Value (Ubuntu 22.04 LTS)
  16. Server engine: The Forgotten Server 0.3.6 (protocol 8.10)
  17. Database: MySQL 8 / MariaDB
  18. Web server: Apache2 + PHP 8.1
  19. Account manager: MyAAC
  20. Client: Tibia 8.10 + OTLand IP Changer (Windows PC)
  21. Estimated setup time: 2–4 hours.
  22.  
  23. Part 1 — Renting the OVH VPS
  24. 1.1 Choose Your Plan
  25. For a small private server (1–20 players) the VPS Starter is sufficient:
  26.  
  27. VPS Starter (~$6–8/month): 1 vCore, 2 GB RAM, 20 GB NVMe SSD
  28. VPS Value (~$10–14/month): 2 vCores, 4 GB RAM, 80 GB NVMe SSD — recommended if you want room to grow
  29. Note: OVH has modest price increases rolling out through 2026 due to memory market pressures, so check the current OVHcloud pricing page for exact figures before ordering.
  30.  
  31. 1.2 Order the VPS
  32. Go to https://www.ovhcloud.com/en/vps/ (or your regional OVH site).
  33. Click Order on the Starter or Value plan.
  34. During configuration, select:
  35. Operating System: Ubuntu 22.04 LTS
  36. Datacenter location: Choose the one geographically closest to your players (e.g., Strasbourg/Frankfurt for Europe, BHS for North America).
  37. SSH key: If you already have an SSH key pair, paste your public key here. If not, you can skip this and use the password OVH emails you — but generating an SSH key is recommended (see 1.3).
  38. Complete payment and wait for the provisioning email (~5–15 minutes). It will contain your VPS IP address and root password (if you didn't use an SSH key).
  39. 1.3 Generate an SSH Key (Recommended)
  40. On your Windows PC, open PowerShell and run:
  41.  
  42. powershell:
  43. ssh-keygen -t ed25519 -C "tibia-server"
  44. Press Enter for defaults. Your keys will be saved to C:\Users\YourName\.ssh\id_ed25519 (private) and id_ed25519.pub (public). Copy the contents of id_ed25519.pub and paste it into the OVH SSH key field during ordering.
  45.  
  46. Part 2 — Initial Server Setup
  47. 2.1 Connect via SSH
  48. From PowerShell (Windows 10/11 has SSH built in):
  49.  
  50. bash:
  51. ssh root@YOUR_VPS_IP
  52. If you used a password instead of an SSH key, enter it when prompted. You'll see a welcome message from Ubuntu.
  53.  
  54. 2.2 Update the System
  55. bash:
  56. apt update && apt upgrade -y
  57. This may take a few minutes. Reboot if prompted:
  58.  
  59. bash:
  60. reboot
  61. Reconnect via SSH after ~30 seconds.
  62.  
  63. 2.3 Create a Non-Root User
  64. Running the server as root is a security risk. Create a dedicated user:
  65. adduser tibia
  66.  
  67. usermod -aG sudo tibia
  68. Set a strong password when prompted. From now on, you can SSH as this user:
  69.  
  70. bash:
  71. ssh tibia@YOUR_VPS_IP
  72. Or switch to it within your current session:
  73.  
  74. bash:
  75. su - tibia
  76. 2.4 Configure the Firewall
  77. Ubuntu 22.04 includes ufw. Allow only the ports we need:
  78.  
  79. bash:
  80. sudo ufw allow OpenSSH # Port 22 - SSH access
  81. sudo ufw allow 7171/tcp # Tibia login server port
  82. sudo ufw allow 7172/tcp # Tibia game world port
  83. sudo ufw allow 80/tcp # HTTP - web account manager
  84. sudo ufw allow 443/tcp # HTTPS (optional, for later)
  85. sudo ufw enable
  86. sudo ufw status
  87. Confirm that ufw shows all five rules as ALLOW.
  88.  
  89. Part 3 — Install Dependencies
  90. 3.1 Install Build Tools and Libraries
  91. TFS 0.3.6 is a C++ application. We need compilers and libraries:
  92.  
  93. bash:
  94. sudo apt install -y \
  95. build-essential \
  96. cmake \
  97. git \
  98. libmysqlclient-dev \
  99. libboost-all-dev \
  100. liblua5.1-0-dev \
  101. libxml2-dev \
  102. libgmp3-dev \
  103. libssl-dev \
  104. zlib1g-dev \
  105. pkg-config
  106. Note on liblua: TFS 0.3.6 specifically requires Lua 5.1. Ubuntu 22.04 has it available as liblua5.1-0-dev. Do not install Lua 5.4 — it will break compilation.
  107.  
  108. 3.2 Install MariaDB (MySQL)
  109. bash:
  110. sudo apt install -y mariadb-server
  111. sudo systemctl enable mariadb
  112. sudo systemctl start mariadb
  113. Secure the installation:
  114.  
  115. bash:
  116. sudo mysql_secure_installation
  117. When prompted:
  118.  
  119. Current root password: press Enter (empty)
  120. Set root password? Y → enter a strong password and remember it
  121. Remove anonymous users? Y
  122. Disallow root login remotely? Y
  123. Remove test database? Y
  124. Reload privilege tables? Y
  125. 3.3 Create the Tibia Database and User
  126. Log into MariaDB:
  127.  
  128. bash:
  129. sudo mysql -u root -p
  130. Enter the root password you just set. Then run these SQL commands:
  131.  
  132. sql:
  133. CREATE DATABASE tibia_db CHARACTER SET utf8 COLLATE utf8_general_ci;
  134. CREATE USER 'tibia_user'@'localhost' IDENTIFIED BY 'YourStrongDBPassword123!';
  135. GRANT ALL PRIVILEGES ON tibia_db.* TO 'tibia_user'@'localhost';
  136. FLUSH PRIVILEGES;
  137. EXIT;
  138. Replace YourStrongDBPassword123! with something secure. Note it down — you'll need it later.
  139.  
  140. 3.4 Install Apache2 and PHP
  141. The web account manager (MyAAC) needs a web server and PHP:
  142.  
  143. bash:
  144. sudo apt install -y apache2 php8.1 php8.1-mysql php8.1-xml php8.1-mbstring php8.1-zip php8.1-gd php8.1-curl libapache2-mod-php8.1 composer
  145. sudo a2enmod rewrite
  146. sudo systemctl restart apache2
  147. Part 4 — Compile The Forgotten Server 0.3.6
  148. 4.1 Get the Source Code
  149. The recommended source for 8.10 support is the celohere fork of TFS, which targets older protocols cleanly:
  150.  
  151. bash:
  152. cd /home/tibia
  153. git clone https://github.com/celohere/forgottenserver.git tfs
  154. cd tfs
  155. Protocol note: This repo supports protocol 8.10 (client version 810). If it defaults to a slightly different version, you'll patch config.lua in the next section to force 8.10.
  156.  
  157. 4.2 Compile
  158. bash:
  159. mkdir build
  160. cd build
  161. cmake .. -DCMAKE_BUILD_TYPE=Release
  162. make -j$(nproc)
  163. $(nproc) uses all available CPU cores. Compilation takes 5–15 minutes. If you see errors about missing libraries, re-check Step 3.1.
  164.  
  165. When it finishes, you should see an executable called tfs (or otserv) in the build directory. Copy it to the server folder:
  166.  
  167. bash:
  168. cp tfs /home/tibia/tfs/
  169. Part 5 — Configure the Server
  170. 5.1 Import the Database Schema
  171. bash:
  172. cd /home/tibia/tfs
  173. mysql -u tibia_user -p tibia_db < schema.sql
  174. Enter YourStrongDBPassword123! when prompted. This creates all necessary tables (accounts, players, map data, etc.).
  175.  
  176. 5.2 Edit config.lua
  177. This is the main server configuration file:
  178.  
  179. bash:
  180. cp config.lua.dist config.lua
  181. nano config.lua
  182. Key settings to change (find each line with Ctrl+W in nano):
  183.  
  184. lua:
  185. -- Server identity
  186. serverName = "My Tibia Server"
  187. statusTimeout = 5000
  188.  
  189. -- Network
  190. ip = "YOUR_VPS_IP" -- Your OVH VPS public IP
  191. loginPort = 7171
  192. gamePort = 7172
  193. statusPort = 7171
  194.  
  195. -- Database
  196. mysqlHost = "127.0.0.1"
  197. mysqlUser = "tibia_user"
  198. mysqlPass = "YourStrongDBPassword123!"
  199. mysqlDatabase = "tibia_db"
  200.  
  201. -- Protocol version (8.10 = Christmas 2007)
  202. clientVersionMin = 810
  203. clientVersionMax = 810
  204.  
  205. -- Rates (adjust to taste)
  206. rateExp = 5
  207. rateSkill = 5
  208. rateMagic = 5
  209. rateLoot = 2
  210.  
  211. -- World type: "pvp", "no-pvp", or "pvp-enforced"
  212. worldType = "pvp"
  213. Save with Ctrl+O, then Enter, then Ctrl+X.
  214.  
  215. 5.3 Download a Real Map (Optional but Recommended)
  216. A "real map" (RL map) is a community-made recreation of the actual Tibia map as it existed in 2007. Without it, the server will have a blank world.
  217.  
  218. Search OTLand (otland.net) for "8.1 real map" or "8.10 RL map OTBM". The most common format is a .otbm file. Once you have it:
  219.  
  220. bash:
  221. # Upload via SCP from your PC (run in a new PowerShell window):
  222. scp C:\Downloads\map.otbm tibia@YOUR_VPS_IP:/home/tibia/tfs/data/world/
  223.  
  224. # On the server, edit config.lua to point to it:
  225. # mapName = "data/world/map.otbm"
  226. 5.4 Set Correct Permissions
  227. bash:
  228. chmod +x /home/tibia/tfs/tfs
  229. chown -R tibia:tibia /home/tibia/tfs
  230. Part 6 — Run the Server
  231. 6.1 Test Launch
  232. bash:
  233. cd /home/tibia/tfs
  234. ./tfs
  235. You should see output like:
  236.  
  237. > Loading config...
  238. > Loading items... 28083 items loaded.
  239. > Loading map... done.
  240. > Starting Server...
  241. > OpenTibia server running.
  242. If you see errors, they are usually self-explanatory (wrong DB password, missing map file, etc.).
  243.  
  244. Press Ctrl+C to stop.
  245.  
  246. 6.2 Run as a Background Service with Screen
  247. Install screen so the server keeps running after you disconnect:
  248.  
  249. bash:
  250. sudo apt install -y screen
  251. screen -S tibia
  252. cd /home/tibia/tfs
  253. ./tfs
  254. Press Ctrl+A then D to detach (leave the server running in the background).
  255.  
  256. To reattach later:
  257.  
  258. bash:
  259. screen -r tibia
  260. 6.3 (Optional) Set Up as a systemd Service for Auto-Start
  261. This makes the server start automatically on reboot:
  262.  
  263. bash:
  264. sudo nano /etc/systemd/system/tibia.service
  265. Paste:
  266.  
  267. ini:
  268. [Unit]
  269. Description=Tibia OTS Server
  270. After=network.target mariadb.service
  271.  
  272. [Service]
  273. Type=simple
  274. User=tibia
  275. WorkingDirectory=/home/tibia/tfs
  276. ExecStart=/home/tibia/tfs/tfs
  277. Restart=on-failure
  278. RestartSec=10
  279.  
  280. [Install]
  281. WantedBy=multi-user.target
  282. Enable and start:
  283.  
  284. bash:
  285. sudo systemctl daemon-reload
  286. sudo systemctl enable tibia
  287. sudo systemctl start tibia
  288. sudo systemctl status tibia
  289. Part 7 — Install the Web Account Manager (MyAAC)
  290. Players (and you) will create accounts through a web portal. We'll use MyAAC, the most actively maintained option.
  291.  
  292. 7.1 Download MyAAC
  293. bash:
  294. cd /var/www/html
  295. sudo rm index.html # Remove default Apache page
  296. sudo git clone https://github.com/slawkens/myaac.git .
  297. 7.2 Configure Permissions
  298. bash:
  299. sudo chown -R www-data:www-data /var/www/html
  300. sudo chmod 660 /var/www/html/config.local.php
  301. sudo chmod -R 760 /var/www/html/system/cache
  302. sudo chmod 660 /var/www/html/images/guilds
  303. sudo chmod 660 /var/www/html/images/houses
  304. sudo chmod 660 /var/www/html/images/gallery
  305. 7.3 Enable Apache mod_rewrite (if not already done)
  306. bash:
  307. sudo a2enmod rewrite
  308. sudo nano /etc/apache2/sites-available/000-default.conf
  309. Inside the <VirtualHost *:80> block, add:
  310.  
  311. apache:
  312. <Directory /var/www/html>
  313. AllowOverride All
  314. Require all granted
  315. </Directory>
  316. Restart Apache:
  317.  
  318. bash:
  319. sudo systemctl restart apache2
  320. 7.4 Run the Web Installer
  321. Open a browser on your PC and go to:
  322.  
  323. http://YOUR_VPS_IP/install
  324. The installer will walk you through:
  325.  
  326. Database settings: Enter 127.0.0.1, tibia_user, your DB password, tibia_db.
  327. Server settings: Point MyAAC to your TFS installation directory (/home/tibia/tfs).
  328. Admin account: Create your admin username and password for the web panel.
  329. Delete install directory when prompted — this is required for security.
  330. After installation, your account manager is live at http://YOUR_VPS_IP.
  331.  
  332. Part 8 — Create Your First Account and Character
  333. 8.1 Create an Account via MyAAC
  334. Open http://YOUR_VPS_IP in your browser.
  335. Click Register and fill in your account name, password, and email.
  336. Log in, then go to your account page and click Create Character.
  337. Choose a name, vocation (Knight, Paladin, Sorcerer, Druid), and sex. Submit.
  338. 8.2 Give Yourself God Privileges (Optional)
  339. To give your character full GM/God access for testing, connect to the database:
  340.  
  341. bash:
  342. sudo mysql -u tibia_user -p tibia_db
  343. sql:
  344. -- Find your account ID:
  345. SELECT id, name FROM accounts WHERE name='YourAccountName';
  346.  
  347. -- Set group_id to 6 (God) for your player:
  348. UPDATE players SET group_id=6 WHERE name='YourCharacterName';
  349. EXIT;
  350. Part 9 — Connect with the Tibia 8.10 Client
  351. 9.1 Download the Tibia 8.10 Client
  352. On your Windows PC, download the Tibia 8.10 client. The community maintains a collection on OTLand. Search for "Tibia client download archive OTLand" or the OTLand thread titled "Download Older, Official Clients." The file is typically named Tibia810.exe or similar. Scan it with your antivirus before running.
  353.  
  354. 9.2 Download an IP Changer
  355. The Tibia 8.10 client is hardcoded to connect to CipSoft's servers. You need an IP changer to redirect it to your VPS.
  356.  
  357. Download the OTLand IP Changer from otland.net. It is free, safe, and well-known in the OT community.
  358.  
  359. 9.3 Connect to Your Server
  360. Open the OTLand IP Changer.
  361. Enter your VPS IP in the IP field.
  362. Set port to 7171.
  363. Click Apply (or the equivalent button — the UI varies by version).
  364. Launch Tibia 8.10 from within the IP Changer, or launch it separately after applying the redirect.
  365. Log in with your account name and password from Step 8.1.
  366. Select your character and click OK.
  367. You should now be in your private Tibia 8.10 world.
  368.  
  369. Part 10 — Maintenance & Tips
  370. Saving and Shutting Down Safely
  371. If you're using screen, reattach and press Ctrl+C — TFS will auto-save before closing. If using systemd:
  372.  
  373. bash:
  374. sudo systemctl stop tibia
  375. Never hard-kill the process without saving or you may lose recent character progress.
  376.  
  377. Checking Server Logs
  378. bash:
  379. # If using screen:
  380. screen -r tibia
  381.  
  382. # If using systemd:
  383. sudo journalctl -u tibia -f
  384. Backing Up the Database
  385. Set up a simple cron job for nightly backups:
  386.  
  387. bash:
  388. crontab -e
  389. Add:
  390.  
  391. bash:
  392. 0 3 * * * mysqldump -u tibia_user -pYourStrongDBPassword123! tibia_db > /home/tibia/backup-$(date +\%F).sql
  393. This dumps the database to a file every day at 3 AM.
  394.  
  395. Keeping Tibia Data Private
  396. Since this is a private server, you probably don't want it listed publicly. In config.lua, make sure:
  397.  
  398. lua:
  399. -- Don't broadcast to OTS lists
  400. statusTimeout = 0
  401. GM Commands In-Game
  402. Once logged in as a God character, you can use these in-game commands:
  403.  
  404. Command Effect
  405. /a message Broadcast to all players
  406. /b message Broadcast in orange
  407. /teleport x,y,z Teleport to coordinates
  408. /item itemid, amount Create an item
  409. /kick charactername Kick a player
  410. /ban accountname Ban an account
  411. /ghost Toggle invisibility
  412. Troubleshooting
  413. Server won't start / "cannot open shared libraries" error Run ldd ./tfs to see which library is missing, then install it via apt.
  414.  
  415. Client says "You are running an outdated version of Tibia" Double-check that clientVersionMin and clientVersionMax in config.lua are both set to 810.
  416.  
  417. Cannot connect from client / connection refused
  418.  
  419. Confirm the server is running: sudo systemctl status tibia
  420.  
  421. Confirm the firewall allows 7171/7172: sudo ufw status
  422.  
  423. Confirm the IP in config.lua matches your VPS's actual public IP
  424. Website shows blank page or 500 error Check Apache logs: sudo tail -50 /var/log/apache2/error.log
  425.  
  426.  
  427.  
  428. Characters not saving on shutdown Make sure you are stopping the server gracefully (systemctl stop, not kill -9).
Advertisement
Add Comment
Please, Sign In to add comment