1. Create Digital Ocean Droplet
Digital Ocean is a super easy virtual server platform. They make it extremely easy to spin up new servers for testing or production, and also provide an incredible amount of documented resources and help to get you going. If you have not signed up for Digital Ocean, but find that this guide has been helpful, please click on the Digital Ocean logo below – this is my referral link, and will get you $10.00 worth of credit towards your virtual servers.
Click Create and your droplet will be created. You will now receive an email that contains your IP address and temporary root password – copy that root password from the email and open PuTTY. Enter in the IP Address for your Digital Ocean droplet and press Enter to connect. Click YES when asked about authentication, and then login with root as the username. When prompted for the password, use SHIFT+INS to paste the password you copied from email.
In my case, my username was teamspeak so I typed ‘adduser teamspeak’ in PuTTY.
You will be prompted to enter a password twice, and then prompted for additional information (which you can skip through). Once you get to the confirmation, press Y to confirm, and your new user is created.
Now we need to allow our new user to use sudo to run root commands on the server. Type the following:
This adds your newly created username to the sudo group.
5. Change SSH to a Non-Standard Port and Disable root Login Access
Next, we want to block any ports that we aren’t going to use – or in other words, we want to specifically allow only ports that we want to allow. Run the following commands:
This opens up all of the necessary Teamspeak default ports. When you’re ready to actually commit these rules, you can double-check that all of your ports were entered correctly by typing (remember for each virtual server port you add, you will need to add the new port to the firewall rules as well):
Once you’re happy, run:
This turns on the firewall, and you’re good to go. If you did anything wrong, it is entirely possible that you just locked yourself out of your own Droplet…but no worries! Just go back to your Digital Ocean dashboard, destroy your droplet, and start over. Remember that you need to update UFW for each new instance of Teamspeak.
Set up your Time Zone by running:
A pink bordered window will appear – select your geographic area (use America for United States) and then select your city/time zone from the list. You can press TAB, arrow keys, and SPACE to move around these screens and make selections.
Once your time zone has been selected, press OK, and you’re done with Step 6.
Set up NTP (Network Time Protocol) by running:
This sets up your time server and syncs the clock. You can check NTP status by running:
Your local time should be set correctly (in 24-hour format).
9. Set Up a Swap File
Run the following commands to create and use a swap file.
This allocates 4GB as a swapfile in the /swapfile directory.
Sets permissions on the swap file directory.
Formats the swap file directory for use as a swap file.
Tells the server to use that directory as a swap file.
Finally, we need to make sure that the swap file turns on every time we reboot the server. Run the following command to add the swap file information to the /etc/fstab file:
To verify that the command worked, type:
and look for a line that says:
$ /swapfile non swap sw 0 0If that line exists in the /etc/fstab file, you’re all good.
10. Upgrade Linux Kernel
*** EDIT 10/26/2017 – This step is probably no longer necessary. I just did a new DO Droplet today, and it is now 4.4.0-97-generic by default. That being said though, there probably no harm in simply running the sudo apt-get-install linux-image-generic command anyway.
There is a problem with the default Linux kernel that you get when you fire up the Ubuntu Droplet. If you type:
You should see the following:
This version needs to be on -83 instead of -81 for Teamspeak to function correctly. Run the following commands to update the Linux kernel:
This will take a minute or two to run – once done type:
to reboot the Droplet. You will be disconnected from PuTTY – wait about 60 seconds, and then log back in via SSH.
Now, if you run:
You should see:
Execute the ls command and you should see a similar screen if everything was done correctly:
12. Accept the Teamspeak 3 license agreement
Since the release of Teamspeak 3 server version 3.1.0, it is mandatory to accept a license agreement. The quickest way to do this is by typing the following command:
13. Start the Teamspeak 3 server on boot
Now it's time to configure the Teamspeak 3 server to start on server boot. To do this we need to create a file called teamspeak.service in /lib/systemd/systemdirectory. The following command will do the trick:
Since Teamspeak 3 Server is now running, let's get the last piece of the puzzle - the privileged key. You'll need to paste it when connecting to the server for the first time. You can view it with the following command:
Congrats now you are ready to connect to your new Teamspeak 3 Server on Ubuntu!!
15. Installing the Teamspeak Interface
17. Install PHP 7.2
Install PHP, the PHP Extensions and Application Repository, Apache support, MySQL support and all TSI requirements
We now need to unzip the downloaded file using the tar command and move the decompressed folder. Then run the ls command to list the numerous ioncube loader files for different PHP versions
Next we need to copy the ioncube loader for our PHP 7.2 version to the extension directory /usr/lib64/php/modules
Now all we need to do is configure the php.ini file
Then add the below line as the first line in the php.ini file
Now all we need to do is navigate to your webspace where you TeamSpeak Interface is located (yourdomain.com/install/index.php). Once done quickly run through the few steps on the installer.