2) Deploy telemporio server application with a few simple linux commands
As soon as you buy a VPS, within seconds you will receive an email with details for how to connect. The email will determine the IP address of your new VPS, say '141.94.27.72', the default user, say 'debian', and an initial password, say 'WrSWENx76xmP'. Therefore, assuming that you are sitting in front of a linux system, open a terminal and use ssh in order to connect to your new VPS for the first time. When prompted for password type 'WrSWENx76xmP'.
Now, just follow the simple instructions below but make sure you replace xyz.com with your own domain and the '141.94.27.72' IP address with the IP address of your own VPS.
$ ssh debian@141.94.27.72
The system will immediately ask you to change your password, so go ahead and do so.
Then, the first thing we need to do is set a root password:
$ sudo passwd root
Next, we'll create 'admin' user. Using the 'admin' username is an established convention in the Telemporio system, so stick with it and don't be tempted to change it to a different one.
$ sudo useradd -m admin -s /usr/bin/bash
Next, login as root and give admin user a password.
$ su
# passwd admin
Then, add admin in sudoers file.
# vi /etc/sudoers
...
root ALL=(ALL:ALL) ALL
admin ALL=(ALL:ALL) ALL
...
Next, change /etc/hostname to "emporio"
$ sudo vi /etc/hostname
Next, change the contents of /etc/hosts to the following:
$ sudo vi /etc/hosts
...
127.0.0.1 localhost
127.0.0.1 emporio.xyz.com emporio
141.94.27.72 emporio.xyz.com emporio
...
Copy /etc/hosts to /etc/hosts_orig:
$ sudo cp /etc/hosts /etc/hosts_orig
Reboot for the changes to take effect and log back in as admin user:
$ sudo shutdown -r now
Connection to 141.94.27.72 closed.
...
$ ssh admin@141.94.27.72
The Telemporio client/server application consists of three executable files that are available for download as a compressed archive. Let's create a bin directory where we will extract the three files from the compressed archive after we download it.
$ cd /home/admin
$ mkdir -p telemporio/bin
$ cd /home/admin/telemporio/bin
$ wget https://telemporio.com/i/telemporio.tar.gz
$ tar -xvf telemporio.tar.gz
You should now have three more files in /home/admin/telemporio/bin directory other than the downloaded telemporio.tar.gz (telemporio, telemporio.js and telemporio.wasm). Let's copy the 'telemporio' file to /usr/local/bin/ directory and execute it with the '-init' parameter in order to initialize everything. It doesn't hurt if you repeat the -init command a couple of times more, just in case. The second and third time it will immediately terminate indicating that everything has been installed and set.
$ sudo cp telemporio /usr/local/bin/
$ sudo telemporio -init
$ sudo telemporio -init
$ sudo telemporio -init
...
All packages are up to date.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
...
Upon completion of the '-init' command, all debian linux dependencies should have been installed and all necessary configuration should have been completed. As a final step, let's create some wildcard TSL certificates for xyz.com that are necessary for the server to operate securely. During this process you will need access to the DNS dashboard of the website where you registered your domain in order to add some necessary TXT records. If you have done it before, the process is very straightforward. Just follow the instructions but make sure you replace xyz.com with your own domain.
$ sudo certbot certonly --manual --preferred-challenges=dns --rsa-key-size 4096 -d "*.xyz.com" -d "xyz.com"
At the end of this process your public/private certificate files should be stored in /etc/letsencrypt/live/xyz.com directory. You only need to change their permissions so that your server can use them even after dropping the root priviliges at start-up.
$ sudo chmod -R 655 /etc/letsencrypt/live
Now finally, you can start your chat server.
$ sudo telemporio -start xyz.com
Let's test it. Open your browser and go to https://xyz.com Your chat server is up and running!
The next important step is to access the administrator's control panel and change the default passwords. (Telemorio uses two numeric passwords, up to nine digits each.) By convention, the initial default passwords for admin.xyz.com are '888' and '888'. Also by convention, the default administrator control panel is located at https://admin.xyz.com/x/a/888/888. You can now access your control panel and change the default passwords to some other more difficult to guess numbers.