• 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!

Linux OT-Playbook

Ralumbi

apt install nubmod
Content Editor
Premium User
Joined
Jun 8, 2011
Messages
187
Solutions
6
Reaction score
70
Location
Netherlands
GitHub
Ralumbi
OT-Playbook Automatic Server Installation - Github.com/Ralumbi/ot-playbook

This project is made for the ease of installing your ubuntu 20.04 lts server optimized for tibia otserver hosting without breaking your head. This playbook should work from ubuntu 16.04 lts up to 20.04 lts.

šŸ“ Table of Contents
  • [About]
  • [Configure]
  • [Deployment]
  • [Usage]
  • [Built Using]
  • [Authors]

šŸ§ About
The project started with the idea I've gotten from DevelopersPL which made the very first version of such playbook tibia otserver related. The reason I have made a new one is because I've been working with many different servers. The needs were getting very huge as in many server installs and testing new server company's. Installing a complete server over and over manually gets you freaked out so I needed something which was just having what I demanded to have. Where the one which was already out there having too many extra's up for installation.

šŸ Getting Started
We will need to setup ansible on your machine first before we can continue. I will describe on how-to setup ansible on windows and ubuntu linux. When you have got this setup then the rest will be peanuts!
See [deployment](#deployment) for notes on how to deploy the project on a live system.
Note: Setting up ansible on your own machine is required when you are in need to install multiple servers. Or need to install it many times because you are running virtualbox on your machine to do tests/development in your linux system. Deploying the playbook on just one machine will also be described, but is not recommended.

Prerequisites windows
1. Open PowerShell as Administrator and run:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
2. Restart your computer when prompted.
3. Open the Microsoft Store and search for ubuntu.
4. Install ubuntu 18.04 or higher.
Once installed you must run it and follow the instruction in the terminal.\
When everything is setup please continue with the Prerequisites ubuntu below:
Prerequisites ubuntu
What things you need to install the software and how to install them.
Ansible-Playbook

sudo apt update && sudo apt upgrade -y sudo apt install git sudo apt install ansible git clone https://github.com/ralumbi/ot-playbook cd ot-playbook

Now continue with the next steps

šŸ”§ Configure the playbook
In the hosts file you must configure the server(s) you want to install.

Break down into pieces
folder-structure.png

vim hosts
Open the hosts file there you will see:

[setupserver] IPADDRESSHERE ansible_user=SERVERUSERNAME ansible_sudo_pass=SERVERPASSWORD
Press the insert key on your keyboard so you make the file able for editting.
change IPADDRESSHERE to the ip-address of your server change SERVERUSERNAME to your servers username (for example root) change SERVERPASSWORD to your servers password
Now you must press CTRL+C and write :wq after so you will write the changes and quit the file.
We are set now!

šŸŽˆ Usage
Set your php version manually:
vim roles/setupserver/vars/main.yml
Uncomment the version of ubuntu you're using and comment the version which is uncommented :)
  • Website location: /home/otadmin/www/public/
  • GameServer location: /home/otadmin/forgottenserver/
  • Database: http://yourip:2344
  • Database password: Login the terminal with the otadmin user. You will find the mysql password in the begin screen.

šŸš€ Deployment
To use the playbook we will need to open the terminal we setup on windows or just open your terminal on ubuntu by CTRL+ALT+T.
  • Navigate to the directory.
  • Set the hosts in the file.
Before we can run the playbook we got to open up our ssh connection one-way towards the server.
First we create a ssh key;
ssh-keygen
presh enter 3 times (you don't need to protect this key, if you do you have to make sure you save the password to it!!!)
I personally never do.

Then we have to copy the public key to the server;
ssh-copy-id -i ~/.ssh/id_rsa.pub YOURNAME@YOURSERVER

YOURNAME = your username (example: root)
YOURSERVER = your servername (example: 127.0.0.1 or domain.com)
Now we simply write:
ansible-playbook letsplay.yml -i hosts

The server will now install and you will be able to login to the server with:

username: otadmin password: otadmin

Once you have logged in for the first time please change your password immediately by typing 'passwd' in the terminal.

ā› Built Using
āœ Authors
Get your clone/fork at Ralumbi/ot-playbook (https://github.com/Ralumbi/ot-playbook)
 
Last edited:
This is great!
I was doing something similiar a few days ago using developersPLs script, but i wanted to compile nekiros 8.6 downgrade. Is there anyway to choose a specific branch with ansible?
 
This is great!
I was doing something similiar a few days ago using developersPLs script, but i wanted to compile nekiros 8.6 downgrade. Is there anyway to choose a specific branch with ansible?
You must change the compile settings specific for that version of nekiro's downgraded branch. Which must be the same as the most recent TFS wiki. I didn't update the ot-playbook yet, its in the planning, can take a few weeks.

otland/forgottenserver (https://github.com/otland/forgottenserver/wiki/Compiling-on-Ubuntu)
Code:
sudo apt install git cmake build-essential libluajit-5.1-dev libmysqlclient-dev libboost-system-dev libboost-iostreams-dev libboost-filesystem-dev libpugixml-dev libcrypto++-dev
if running on ubuntu 20.04 also install:
Code:
sudo apt install libboost-date-time-dev

Sincerely,
Ralumbi
 
You must change the compile settings specific for that version of nekiro's downgraded branch. Which must be the same as the most recent TFS wiki. I didn't update the ot-playbook yet, its in the planning, can take a few weeks.

otland/forgottenserver (https://github.com/otland/forgottenserver/wiki/Compiling-on-Ubuntu)
Code:
sudo apt install git cmake build-essential libluajit-5.1-dev libmysqlclient-dev libboost-system-dev libboost-iostreams-dev libboost-filesystem-dev libpugixml-dev libcrypto++-dev
if running on ubuntu 20.04 also install:
Code:
sudo apt install libboost-date-time-dev

Sincerely,
Ralumbi
Thanks for your answer Ralumbi! I wasn't clear enough. I meant how would i go about changing this:
YAML:
- name: download latest tfs
  git:
    repo: https://github.com/otland/forgottenserver.git
    dest: /home/otadmin/forgottenserver

to point at nekiros 8.6-branch (https://github.com/nekiro/forgottenserver/tree/8.6-downgrade)?
I am aware he has stopped maintaining this branch because its a nightmare since 1.3 is still a work in progress and changes frequently occur. I do feel it is the best 8.6 distribution to be using
 
Thanks for your answer Ralumbi! I wasn't clear enough. I meant how would i go about changing this:
YAML:
- name: download latest tfs
  git:
    repo: https://github.com/otland/forgottenserver.git
    dest: /home/otadmin/forgottenserver

to point at nekiros 8.6-branch (https://github.com/nekiro/forgottenserver/tree/8.6-downgrade)?
I am aware he has stopped maintaining this branch because its a nightmare since 1.3 is still a work in progress and changes frequently occur. I do feel it is the best 8.6 distribution to be using
1606402648155.png

From: clone a specific branch from git through ansible playbook (https://stackoverflow.com/questions/33450240/clone-a-specific-branch-from-git-through-ansible-playbook)

try with:
Lua:
- name: download latest tfs
  git:
    repo: https://github.com/nekiro/forgottenserver.git
    version: 8.6-downgrade
    dest: /home/otadmin/forgottenserver
 
Last edited by a moderator:
View attachment 51923

From: clone a specific branch from git through ansible playbook (https://stackoverflow.com/questions/33450240/clone-a-specific-branch-from-git-through-ansible-playbook)

try with:
Lua:
- name: download latest tfs
  git:
    repo: https://github.com/otland/forgottenserver.git
    version: 8.6-downgrade
    dest: /home/otadmin/forgottenserver
Thanks alot!
For anyone that finds this, repo must be set to: nekiro/forgottenserver (https://github.com/nekiro/forgottenserver.git)
Lua:
- name: download latest tfs
  git:
    repo: https://github.com/nekiro/forgottenserver.git
    version: 8.6-downgrade
    dest: /home/otadmin/forgottenserver
 
Yes, sorry. OG post edited!
 
Last edited by a moderator:
Back
Top