Set up a TeamSpeak 3 server
Official download, own user, licence, systemd service, ports and the admin token.
4 min read
On this page
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:
apt install -y bzip2 # Debian and Ubuntu
dnf install -y bzip2 tar # AlmaLinux and Rocky LinuxThe server runs as its own user without login, never as root:
useradd --system --home-dir /opt/teamspeak --create-home --shell /usr/sbin/nologin teamspeakDownload
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:
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:
sudo -u teamspeak touch /opt/teamspeak/.ts3server_license_acceptedWithout 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:
[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.targetLoad and start:
systemctl daemon-reload
systemctl enable --now teamspeakOpen the ports in the firewall
| Port | Purpose | Open? |
|---|---|---|
| 9987/udp | Voice | yes |
| 30033/tcp | File transfer (icons, avatars, channel files) | yes |
| 10011/tcp | ServerQuery (management by script or bot) | only if you need it, and then only for your address |
Debian and Ubuntu with ufw:
ufw allow 9987/udp
ufw allow 30033/tcpAlmaLinux and Rocky Linux with firewalld:
firewall-cmd --permanent --add-port=9987/udp --add-port=30033/tcp
firewall-cmd --reloadIf 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:
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
systemctl status teamspeak
ss -ulnp | grep 9987The 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_acceptedis missing or does not belong to theteamspeakuser. - 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 deletets3server.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 statusorfirewall-cmd --list-all. - Icons and avatars do not load. TCP 30033 is closed.
Permission deniedon start. The files do not belong toteamspeak.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.sqlitedbis kept. Back it up first. - Back up the database and the
filesfolder regularly: Set up backups.
If you get stuck, open a ticket.