Teamspeak Server - How to Install & Setup on Ubuntu 16.04

Step 1: Update Ubuntu
First, ensure your system and apt package lists are fully up-to-date by running the following: apt-get update -y apt-get upgrade -y

Step 2: Create a new system user
Create a new user with your desired name, we will use the name “teamspeak” for this guide: adduser --disabled-login teamspeak Adding new group `teamspeak' (1000) ... Adding new user `teamspeak' (1000) with group `teamspeak' ... Creating home directory `/home/teamspeak' ... Copying files from `/etc/skel' ... Changing the user information for teamspeak Enter the new value, or press ENTER for the default Full Name []: Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n]

Download Files
First, download the latest Team Speak 3 server files for 64-bit Linux. Check their website, a new version may be available: (replace URL with latest download URL found on the Team speak website) wget http://dl.4players.de/ts/releases/3.0.12.4/teamspeak3-server_linux_amd64-3.0.12.4.tar.bz2

Unpack The Archive
tar xvf teamspeak3-server_linux_amd64-3.0.12.4.tar.bz2 cd teamspeak3-server_linux_amd64 cp * -R /home/teamspeak cd .. rm -rf teamspeak3-server_linux_amd64*

Change ownership of the TeamSpeak server files
chown -R teamspeak:teamspeak /home/teamspeak

Start Teamspeak Server on Boot
nano /lib/systemd/system/teamspeak.service Copy the following content into the startup script file: [Unit] Description=Team Speak 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 Once you are done, save the file and close the editor. Now we will activate the script so that it will start on boot: systemctl --system daemon-reload systemctl start teamspeak.service systemctl enable teamspeak.service

Step 4: Configure Firewall for Team Speak.
You may need to forward the following ports to allow connections to your TeamSpeak Server: iptables -A INPUT -p udp --dport 9987 -j ACCEPT iptables -A INPUT -p udp --sport 9987 -j ACCEPT iptables -A INPUT -p tcp --dport 30033 -j ACCEPT iptables -A INPUT -p tcp --sport 30033 -j ACCEPT iptables -A INPUT -p tcp --dport 10011 -j ACCEPT iptables -A INPUT -p tcp --sport 10011 -j ACCEPT

Important Note
When logging onto your Team Speak server for the first time you will be asked to enter a token. This token will give your user admin rights. This token can be found in either the first or second log file. The logs are stored in the log folder that is inside your Team speak directory.

Source:

https://myvpsource.com/install-teamspeak-server-ubuntu-16-04