Hello, friends. In this post, you will learn how to install TeamSpeak Server on Ubuntu 20.04 Ready? Let’s get to it.
In Ubuntu every day there are more and more complete applications that enrich the ecosystem. Proof of this is the existence of TeamSpeak for Ubuntu.
In a nutshell, TeamSpeak is a voice-over IP chat software, it allows users to talk in a chat channel with other users, just like a traditional conference call. To do this, clients have to connect to a server. This is what we are going to do.
The main advantage is that you can manage the created instance yourself. Think about the advantages of this. So let’s go for it.
Install TeamSpeak Server on Ubuntu 20.04
Before we start, the server must be up to date so that we don’t have problems during the process.
So, connect to SSH and proceed to upgrade.
sudo apt update sudo apt upgrade
After this, log in as the root user.
sudo -i
Now we can get started.
The first thing we need to do is create a new system user which is where TeamSpeak will work. This new user can be called whatever you want and does not need to be logged into the system.
adduser --disabled-login teamspeak
You will be asked a few questions requesting information about the new user. Nothing complicated.
Now, log in to the newly created user.
su - teamspeak
Now, with the help of the wget
command, we can download TeamSpeak for Linux.
wget https://files.teamspeak-services.com/releases/server/3.13.5/teamspeak3-server_linux_amd64-3.13.5.tar.bz2 --2021-07-01 18:21:02-- https://files.teamspeak-services.com/releases/server/3.13.5/teamspeak3-server_linux_amd64-3.13.5.tar.bz2 Resolving files.teamspeak-services.com (files.teamspeak-services.com)... 151.139.128.11 Connecting to files.teamspeak-services.com (files.teamspeak-services.com)|151.139.128.11|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 9950540 (9.5M) [application/x-tar] Saving to: ‘teamspeak3-server_linux_amd64-3.13.5.tar.bz2’ teamspeak3-server_linux_amd64-3.13.5.tar. 100%[=====================================================================================>] 9.49M --.-KB/s in 0.07s 2021-07-01 18:21:02 (136 MB/s) - ‘teamspeak3-server_linux_amd64-3.13.5.tar.bz2’ saved [9950540/9950540]
Once the download is complete, we can unzip it.
tar xvfj teamspeak3-server_linux_amd64-3.13.5.tar.bz2
Now it is a good idea to copy the generated files directly into the Home
folder of the user-created for TeamSpeak.
cp teamspeak3-server_linux_amd64/* -R /home/teamspeak/
Also, it is advisable to delete the downloaded file, as you will not need it.
rm -rf teamspeak3-server_linux_amd64 teamspeak3-server_linux_amd64-3.13.5.tar.bz2
After this, create a new empty file corresponding to the license.
touch .ts3server_license_accepted
Now, TeamSpeak is installed, but we can’t use it yet.
Configuring TeamSpeak Server before the first use
With TeamSpeak installed, the process of preparing for the first use begins.
First, exit the TeamSpeak user and return it to the root user.
exit
The best way to manage TeamSpeak is to manage it as a systemd service. This can be done by creating a new entry in the system.
nano /lib/systemd/system/system/ts3server.service
And add the following
[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 your changes and close the text editor.
Refresh the list of system services, by running the following command
systemctl daemon-reload
Then, start the application service.
systemctl start ts3server
It is advisable to check the status of the service to see if it is active.
systemctl status ts3server ● ts3server.service - Teamspeak Service Loaded: loaded (/lib/systemd/system/ts3server.service; disabled; vendor preset: enabled) Active: active (running) since Thu 2021-07-01 18:26:58 CEST; 58s ago Main PID: 1532 (ts3server) Tasks: 21 (limit: 4566) Memory: 22.3M CGroup: /system.slice/ts3server.service └─1532 ./ts3server Jul 01 18:26:59 osradar ts3server_minimal_runscript.sh[1532]: serveradmin rights for your virtualserver. please Jul 01 18:26:59 osradar ts3server_minimal_runscript.sh[1532]: also check the doc/privilegekey_guide.txt for details. Jul 01 18:26:59 osradar ts3server_minimal_runscript.sh[1532]: token=R7CJUImlePrDrwdlfpMD4H7hOPgRb2NVZitTYGAp Jul 01 18:26:59 osradar ts3server_minimal_runscript.sh[1532]: ------------------------------------------------------------------ Jul 01 18:26:59 osradar ts3server_minimal_runscript.sh[1532]: 2021-07-01 16:26:59.044066|INFO |Query | |listening for query on 0.0.0.0:10011, [::]:10011 Jul 01 18:26:59 osradar ts3server_minimal_runscript.sh[1532]: 2021-07-01 16:26:59.044230|INFO | | |creating QUERY_SSH_RSA_HOST_KEY file: ssh_host_rsa>Jul 01 18:26:59 osradar ts3server_minimal_runscript.sh[1532]: 2021-07-01 16:26:59.204450|INFO | | |myTeamSpeak identifier revocation list was downloa>Jul 01 18:26:59 osradar ts3server_minimal_runscript.sh[1532]: 2021-07-01 16:26:59.472278|INFO |Query | |listening for ssh query on 0.0.0.0:10022, [::]:100>Jul 01 18:26:59 osradar ts3server_minimal_runscript.sh[1532]: 2021-07-01 16:26:59.472459|INFO |Query | |listening for http query on 0.0.0.0:10080, [::]:10>Jul 01 18:26:59 osradar ts3server_minimal_runscript.sh[1532]: 2021-07-01 16:26:59.472614|INFO |CIDRManager | |updated query_ip_allowlist ips: 127.0.0.1/32, :
So, everything is working properly.
Defining a new access password
It is important to define a new password that takes care of adding an extra layer of security.
So, stop running the service
systemctl stop ts3server
Log the user teamspeak
back in.
su - teamspeak
To set a password, just start the service manually and add the serveradmin_password
parameter along with a strong password.
./ts3server_startscript.sh start serveradmin_password=password
Replace password
with a stronger password.
Sample Output
Starting the TeamSpeak 3 server TeamSpeak 3 server started, for details please view the log file
Now stop it manually
./ts3server_startscript.sh stop Stopping the TeamSpeak 3 server . done
Change to root user again
exit
And now start the TeamSpeak service.
systemctl start ts3server
Enabling the TeamSpeak web interface
Also, it is advisable to enable the TeamSpeak web interface so that you can manage TeamSpeak faster and more comfortably.
To do so, install Apache and PHP along with the unzip
package.
apt-get install apache2 php libapache2-mod-php unzip
Then, access the Apache Root document folder.
cd /var/www/html
And from there, proceed to download the web interface. Again, we will do it with the wget
command.
wget https://www.bennetrichter.de/downloads/ts3wi.zip
Since it’s lightweight, the download shouldn’t take long. When it is finished, you have to unzip it.
unzip ts3wi.zip
Then, to avoid problems with running on the web, make the folder belong to Apache.
chown -R www-data:www-data /var/www/html/ts3wi
And now in a text file called query_ip_allowlist.txt
inside the teamspeak
user’s home folder add the IP of the server and the client that will be able to access it.
nano /home/teamspeak/query_ip_allowlist.txt your ip server ip client
Save your changes and close the editor.
To apply the changes, restart the Apache and TeamSpeak services.
systemctl restart apache2 systemctl restart ts3server
It is now accessible from a client and a web browser via the address http://your-server-ip/ts3wi
where you will see the Login screen.
After logging in with the username serveradmin
and the password you defined, you will see the administration panel.
So, TeamSpeak is ready. Enjoy it.
Conclusion
In this post, you have learned how to install your own TeamSpeak instance on your server. This way, you will have full control over what happens and it is interesting for your internal use.