Blog / Tutorials

How to Set Up a TeamSpeak 3 Server on Ubuntu & Debian

6 min read
How to Set Up a TeamSpeak 3 Server on Ubuntu & Debian

TeamSpeak 3 remains one of the most reliable, low-latency, and resource-efficient voice communication platforms for gamers and communities. Self-hosting your own TeamSpeak server gives you ultimate privacy, full control over permissions, and zero reliance on third-party voice chat providers.

In this guide, you will learn how to properly install and secure a TeamSpeak 3 server on your Ubuntu or Debian VPS.

Prerequisites: Before starting, ensure you have a VPS running Ubuntu or Debian with SSH access and a user account with sudo privileges.

Step 1: Update the System

First, ensure your package index is updated and install the necessary utilities (wget for downloading and bzip2 for extracting the archive):

Updating packages and installing wget and bzip2 on Ubuntu

sudo apt update && sudo apt upgrade -y
sudo apt install wget bzip2 -y

Step 2: Create a Dedicated User

Running any public-facing service as the root user is a major security risk. Let's create a dedicated system user specifically for TeamSpeak:

Creating the teamspeak system user

sudo adduser --disabled-password --gecos "" teamspeak

Now, switch to this new user to perform the installation:

sudo su - teamspeak

Step 3: Download and Extract TeamSpeak 3

Fetch the latest TeamSpeak 3 server files. You can always find the newest version on the official TeamSpeak downloads page.

Downloading TeamSpeak 3 server archive

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

Extract the downloaded archive and move the files into the home directory for cleaner organization:

tar xvf teamspeak3-server_linux_amd64-3.13.8.tar.bz2
mv teamspeak3-server_linux_amd64/* .
rm -rf teamspeak3-server_linux_amd64 teamspeak3-server_linux_amd64-3.13.8.tar.bz2

Step 4: Accept the License Agreement

TeamSpeak requires you to accept their End User License Agreement (EULA) before the server will start. You can do this by creating an empty file named .ts3server_license_accepted:

Accepting the TeamSpeak 3 EULA

touch .ts3server_license_accepted

Step 5: First Run and Privilege Key

Now, start the server manually for the first time. This step is critical because the server will display your ServerAdmin privilege key, which you need to claim admin rights in your TeamSpeak client.

Starting TS3 to capture the privilege key

./ts3server_startscript.sh start

You will see output containing your Privilege Key and ServerQuery Admin Credentials. Copy these details and save them somewhere safe!

Once you have saved the key, stop the server so we can configure it to run as a background service:

./ts3server_startscript.sh stop

Step 6: Configure a Systemd Service

To ensure your TeamSpeak server starts automatically if your VPS reboots, we need to create a systemd service. First, exit back to your sudo user:

exit

Create a new service file:

Creating the teamspeak.service file

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

Paste the following configuration:

[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 and exit (CTRL + O, ENTER, CTRL + X).

Reload systemd and start your new service:

Starting the TeamSpeak systemd service

sudo systemctl daemon-reload
sudo systemctl enable teamspeak
sudo systemctl start teamspeak

Check the status to verify it is running perfectly:

sudo systemctl status teamspeak

Conclusion

Congratulations! You have successfully installed and configured a TeamSpeak 3 server.

To connect, open your TeamSpeak 3 Client, connect to your server's IP address, and paste the Privilege Key you saved in Step 5 when prompted. You will instantly be granted Server Admin status.

Next Steps

  • If you have a firewall enabled, ensure you open the correct ports. Check out our guide on how to configure UFW. TeamSpeak requires ports 9987/udp (Voice), 10011/tcp (ServerQuery), and 30033/tcp (File Transfer).
  • Looking for a cost-effective hosting option? Try our Budget VPS options, or get ultimate reliability for large communities on a VoxiHost Premium VPS backed by VoxiShield DDoS Protection.

Frequently Asked Questions

Open your TeamSpeak 3 client, enter your VPS IP address, and connect. Upon first connection, a dialog will ask for a Privilege Key. Paste the key captured in Step 5 to claim Server Admin permissions.
You need to open port 9987/udp for voice traffic, port 10011/tcp for ServerQuery, and port 30033/tcp for file transfers.
You can generate a new Privilege Key using the ServerQuery interface or through another user who already has administrator privileges. Alternatively, check the log files in the logs/ folder for initial keys.
Yes, running the TeamSpeak 3 server software is free for personal, non-commercial use for up to 32 slots without a license. For more slots or commercial usage, you must purchase a license from TeamSpeak.
Stop the service using sudo systemctl stop teamspeak, download the newest server files from the official website, extract them over your existing installation directory (ensuring you do not overwrite ts3server.sqlitedb or config files), and restart the service.

Suggest Edits on GitHub

Spot a typo or want to improve this guide? This post is open-source and open for community contributions.

Edit this post
Back to all posts

Languages