Skip to content
CitexNode
All guides

Set up a TeamSpeak 3 server

Official download, own user, licence, systemd service, ports and the admin token.

4 min read

This guide installs the TeamSpeak 3 server from the official site on your VPS and runs it as a systemd service.

Covers Debian 12 and 13, Ubuntu 22.04 and 24.04, AlmaLinux 9 and Rocky Linux 9. All commands run as root.

Prepare

You need bzip2 to unpack:

bash
apt install -y bzip2        # Debian and Ubuntu
dnf install -y bzip2 tar    # AlmaLinux and Rocky Linux

The server runs as its own user without login, never as root:

bash
useradd --system --home-dir /opt/teamspeak --create-home --shell /usr/sbin/nologin teamspeak

Download

The current version is on the official page https://www.teamspeak.com/en/downloads/#server under Linux, Server 64-bit. Use the version number from there, here 3.13.7:

bash
VERSION=3.13.7
cd /tmp
curl -LO "https://files.teamspeak-services.com/releases/server/${VERSION}/teamspeak3-server_linux_amd64-${VERSION}.tar.bz2"
tar xjf "teamspeak3-server_linux_amd64-${VERSION}.tar.bz2" -C /opt/teamspeak --strip-components=1
chown -R teamspeak:teamspeak /opt/teamspeak
rm "teamspeak3-server_linux_amd64-${VERSION}.tar.bz2"

Accept the licence

The server will not start until you accept the licence. Read it in /opt/teamspeak/LICENSE. If you agree, create this file:

bash
sudo -u teamspeak touch /opt/teamspeak/.ts3server_license_accepted

Without sudo, run touch /opt/teamspeak/.ts3server_license_accepted and then chown teamspeak:teamspeak on the file.

Set it up as a systemd service

Create /etc/systemd/system/teamspeak.service:

ini
[Unit]
Description=TeamSpeak 3 Server
After=network-online.target
Wants=network-online.target

[Service]
User=teamspeak
Group=teamspeak
WorkingDirectory=/opt/teamspeak
ExecStart=/opt/teamspeak/ts3server_minimal_runscript.sh
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

Load and start:

bash
systemctl daemon-reload
systemctl enable --now teamspeak

Open the ports in the firewall

PortPurposeOpen?
9987/udpVoiceyes
30033/tcpFile transfer (icons, avatars, channel files)yes
10011/tcpServerQuery (management by script or bot)only if you need it, and then only for your address

Debian and Ubuntu with ufw:

bash
ufw allow 9987/udp
ufw allow 30033/tcp

AlmaLinux and Rocky Linux with firewalld:

bash
firewall-cmd --permanent --add-port=9987/udp --add-port=30033/tcp
firewall-cmd --reload

If you need ServerQuery from outside, allow it only from your address (here 203.0.113.10), e.g. ufw allow from 203.0.113.10 to any port 10011 proto tcp.

Admin token and query password

On the very first start the server creates two things and shows them only once:

  • the privilege key (token) for the Server Admin group,
  • username and password for the ServerQuery login serveradmin.

Both are in the service journal:

bash
journalctl -u teamspeak --no-pager | grep -E "token=|loginname="

The token is also in the logs: grep -rh "token=" /opt/teamspeak/logs/.

Keep both somewhere safe, such as your password manager.

Check that it worked

bash
systemctl status teamspeak
ss -ulnp | grep 9987

The service should be active (running), and a ts3server process listens on UDP 9987.

Then in the TeamSpeak client: Connections → Connect, with your VPS's IPv4 as the address. On first connect the client asks for the privilege key. Enter the token and you are Server Admin. You can then give the server its own name, e.g. an A record ts.example.com, see Managing DNS records.

Common errors

  • Service does not start, the journal mentions "license". The file .ts3server_license_accepted is missing or does not belong to the teamspeak user.
  • Missed the token. If it is no longer in the journal, check the logs. If it is gone there too, create a new one via ServerQuery (privilegekeyadd), or stop the service and delete ts3server.sqlitedb. That resets the server completely; all channels and permissions are gone.
  • Client cannot connect ("failed to connect"). UDP 9987 is closed in the firewall. Check ufw status or firewall-cmd --list-all.
  • Icons and avatars do not load. TCP 30033 is closed.
  • Permission denied on start. The files do not belong to teamspeak. chown -R teamspeak:teamspeak /opt/teamspeak.

What next

  • To update, download the new version as above, stop the service and unpack it over the old one. The database ts3server.sqlitedb is kept. Back it up first.
  • Back up the database and the files folder regularly: Set up backups.

If you get stuck, open a ticket.