How to: Set up TS3 Server on Ubuntu 20.04

Any recent Linux distribution, 32- and 64-bit

Depending on operating system, minimum 1 GB RAM recommended. Total memory usage depends on number and size of hosted virtual servers. Harddisk Bare minimum installation 15 MB. Total disk usage is highly dependant on actual usage, size and amount of hosted virtual servers. Additional space required for filetransfer and icon/avatar storage.

A guide on how to connect to your Server using SSH can be found here: /* Connect to your server using SSH */

Step 1 – Run commands as root

The root user is has the ultimate authority on your server, you can run commands with it by either typing sudo in front of every command or by just typing:

sudo -s

Step 2 – Update your Server

Before we start you will have to make sure your server is fully updated.

You can do so by typing:

sudo apt-get update

sudo apt-get upgrade

Step 3 – Create a new user

It is best practice to create a new user for security reasons, because it can be really dangerous for your server if you run any applications as root, therefore we will be creating a new user account:

adduser teamspeak –disabled-login

To login as the user we just created, simply type

su – teamspeak

Now we will access the home directory of this user:

cd /home/teamspeak

Step 4 – Download TeamSpeak 3 server

You can always find the current version on https://www.teamspeak.com/en/downloads/#server

In our case we are going to download version 3.12.1 by typing:

now we have downloaded the TS3 Server archive, which we will have to unpack using tar:

tar xvf teamspeak3-server_linux_amd64-3.12.1.tar.bz2
This unpacked everything to teamspeak3-server_linux_amd64-3.12.1 therefore we are going to move everything it unpacked to /home/teamspeak and delete both the then empty file as well as the packed archive we downloaded earlier. You can do so by typing as follows:
cd teamspeak3-server_linux_amd64 && mv * /home/teamspeak && cd /home/teamspeak && rm -rf teamspeak3-server_linux_amd64-3.12.1.tar.bz2

Step 5 – Accept license agreement

It is necessary to accept TeamSpeak’s license agreement to be able to host a server, you can simply enter the following to do so:

touch /home/teamspeak/.ts3server_license_accepted

Step 6 – Make the Server start on boot

A Linux service is an application (or set of applications) that runs in the background waiting to be used, or carrying out essential tasks. We are going to create teamspeak.service by creating a file teamspeak.service in a system folder. Open nano:

sudo nano /lib/systemd/system/teamspeak.service

and paste the following:

[Unit]
Description=TeamSpeak 3 Server
After=network.target
[Service]
WorkingDirectory=/home/teamspeak/
User=teamspeak
Group=teamspeak
Type=forking
ExecStart=/home/teamspeak/ts3server_startscript.sh start inifile=ts3server.ini
ExecStop=/home/teamspeak/ts3server_startscript.sh stop
PIDFile=/home/teamspeak/ts3server.pid
RestartSec=15
Restart=always
[Install]
WantedBy=multi-user.target

Save this by pressing Alt+X, then pressing Y and enter. Next we’ll have to activate the service.

systemctl enable teamspeak.service

systemctl start teamspeak.service

Step 7 – Retrieving Privilege Key

We can access the privilege key by looking at the logs using

cat /home/teamspeak/logs/ts3server_*

Write the shown privilege key down and/ or copy it!

 

Step 8 – Using the Privilege Key

You can now connect to the TeamSpeak3 Server by simply entering it’s IP address into your TeamSpeak3 Client. There it will prompt you to enter your privilege key.

Just enter the code and you will automatically be granted Server Admin group.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.