Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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.
- 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.
- Hosting a Private Tibia 8.10 Server (Christmas 2007 Patch) on OVH VPS
- A complete guide from renting the server to your first login
- Overview
- 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.
- Stack summary:
- VPS: OVHcloud VPS Starter or Value (Ubuntu 22.04 LTS)
- Server engine: The Forgotten Server 0.3.6 (protocol 8.10)
- Database: MySQL 8 / MariaDB
- Web server: Apache2 + PHP 8.1
- Account manager: MyAAC
- Client: Tibia 8.10 + OTLand IP Changer (Windows PC)
- Estimated setup time: 2–4 hours.
- Part 1 — Renting the OVH VPS
- 1.1 Choose Your Plan
- For a small private server (1–20 players) the VPS Starter is sufficient:
- VPS Starter (~$6–8/month): 1 vCore, 2 GB RAM, 20 GB NVMe SSD
- VPS Value (~$10–14/month): 2 vCores, 4 GB RAM, 80 GB NVMe SSD — recommended if you want room to grow
- 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.
- 1.2 Order the VPS
- Go to https://www.ovhcloud.com/en/vps/ (or your regional OVH site).
- Click Order on the Starter or Value plan.
- During configuration, select:
- Operating System: Ubuntu 22.04 LTS
- Datacenter location: Choose the one geographically closest to your players (e.g., Strasbourg/Frankfurt for Europe, BHS for North America).
- 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).
- 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).
- 1.3 Generate an SSH Key (Recommended)
- On your Windows PC, open PowerShell and run:
- powershell:
- ssh-keygen -t ed25519 -C "tibia-server"
- 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.
- Part 2 — Initial Server Setup
- 2.1 Connect via SSH
- From PowerShell (Windows 10/11 has SSH built in):
- bash:
- ssh root@YOUR_VPS_IP
- If you used a password instead of an SSH key, enter it when prompted. You'll see a welcome message from Ubuntu.
- 2.2 Update the System
- bash:
- apt update && apt upgrade -y
- This may take a few minutes. Reboot if prompted:
- bash:
- reboot
- Reconnect via SSH after ~30 seconds.
- 2.3 Create a Non-Root User
- Running the server as root is a security risk. Create a dedicated user:
- adduser tibia
- usermod -aG sudo tibia
- Set a strong password when prompted. From now on, you can SSH as this user:
- bash:
- ssh tibia@YOUR_VPS_IP
- Or switch to it within your current session:
- bash:
- su - tibia
- 2.4 Configure the Firewall
- Ubuntu 22.04 includes ufw. Allow only the ports we need:
- bash:
- sudo ufw allow OpenSSH # Port 22 - SSH access
- sudo ufw allow 7171/tcp # Tibia login server port
- sudo ufw allow 7172/tcp # Tibia game world port
- sudo ufw allow 80/tcp # HTTP - web account manager
- sudo ufw allow 443/tcp # HTTPS (optional, for later)
- sudo ufw enable
- sudo ufw status
- Confirm that ufw shows all five rules as ALLOW.
- Part 3 — Install Dependencies
- 3.1 Install Build Tools and Libraries
- TFS 0.3.6 is a C++ application. We need compilers and libraries:
- bash:
- sudo apt install -y \
- build-essential \
- cmake \
- git \
- libmysqlclient-dev \
- libboost-all-dev \
- liblua5.1-0-dev \
- libxml2-dev \
- libgmp3-dev \
- libssl-dev \
- zlib1g-dev \
- pkg-config
- 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.
- 3.2 Install MariaDB (MySQL)
- bash:
- sudo apt install -y mariadb-server
- sudo systemctl enable mariadb
- sudo systemctl start mariadb
- Secure the installation:
- bash:
- sudo mysql_secure_installation
- When prompted:
- Current root password: press Enter (empty)
- Set root password? Y → enter a strong password and remember it
- Remove anonymous users? Y
- Disallow root login remotely? Y
- Remove test database? Y
- Reload privilege tables? Y
- 3.3 Create the Tibia Database and User
- Log into MariaDB:
- bash:
- sudo mysql -u root -p
- Enter the root password you just set. Then run these SQL commands:
- sql:
- CREATE DATABASE tibia_db CHARACTER SET utf8 COLLATE utf8_general_ci;
- CREATE USER 'tibia_user'@'localhost' IDENTIFIED BY 'YourStrongDBPassword123!';
- GRANT ALL PRIVILEGES ON tibia_db.* TO 'tibia_user'@'localhost';
- FLUSH PRIVILEGES;
- EXIT;
- Replace YourStrongDBPassword123! with something secure. Note it down — you'll need it later.
- 3.4 Install Apache2 and PHP
- The web account manager (MyAAC) needs a web server and PHP:
- bash:
- 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
- sudo a2enmod rewrite
- sudo systemctl restart apache2
- Part 4 — Compile The Forgotten Server 0.3.6
- 4.1 Get the Source Code
- The recommended source for 8.10 support is the celohere fork of TFS, which targets older protocols cleanly:
- bash:
- cd /home/tibia
- git clone https://github.com/celohere/forgottenserver.git tfs
- cd tfs
- 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.
- 4.2 Compile
- bash:
- mkdir build
- cd build
- cmake .. -DCMAKE_BUILD_TYPE=Release
- make -j$(nproc)
- $(nproc) uses all available CPU cores. Compilation takes 5–15 minutes. If you see errors about missing libraries, re-check Step 3.1.
- When it finishes, you should see an executable called tfs (or otserv) in the build directory. Copy it to the server folder:
- bash:
- cp tfs /home/tibia/tfs/
- Part 5 — Configure the Server
- 5.1 Import the Database Schema
- bash:
- cd /home/tibia/tfs
- mysql -u tibia_user -p tibia_db < schema.sql
- Enter YourStrongDBPassword123! when prompted. This creates all necessary tables (accounts, players, map data, etc.).
- 5.2 Edit config.lua
- This is the main server configuration file:
- bash:
- cp config.lua.dist config.lua
- nano config.lua
- Key settings to change (find each line with Ctrl+W in nano):
- lua:
- -- Server identity
- serverName = "My Tibia Server"
- statusTimeout = 5000
- -- Network
- ip = "YOUR_VPS_IP" -- Your OVH VPS public IP
- loginPort = 7171
- gamePort = 7172
- statusPort = 7171
- -- Database
- mysqlHost = "127.0.0.1"
- mysqlUser = "tibia_user"
- mysqlPass = "YourStrongDBPassword123!"
- mysqlDatabase = "tibia_db"
- -- Protocol version (8.10 = Christmas 2007)
- clientVersionMin = 810
- clientVersionMax = 810
- -- Rates (adjust to taste)
- rateExp = 5
- rateSkill = 5
- rateMagic = 5
- rateLoot = 2
- -- World type: "pvp", "no-pvp", or "pvp-enforced"
- worldType = "pvp"
- Save with Ctrl+O, then Enter, then Ctrl+X.
- 5.3 Download a Real Map (Optional but Recommended)
- 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.
- 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:
- bash:
- # Upload via SCP from your PC (run in a new PowerShell window):
- scp C:\Downloads\map.otbm tibia@YOUR_VPS_IP:/home/tibia/tfs/data/world/
- # On the server, edit config.lua to point to it:
- # mapName = "data/world/map.otbm"
- 5.4 Set Correct Permissions
- bash:
- chmod +x /home/tibia/tfs/tfs
- chown -R tibia:tibia /home/tibia/tfs
- Part 6 — Run the Server
- 6.1 Test Launch
- bash:
- cd /home/tibia/tfs
- ./tfs
- You should see output like:
- > Loading config...
- > Loading items... 28083 items loaded.
- > Loading map... done.
- > Starting Server...
- > OpenTibia server running.
- If you see errors, they are usually self-explanatory (wrong DB password, missing map file, etc.).
- Press Ctrl+C to stop.
- 6.2 Run as a Background Service with Screen
- Install screen so the server keeps running after you disconnect:
- bash:
- sudo apt install -y screen
- screen -S tibia
- cd /home/tibia/tfs
- ./tfs
- Press Ctrl+A then D to detach (leave the server running in the background).
- To reattach later:
- bash:
- screen -r tibia
- 6.3 (Optional) Set Up as a systemd Service for Auto-Start
- This makes the server start automatically on reboot:
- bash:
- sudo nano /etc/systemd/system/tibia.service
- Paste:
- ini:
- [Unit]
- Description=Tibia OTS Server
- After=network.target mariadb.service
- [Service]
- Type=simple
- User=tibia
- WorkingDirectory=/home/tibia/tfs
- ExecStart=/home/tibia/tfs/tfs
- Restart=on-failure
- RestartSec=10
- [Install]
- WantedBy=multi-user.target
- Enable and start:
- bash:
- sudo systemctl daemon-reload
- sudo systemctl enable tibia
- sudo systemctl start tibia
- sudo systemctl status tibia
- Part 7 — Install the Web Account Manager (MyAAC)
- Players (and you) will create accounts through a web portal. We'll use MyAAC, the most actively maintained option.
- 7.1 Download MyAAC
- bash:
- cd /var/www/html
- sudo rm index.html # Remove default Apache page
- sudo git clone https://github.com/slawkens/myaac.git .
- 7.2 Configure Permissions
- bash:
- sudo chown -R www-data:www-data /var/www/html
- sudo chmod 660 /var/www/html/config.local.php
- sudo chmod -R 760 /var/www/html/system/cache
- sudo chmod 660 /var/www/html/images/guilds
- sudo chmod 660 /var/www/html/images/houses
- sudo chmod 660 /var/www/html/images/gallery
- 7.3 Enable Apache mod_rewrite (if not already done)
- bash:
- sudo a2enmod rewrite
- sudo nano /etc/apache2/sites-available/000-default.conf
- Inside the <VirtualHost *:80> block, add:
- apache:
- <Directory /var/www/html>
- AllowOverride All
- Require all granted
- </Directory>
- Restart Apache:
- bash:
- sudo systemctl restart apache2
- 7.4 Run the Web Installer
- Open a browser on your PC and go to:
- http://YOUR_VPS_IP/install
- The installer will walk you through:
- Database settings: Enter 127.0.0.1, tibia_user, your DB password, tibia_db.
- Server settings: Point MyAAC to your TFS installation directory (/home/tibia/tfs).
- Admin account: Create your admin username and password for the web panel.
- Delete install directory when prompted — this is required for security.
- After installation, your account manager is live at http://YOUR_VPS_IP.
- Part 8 — Create Your First Account and Character
- 8.1 Create an Account via MyAAC
- Open http://YOUR_VPS_IP in your browser.
- Click Register and fill in your account name, password, and email.
- Log in, then go to your account page and click Create Character.
- Choose a name, vocation (Knight, Paladin, Sorcerer, Druid), and sex. Submit.
- 8.2 Give Yourself God Privileges (Optional)
- To give your character full GM/God access for testing, connect to the database:
- bash:
- sudo mysql -u tibia_user -p tibia_db
- sql:
- -- Find your account ID:
- SELECT id, name FROM accounts WHERE name='YourAccountName';
- -- Set group_id to 6 (God) for your player:
- UPDATE players SET group_id=6 WHERE name='YourCharacterName';
- EXIT;
- Part 9 — Connect with the Tibia 8.10 Client
- 9.1 Download the Tibia 8.10 Client
- 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.
- 9.2 Download an IP Changer
- The Tibia 8.10 client is hardcoded to connect to CipSoft's servers. You need an IP changer to redirect it to your VPS.
- Download the OTLand IP Changer from otland.net. It is free, safe, and well-known in the OT community.
- 9.3 Connect to Your Server
- Open the OTLand IP Changer.
- Enter your VPS IP in the IP field.
- Set port to 7171.
- Click Apply (or the equivalent button — the UI varies by version).
- Launch Tibia 8.10 from within the IP Changer, or launch it separately after applying the redirect.
- Log in with your account name and password from Step 8.1.
- Select your character and click OK.
- You should now be in your private Tibia 8.10 world.
- Part 10 — Maintenance & Tips
- Saving and Shutting Down Safely
- If you're using screen, reattach and press Ctrl+C — TFS will auto-save before closing. If using systemd:
- bash:
- sudo systemctl stop tibia
- Never hard-kill the process without saving or you may lose recent character progress.
- Checking Server Logs
- bash:
- # If using screen:
- screen -r tibia
- # If using systemd:
- sudo journalctl -u tibia -f
- Backing Up the Database
- Set up a simple cron job for nightly backups:
- bash:
- crontab -e
- Add:
- bash:
- 0 3 * * * mysqldump -u tibia_user -pYourStrongDBPassword123! tibia_db > /home/tibia/backup-$(date +\%F).sql
- This dumps the database to a file every day at 3 AM.
- Keeping Tibia Data Private
- Since this is a private server, you probably don't want it listed publicly. In config.lua, make sure:
- lua:
- -- Don't broadcast to OTS lists
- statusTimeout = 0
- GM Commands In-Game
- Once logged in as a God character, you can use these in-game commands:
- Command Effect
- /a message Broadcast to all players
- /b message Broadcast in orange
- /teleport x,y,z Teleport to coordinates
- /item itemid, amount Create an item
- /kick charactername Kick a player
- /ban accountname Ban an account
- /ghost Toggle invisibility
- Troubleshooting
- Server won't start / "cannot open shared libraries" error Run ldd ./tfs to see which library is missing, then install it via apt.
- Client says "You are running an outdated version of Tibia" Double-check that clientVersionMin and clientVersionMax in config.lua are both set to 810.
- Cannot connect from client / connection refused
- Confirm the server is running: sudo systemctl status tibia
- Confirm the firewall allows 7171/7172: sudo ufw status
- Confirm the IP in config.lua matches your VPS's actual public IP
- Website shows blank page or 500 error Check Apache logs: sudo tail -50 /var/log/apache2/error.log
- 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