How to Install TeamSpeak Server on Ubuntu 18.04 & 20.04

how to install teamspeak server on ubuntu 18.04 and 20.04

TeamSpeak is a cross-platform VoIP solution used for online games. It is used by gamers to communicate with teammates with high-end security.


It can be installed on Windows, MacOS, and Linux systems. It allows you to communicate with friends via speech and text. It comes with a lot of features including – built-in privacy, unrivaled voice quality, an advanced permissions system, stunning sound, mobile connectivity, and many more.

In this post, we will show you how to install the TeamSpeak server on our managed Ubuntu VPS.

Prerequisites

  • An Ubuntu 20.04 VPS (we’ll be using our NVMe 2 VPS plan)
  • Access to the root user account (or access to any account with root privileges)

Log in to the Server & Update the Server OS Packages

First, log in to your Ubuntu 20.04 server via SSH as the root user:

ssh root@IP_Address -p Port_number

You will need to replace ‘IP_Address’ and ‘Port_number’ with your server’s respective IP address and SSH port number. Additionally, replace ‘root’ with the username of the admin account if necessary.

Before starting, you have to make sure that all Ubuntu OS packages installed on the server are up to date. You can do this by running the following commands:

apt-get update -y
apt-get upgrade -y

Install TeamSpeak

Before starting, you will need to create a separate user to run TeamSpeak server. You can create a new user with the following command:

adduser --disabled-login teamspeak

Once the user is created, switch the user to TeamSpeak and download the latest version of the TeamSpeak server using the following command:

su - teamspeak
wget https://files.teamspeak-services.com/releases/server/3.13.5/teamspeak3-server_linux_amd64-3.13.5.tar.bz2

Once the download is completed, extract the downloaded file with the following command:

tar xvfj teamspeak3-server_linux_amd64-3.13.5.tar.bz2

Next, copy all contents from the extracted directory to the TeamSpeak home directory:

cp teamspeak3-server_linux_amd64/* -R /home/teamspeak/

Next, remove the downloaded file with the following command:

rm -rf teamspeak3-server_linux_amd64 teamspeak3-server_linux_amd64-3.13.5.tar.bz2

Next, create a blank license file with the following command:

touch .ts3server_license_accepted

Next, exit from the TeamSpeak user with the following command:

exit

Create a Systemd Service File for TeamSpeak

Next, you will need to create a systemd service file to manage the TeamSpeak service. You can create it with the following command:

nano /lib/systemd/system/ts3server.service

Add the following lines:

[Unit]
Description=Teamspeak Service
Wants=network.target

[Service]
WorkingDirectory=/home/teamspeak
User=teamspeak
ExecStart=/home/teamspeak/ts3server_minimal_runscript.sh
ExecStop=/home/teamspeak/ts3server_startscript.sh stop
ExecReload=/home/teamspeak/ts3server_startscript.sh restart
Restart=always
RestartSec=15

[Install]
WantedBy=multi-user.target

Save and close the file then reload the systemd service with the following command:

systemctl daemon-reload

Next, start the TeamSpeak service and enable it to start at system reboot:

systemctl start ts3server
systemctl enable ts3server

Now, check the status of the TeamSpeak service with the following command:

systemctl status ts3server

Output:

● ts3server.service - Teamspeak Service
Loaded: loaded (/lib/systemd/system/ts3server.service; disabled; vendor preset: enabled)
Active: active (running) since Thu 2021-05-20 11:13:18 UTC; 5s ago
Main PID: 825 (ts3server)
Tasks: 21 (limit: 4691)
Memory: 25.2M
CGroup: /system.slice/ts3server.service
└─825 ./ts3server

May 20 11:13:19 ubuntu2004 ts3server_minimal_runscript.sh[825]: serveradmin rights for your virtualserver. please
May 20 11:13:19 ubuntu2004 ts3server_minimal_runscript.sh[825]: also check the doc/privilegekey_guide.txt for details.
May 20 11:13:19 ubuntu2004 ts3server_minimal_runscript.sh[825]: token=a4KYsOm0ixyWAf+rNsVmG95MlNfVjYYdl6EUR5Bq
May 20 11:13:19 ubuntu2004 ts3server_minimal_runscript.sh[825]: ------------------------------------------------------------------
May 20 11:13:19 ubuntu2004 ts3server_minimal_runscript.sh[825]: 2021-05-20 11:13:19.028321|INFO |Query | |listening for query on >
May 20 11:13:19 ubuntu2004 ts3server_minimal_runscript.sh[825]: 2021-05-20 11:13:19.028448|INFO | | |creating QUERY_SSH_RSA_>
May 20 11:13:19 ubuntu2004 ts3server_minimal_runscript.sh[825]: 2021-05-20 11:13:19.194739|INFO | | |myTeamSpeak identifier >
May 20 11:13:21 ubuntu2004 ts3server_minimal_runscript.sh[825]: 2021-05-20 11:13:21.890818|INFO |Query | |listening for ssh query>
May 20 11:13:21 ubuntu2004 ts3server_minimal_runscript.sh[825]: 2021-05-20 11:13:21.890981|INFO |Query | |listening for http quer>
May 20 11:13:21 ubuntu2004 ts3server_minimal_runscript.sh[825]: 2021-05-20 11:13:21.891138|INFO |CIDRManager | |updated query_ip_allowl>
lines 1-19/19 (END)

At this point, the TeamSpeak server is started. You can check all ports used by the TeamSpeak server using the following command:

ss -antpl | grep ts3server

Output:

LISTEN    0         128                0.0.0.0:30033            0.0.0.0:*        users:(("ts3server",pid=825,fd=36))                                            
LISTEN 0 128 0.0.0.0:10011 0.0.0.0:* users:(("ts3server",pid=825,fd=57))
LISTEN 0 128 0.0.0.0:10080 0.0.0.0:* users:(("ts3server",pid=825,fd=61))
LISTEN 0 128 0.0.0.0:10022 0.0.0.0:* users:(("ts3server",pid=825,fd=59))
LISTEN 0 128 [::]:30033 [::]:* users:(("ts3server",pid=825,fd=37))
LISTEN 0 128 [::]:10011 [::]:* users:(("ts3server",pid=825,fd=58))
LISTEN 0 128 [::]:10080 [::]:* users:(("ts3server",pid=825,fd=62))
LISTEN 0 128 [::]:10022 [::]:* users:(("ts3server",pid=825,fd=60))

Set an Admin Password

Next, you will need to set an admin password for TeamSpeak.

First, stop the TeamSpeak service with the following command:

systemctl stop ts3server

Next, switch the user to TeamSpeak and start the TeamSpeak service by passing the password parameter:

su - teamspeak
./ts3server_startscript.sh start serveradmin_password=password

Once the password has been set, stop the TeamSpeak service:

./ts3server_startscript.sh stop

Next, exit from the TeamSpeak user with the following command:

exit

Next, start the TeamSpeak service using systemd with the following command:

systemctl start ts3server

Setup TeamSpeak Web UI

In this section, we will download TeamSpeak web UI and host it using the Apache webserver. TeamSpeak web UI is used to manage the TeamSpeak server through the web-based interface.

First, install the Apache and PHP with the following command:

apt-get install apache2 php libapache2-mod-php unzip -y

Once all the packages are installed, change the directory to the Apache web root and download the latest version of ts3wi with the following command:

cd /var/www/html
wget https://www.bennetrichter.de/downloads/ts3wi.zip

Once the download is completed, unzip the downloaded file with the following command:

unzip ts3wi.zip

Next, set proper ownership to the ts3wi directory:

chown -R www-data:www-data /var/www/html/ts3wi

Next, you will need to add your server IP and client machine IP to the TeamSpeak allowlist file:

Need a fast and easy fix?
✔ Unlimited Managed Support
✔ Supports Your Software
✔ 2 CPU Cores
✔ 2 GB RAM
✔ 50 GB PCIe4 NVMe Disk
✔ 1854 GeekBench Score
✔ Unmetered Data Transfer
NVME 2 VPS

Now just $43 .99
/mo

GET YOUR VPS
nano /home/teamspeak/query_ip_allowlist.txt

Add the following lines:

your-server-ip
your-client-ip

Save and close the file when you are finished. Then, restart the TeamSpeak and Apache service to apply the changes:

systemctl restart apache2
systemctl restart ts3server

Access TeamSpeak Web UI

Now, open your web browser and access the TeamSpeak web UI using the URL http://your-server-ip/ts3wi. You will be redirected to the TeamSpeak login page:

set up teamspeak server on ubuntu 18.04 and 20.04

Provide your admin username, password and click on the Login button. You should see the TeamSpeak dashboard on the following page:

installing teamspeak server on ubuntu 18.04 and 20.04

Congratulations! you have successfully installed TeamSpeak on Ubuntu 20.04.

Of course, you don’t have to install TeamSpeak if you use one of our Managed VPS Hosting services, in which case you can simply ask our expert Linux admins to install TeamSpeak on Ubuntu 18.04 or 20.04, for you. They are available 24/7 and will take care of your request immediately.

PS. If you liked this post on how to install TeamSpeak on Ubuntu 18.04 and 20.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

3 thoughts on “How to Install TeamSpeak Server on Ubuntu 18.04 & 20.04”

    • If you are using your device as the client machine, you can find your IP address using https://www.whatismyip.com/

      Reply

Leave a Comment