File README.SUSE.md of Package teamspeak3-server
# Teamspeak 3 server rpm installation
Written by Alex Woick <alex@wombaz.de> 2012-02-22
Adapted for SUSE distribution by Alexey Svistunov <svalx@svalx.net> 2024-08-21
Last updated: 2025-05-26
**See also** */usr/share/doc/packages/teamspeak3-server/server_quickstart.md*
## Contents:
1. [OVERVIEW](#OVERVIEW)
2. [OPEN FIREWALL PORTS](#OPEN-FIREWALL-PORTS)
3. [INSTALL TEAMSPEAK LICENSE](#INSTALLTEAMSPEAK-LICENSE)
4. [BACKUP YOUR SERVER](#BACKUP-YOUR-SERVER)
5. [TSDNSSERVER](#TSDNSSERVER)
6. [SRV DNS RECORDS](#SRV-DNS-RECORDS)
7. [QUERY ADMIN PASSWORD RESET](#QUERY-ADMIN-PASSWORD-RESET)
8. [DIRECTORIES AND FILES](#DIRECTORIES-AND-FILES)
===============================================================================
### 1. OVERVIEW
This rpm install of the Teamspeak server distributes the files from the
original *.tar.gz distribution into fhs-conformant destination directories.
It creates directories for the database, documentations, configuration files,
including denylist and allowlist files. It contains a working ts3server.ini,
which can be customized according to your needs, backup job, systemd services
and firewall service definitions.
The user teamspeak is created, which is used to run the Teamspeak server.
After installation, the server is ready to be started right away. It will run
out of the box with the default sqlite database.
To activate autostart and start the Teamspeak server, call:
```shell
# systemctl --now enable teamspeak3-server
```
If you want that your server is reachable from remote, it is required to open
some ports in the firewall of the Teamspeak server machine. See Chapter 2 on
how to do this.
If you want that your server uses MariaDB or PostgreSQL as database, install
the **teamspeak3-mariadb** or **teamspeak3-postgresql** packages and use the
supplied *ts3server.ini.mariadb*, *ts3server.ini.postgresql* instead of
*ts3server.ini* (rename it). Note that the default SQLite database is
sufficient for standalone machines of any size. Only ATHPs will benefit from
MariaDB or PostgreSQL.
***IMPORTANT:***
After starting the Teamspeak server for the first time, call this command to
extract the query admin password and the server admin token from the journal:
```shell
# journalctl -u teamspeak3-server.service
```
Store the information in a safe place for later use. If you also installed the
package **teamspeak3-backup**, call:
```shell
# ts3-get-query-admin.sh
```
to extract the query admin password and add it to the snapshot configuration in
*/etc/teamspeak3-server/snapshot*.
To get administrator access to the new server, use the token with your
Teamspeak client when you connect to the server for the first time. The
Teamspeak client will ask for it when you connect to a new server for the first
time.
===============================================================================
### 2. OPEN FIREWALL PORTS
#### 2.1. Allow incoming connections
This package comes with service definitions for the Teamspeak and tsdns server.
Enable Teamspeak service:
```shell
# firewall-cmd --permanent --add-service=teamspeak3-server
# firewall-cmd --reload
```
If you need access to the Server Query API from outside the localhost, enable
it by:
```shell
# firewall-cmd --permanent --add-service=teamspeak3-serverquery
# firewall-cmd --reload
```
If you use tsdnsserver, you need to enable this service too:
```shell
# firewall-cmd --permanent --add-service=tsdns-server
# firewall-cmd --reload
```
Note, raw access disabled by default.
#### 2.2. Outgoing connections
If you run a restrictive firewall that also filters outgoing traffic, it is
required to allow outgoing TCP connections to accounting.teamspeak.com:2008.
If you want weblist support, additionally allow outgoing UDP traffic on port
2010.
#### 2.3. Port forwarding
If you run your server at home behind a router and want access from the
internet, it is required that you forward the Teamspeak ports on your router to
the Teamspeak server in your local network. Forward these ports on your router
to the local IP address of your Teamspeak server machine:
- TCP 10011 \# query port [only required for raw query admin access]
- TCP 10022 \# query port [only required for ssh query admin access]
- TCP 10080 \# query port [only required for web query admin access]
- TCP 41144 \# tsdns port [if it running]
- TCP 30033 \# file transfer port
- UDP 9987 \# voice port (in case of more virtual servers: add every voice port)
===============================================================================
### 3. INSTALL TEAMSPEAK LICENSE
Please note that Teamspeak kindly allows operating a server without a license
for noncommercial use. Simply use the server without licence file, if you fit
Teamspeak's definition for noncommercial use and if you don't need more than 32
slots. For current version embded license valid until Thu Jul 1 00:00:00 2027.
But if you require a license and have one, copy your Teamspeak license file
*licensekey.dat* into */etc/teamspeak3-server* and adjust ownership and
permissions:
```shell
# cd /etc/teamspeak3-server
# cp -p /original-path-to-your-licensekey/licensekey.dat .
# chown teamspeak:root licensekey.dat
# chmod 640 licensekey.dat
# systemctl restart teamspeak3-server
```
It is very important to chown the license file to the Teamspeak user, so the
server is able to update the file to renew the license before it expires. If
the server is not able to update the license file, the license will expire and
you will have to contact Teamspeak to get a new one.
===============================================================================
### 4. BACKUP YOUR SERVER
The optional package *teamspeak3-backup* installs a systemd service and timer
that creates snaphots for every virtual server instance once a day. It's highly
recommended, if you don't do your own instance backup. Snapshot and backup
files older than 60 days are removed automatically. Note only SQLite database
will by backed up by this job.
The snapshot creation script uses the query admin login credentials from
*/etc/teamspeak3-server/snapshot*.
After the first start of the Teamspeak server, call:
```shell
# ts3-get-query-admin.sh
```
This will extract the query admin password from the journal and store it in
*/etc/teamspeak3-server/snapshot*.
If the credentials have not been entered automatically, edit the file manually.
To enable daily snapshot creation and SQLite database backup call:
```shell
# systemctl enable teamspeak3-backup.timer
```
Snapshots are stored here with a subdirectory for each server instance:
*/var/lib/teamspeak3-server/snapshots*
If you want to restore or deploy a virtual server with one of the snaphot
files, call:
```shell
$ ts3snapshot deploy -i <instance> -f \
/var/lib/teamspeak3-server/snapshots/<instance>/ts3-snapshot-<instance>-<date>.txt
```
The backup files are stored in this location: */var/lib/teamspeak3-server/backups*
Additionally, you should backup the following files regularly to be able to
restore your server:
- /etc/teamspeak3-server/licensekey.dat (in case you have a license installed)
- /etc/teamspeak3-server/serverkey.dat (in case you have a license installed)
- /etc/teamspeak3-server/snapshot (if SQLite used as database)
- /etc/teamspeak3-server/ts3db_mariadb.ini (if MariaDB used as database)
- /etc/teamspeak3-server/ts3db_postgresql.ini (if PostgeSQL used as database)
- /etc/teamspeak3-server/ts3server.ini
- /etc/teamspeak3-server/query_ip_denylist.txt
- /etc/teamspeak3-server/query_ip_allowlist.txt
- /var/lib/teamspeak3-server/ts3server.sqlitedb (if SQLite used as database)
If you need to restore the Teamspeak server database, stop the Teamspeak server
and copy one of the datbase backup files over the existing database:
```shell
# systemctl stop teamspeak3-server
$ cd /var/lib/teamspeak3-server
# cp backups/ts3server.sqlitedb.YYYYMMDD-HHMMDD ts3server.sqlitedb
# systemctl start teamspeak3-server
```
There is an important difference between database backups and snapshots:
A snapshot always contains one single virtual server instance. If you need to
move one virtual server instance from one host to another, or if you need to
copy one virtual server to another instance or host, create and deploy a
snapshot.
There is one caveat with using snapshots: the connection between uploaded
channel files and the actual channel is lost. It is lost even if you restore
a virtual server on the same host, since all server objects (channels, groups
and users) get new id numbers.
A database backup always contains the whole server with every virtual server
instance. Restoring a database backup always restores every virtual server. It
is not possible to restore a single server instance by using a database backup.
In contrast to snapshots, the connection between uploaded channel files and the
channels is not lost. If you restore a server, uploaded files remain
accessible.
===============================================================================
### 5. TSDNSSERVER
Usually, you will not want to use tsdnsserver but use SRV dns records instead
(see below).
A start script for tsdnsserver is installed as well. To activate autostart and
start tsdnsserver, call:
```shell
# systemctl --now enable tsdns-server
```
The configuration is in */etc/teamspeak3-server/tsdns_settings.ini*. After you
change the configuration, restart the server:
```shell
# systemctl reload tsdns-server
```
Do not forget open a port in firewall (see the corresponding paragraph).
===============================================================================
### 6. SRV DNS RECORDS
If you want that your users connect to your server by using a simple hostname,
you may want to create SRV records for your virtual Teamspeak instances if
you have control over your domains' DNS. No more cryptic IP address or port
number for your users.
In this example, you want to support 4 clans called clanalpha, clanbeta,
clangamma and clandelta and give them individual Teamspeak hostnames like
clanalpha.example.org.
You collect these prerequisites:
- your server machine has an IP address of 1.2.3.4
- your server machine has the hostname www.example.org
- Teamspeak server is installed on this server machine
- you configured 4 Teamspeak server instances on ports 9987, 9988, 9989, 9990
- you can already connect successfully to the instances by using 1.2.3.4:9987
or www.example.org:9987 as connection data.
- you are able to configure SRV records in your domain example.org
You plan these assignments:
IP-address=hostname port Teamspeak-hostname
1.2.3.4=www.example.org 9987 clanalpha.example.org
1.2.3.4=www.example.org 9988 clanbeta.example.org
1.2.3.4=www.example.org 9989 clangamma.example.org
1.2.3.4=www.example.org 9990 clandelta.example.org
Now you create the following SRV records into your dns zone for example.org:
$ORIGIN example.org.
_ts3._udp.clanalpha 3600 SRV 10 5 9987 www.example.org.
_ts3._udp.clanbeta 3600 SRV 10 5 9988 www.example.org.
_ts3._udp.clangamma 3600 SRV 10 5 9989 www.example.org.
_ts3._udp.clandelta 3600 SRV 10 5 9990 www.example.org.
To verify that these entries are active in the dns, enter these commands:
For clanalpha:
$ dig srv _ts3._udp.clanalpha.example.org +short
Expected output:
10 5 9987 www.example.org.
For clanbeta:
$ dig srv _ts3._udp.clanbeta.example.org +short
Expected output:
10 5 9988 www.example.org.
etc.
If there is no output, the entries are not active.
From now on, your clanalpha users can connect to your Teamspeak servers by
simply connecting to clanalpha.example.org without port number. Your clanbeta
users use clanbeta.example.org, and so on.
If you move your Teamspeak server away from your web server, for example to
ts.example.org on 1.2.3.5, you only need to change your SRV records:
$ORIGIN example.org.
_ts3._udp.clanalpha 3600 SRV 10 5 9987 ts.example.org.
_ts3._udp.clanbeta 3600 SRV 10 5 9988 ts.example.org.
_ts3._udp.clangamma 3600 SRV 10 5 9989 ts.example.org.
_ts3._udp.clandelta 3600 SRV 10 5 9990 ts.example.org.
Your users don't need to change anything.
Even if you run your Teamspeak server at home and use a dynamic hostname for
it, for example "mytsathome.dyndns.org", it is possible to hide the dynamic
hostname for your Teamspeak users. The only thing you need is control over your
domain example.org. This scenario applies if you only have rented webspace
with your own domain, but without the possibility of installing the Teamspeak
server on the webspace.
$ORIGIN example.org.
_ts3._udp.clanalpha 3600 SRV 10 5 9987 mytsathome.dyndns.org.
_ts3._udp.clanbeta 3600 SRV 10 5 9988 mytsathome.dyndns.org.
_ts3._udp.clangamma 3600 SRV 10 5 9989 mytsathome.dyndns.org.
_ts3._udp.clandelta 3600 SRV 10 5 9990 mytsathome.dyndns.org.
Your users still use clanalpha.example.org, clanbeta.example.org, etc. to
connect to your Teamspeak server.
===============================================================================
### 7. QUERY ADMIN PASSWORD RESET
To reset the query admin password without restarting the Teamspeak server,
simply call the contributed script */usr/bin/ts3-reset-query-admin.sh*.
It creates a new random serveradmin password, sets this password in the
Teamspeak database, and prints it to stdout. Note, it only for SQLite too.
If you want to do this manually to have control over the process, use these
commands:
```shell
$ echo -n 'the!New1Password2' | openssl dgst -binary -sha1 | openssl base64
kUOY5N1LFgSOVsKq689XHdYtJnQ=
$ sqlite3 ts3server.sqlitedb
sqlite> UPDATE clients SET client_login_password='kUOY5N1LFgSOVsKq689XHdYtJnQ=' WHERE
client_login_name='serveradmin';
```
This is not an officially supported way to reset the password, but it works
nonetheless.
===============================================================================
### 8. DIRECTORIES AND FILES
Documentation and query admin help files:
- */usr/share/doc/packages/teamspeak3-server*
Server Configuration:
- */etc/teamspeak3-server/ts3server.ini*
- */etc/teamspeak3-server/query_ip_denylist.txt*
- */etc/teamspeak3-server/query_ip_allowlist.txt*
Stored query admin username and password for snapshot backup operations:
- */etc/teamspeak3-server/snapshot*
Unit files:
- */usr/lib/systemd/system/teamspeak3-server.service*
- */usr/lib/systemd/system/teamspeak3-tsdns.service*
- */usr/lib/systemd/system/teamspeak3-backup.service*
- */usr/lib/systemd/system/teamspeak3-backup.timer*
Teamspeak database directory:
- */var/lib/teamspeak3-server*
SQL scripts:
- */usr/share/teamspeak3-server/sql*
Server and tools binary:
- */usr/bin/ts3server*
- */usr/bin/tsdnsserver*
- */usr/bin/ts3snapshot*
- */usr/bin/ts3backup*
- */usr/bin/ts3-get-query-admin.sh*
- */usr/bin/ts3-reset-query-admin.sh*
Database plugins and libraries (for x86_64):
- */usr/lib64/libts3db_mariadb.so*
- */usr/lib64/libts3db_postgresql.so*
- */usr/lib64/libts3db_sqlite3.so*
- */usr/lib64/libts3_ssh.so*