How to Host an Open Tibia Server Online: VPS, Ports and DDoS Protection
Running your Open Tibia server at home is fine for testing. For a public server you want it online all day, with a stable connection. There are two main ways to do that: use your home connection, or rent a VPS (virtual private server).
Home hosting vs VPS
| Home computer | VPS | |
|---|---|---|
| Cost | Free, plus electricity | Monthly fee |
| Uptime | Only while your PC is on | Always on |
| Speed and stability | Depends on your internet | Data center connection |
| Security | Exposes your home IP | Separate from your home |
For anything public, a VPS is the better choice.
Choosing a VPS
- Location. Pick a data center close to most of your players, because it lowers lag.
- Resources. A small server can run on a modest VPS. More players and a bigger map need more RAM and CPU.
- Operating system. Linux (such as Ubuntu) is common and uses fewer resources. Windows works too if you prefer it.
- DDoS protection. Attacks are common against game servers. Ask the provider what protection is included.
Set up the server
- Install the database, the engine and your website on the VPS, the same way as on your own computer.
- In
config.lua, setipto the public IP address of the VPS (or your domain). - Open the login and game ports in the firewall. With the defaults that means TCP 7171 and 7172. On Ubuntu with ufw, you allow them with the
ufw allowcommand. - Open ports 80 and 443 for the website.
- Start the engine, then connect from another computer to test it.
Hosting from home: port forwarding
If you host at home, log in to your router and forward TCP ports 7171 and 7172 to your computer. Give the computer a fixed local address so the rule keeps working. Then use your public IP or a dynamic DNS name as the server address. Remember that your home IP becomes visible to players.
Protect your server
- Keep backups. Back up the database and the map every day, and store them off the server.
- Use strong passwords for the VPS, the database and the website admin.
- Update your software and remove default accounts.
- DDoS protection. A web proxy such as Cloudflare can protect your website, but game traffic uses other ports, so choose a host that includes network level protection for the game.
- Hide the database. Do not open the database port to the internet.
When it is online
Once players can connect, add your server to OTServZone so people can find it, and read how to get players. If you are still setting up, start from the beginner guide.
Browse live Open Tibia servers by players, uptime and client version, or list your own server for free.
See the server list | Add your server