Root-Server Tutorial

ROOT-SERVER TUTORIAL

Setup of TeamSpeak on Ubuntu 22.04

Learn how to install a TeamSpeak Server on your VPS and set it up.

Introduction

This tutorial describes how to install a TeamSpeak server on your VPS.

The tutorial was tested on Ubuntu 22.04 (July 2023) using Teamspeak-Server Version 3.13.7!

The tutorial uses the example IP 123.123.123.123.
This hostname must be replaced by the name of your own server if you follow the workflow described in this tutorial.
We will also use the domain ts.example.com in this course. Replace this with your own domain.

Requirements

For a "small instance" (up to about 5 users) a VPS 200 is sufficient.

I recommend setting up the instance on a VPS 200. If you feel that the instance is too slow, you can always upgrade to a larger server via the CCP.

Ubuntu22.04 from the CCP image must already be installed on the server.


You also need a domain, with a domain from a web hosting package being sufficient. (You can still use the domain with your web hosting, as we will be using a subdomain.)

Step 1 - Finding out the IP of your server

  1. Log in to the SCP (ServerControlPanel) under https://www.servercontrolpanel.de.
  2. Click on the server you want to use.
  3. If you are already on the "General" tab, you'll see a pane labeled "Network" in the bottom right corner.
  4. Here you can find the IP of your server (under IPv4).
  5. Write the IP of your server down.

Step 2 - Configuring DNS

  1. Log in to the CCP (CustomerControlPanel) under https://www.customercontrolpanel.de.
  2. In the sidebar on the left, click on "Domains".
  3. Find the domain you want to use and click on the magnifying glass symbol next to it.
  4. In the new window, click on "DNS".
  5. Scroll down until there are empty fields.
  6. In the first field, write your subdomain name (I recommend using ts or teamspeak or something alike).
  7. In the dropdown menu, select A.
  8. In the last field, enter the IP of your server (from Step 1).
  9. Click on "Save DNS records".

Step 3 - Preparing the server

First, you have to log in to your server via SSH.

  1. Enter sudo -s to get root rights.
  2. Enter your password and press Enter.
  3. Now enter apt update -y && apt upgrade -y to update the server.
  4. If a pink window appears, press Enter once to continue.
  5. Enter adduser --disabled-password --gecos "" teamspeak && sudo su teamspeak and press Enter to create a new user and switch to it.

Step 4 - Installing TeamSpeak

Note: This Tutorial specifically installs Teamspeak Version 3.13.7, if there is a newer version, you could also try that one (But this tutorial was only tested as written in the Introduction)

  1. Enter cd ~ && wget https://files.teamspeak-services.com/releases/server/3.13.7/teamspeak3-server_linux_amd64-3.13.7.tar.bz2 && tar xvf teamspeak3-server_linux_amd64-3.13.7.tar.bz2 && rm teamspeak3-server_linux_amd64-3.13.7.tar.bz2 && mv teamspeak3-server_linux_amd64/* . && rmdir teamspeak3-server_linux_amd64 and press Enter to download the server.
  2. Accept the TeamSpeak License touch .ts3server_license_accepted.

Step 5 - Setting up TeamSpeak to start on boot

We want TeamSpeak to start automatically when the server starts. This is useful when the server is restarted so that TeamSpeak also starts automatically.

  1. Enter exit and press Enter to return to the root user.
  2. Enter nano /etc/systemd/system/teamspeak.service and press Enter to create a new systemd service file.
  3. Paste the following code into this file:
[Unit]
Description=TeamSpeak 3 Server
After=network.target

[Service]
WorkingDirectory=/home/teamspeak
User=teamspeak
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
  1. Exit the file by pressing Ctrl + X and then Y and then Enter.
  2. Enter systemctl daemon-reload to reload the systemd daemon.
  3. Enter systemctl enable teamspeak to enable the service.
  4. Enter systemctl start teamspeak to start the service.

Step 6 - Setting up the firewall

We need a firewall to protect our server from unwanted connections.

We will use ufw (Uncomplicated Firewall) to set up the firewall, as it is easy to use and configure and is also preinstalled on Ubuntu.

  1. Enter ufw allow 9987 && ufw allow 30033,10011,10080,10443,41144/tcp && ufw enable to add various required ports to the firewall.
  2. Press Y and then Enter to confirm.

Step 7 - Setting up TeamSpeak

If you haven't downloaded the TeamSpeak client yet, you can do so here: https://www.teamspeak.com/en/downloads/

  1. Open the TeamSpeak client and press Ctrl + S.
  2. Enter your subdomain (e.g. ts.example.com) in the "Server Address" field.
  3. Enter any nickname.
  4. Click "Connect".
  5. Enter systemctl status teamspeak in the SSH connection to get the admin token.
  6. Copy the token and paste it into the "Server Password" field.

Conclusion

You have now successfully installed TeamSpeak and set it up to start when the server starts.

You have also protected your server with a firewall and created an admin user.

Your TeamSpeak instance will now be available under your subdomain (e.g. https://ts.example.com).

Thank you for using this tutorial!

License

MIT

Copyright (c) 2023 Konstantin Protzen

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Contributor's Certificate of Origin

By making a contribution to this project, I certify that:

  1. The contribution was created in whole or in part by me and I have the right to submit it under the license indicated in the file; or

  2. The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same license (unless I am permitted to submit under a different license), as indicated in the file; or

  3. The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

  4. I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the license(s) involved.

Published 05/07/2023 by Konstantin Protzen

Submit your tutorial

Get 60€ netcup vouchers for every published tutorial.