<\/span><\/h2>\r\n\r\n\r\n\r\nFirst, log in to your Ubuntu 20.04 server via SSH as the root user:<\/p>\r\n\r\n\r\n\r\n
ssh root@IP_Address -p Port_number<\/pre>\r\n\r\n\r\n\r\nYou will need to replace ‘IP_Address’ and ‘Port_number’ with your server\u2019s respective IP address and SSH port number. Additionally, replace ‘root’ with the username of the admin account if necessary.<\/p>\r\n\r\n\r\n\r\n
Before starting, you have to make sure that all Ubuntu OS packages installed on the server are up to date. You can do this by running the following commands:<\/p>\r\n\r\n\r\n\r\n
apt-get update -y
apt-get upgrade -y<\/pre>\r\n\r\n\r\n\r\n<\/span>Install TeamSpeak<\/span><\/h2>\r\n\r\n\r\n\r\nBefore starting, you will need to create a separate user to run TeamSpeak server. You can create a new user with the following command:<\/p>\r\n\r\n\r\n\r\n
adduser --disabled-login teamspeak<\/pre>\r\n\r\n\r\n\r\nOnce the user is created, switch the user to TeamSpeak and download the latest version of the TeamSpeak server using the following command:<\/p>\r\n\r\n\r\n\r\n
su - teamspeak
wget https:\/\/files.teamspeak-services.com\/releases\/server\/3.13.5\/teamspeak3-server_linux_amd64-3.13.5.tar.bz2<\/pre>\r\n\r\n\r\n\r\nOnce the download is completed, extract the downloaded file with the following command:<\/p>\r\n\r\n\r\n\r\n
tar xvfj teamspeak3-server_linux_amd64-3.13.5.tar.bz2<\/pre>\r\n\r\n\r\n\r\nNext, copy all contents from the extracted directory to the TeamSpeak home directory:<\/p>\r\n\r\n\r\n\r\n
cp teamspeak3-server_linux_amd64\/* -R \/home\/teamspeak\/<\/pre>\r\n\r\n\r\n\r\nNext, remove the downloaded file with the following command:<\/p>\r\n\r\n\r\n\r\n
rm -rf teamspeak3-server_linux_amd64 teamspeak3-server_linux_amd64-3.13.5.tar.bz2<\/pre>\r\n\r\n\r\n\r\nNext, create a blank license file with the following command:<\/p>\r\n\r\n\r\n\r\n
touch .ts3server_license_accepted<\/pre>\r\n\r\n\r\n\r\nNext, exit from the TeamSpeak user with the following command:<\/p>\r\n\r\n\r\n\r\n
exit<\/pre>\r\n\r\n\r\n\r\n<\/span>Create a Systemd Service File for TeamSpeak<\/span><\/h2>\r\n\r\n\r\n\r\nNext, you will need to create a systemd service file to manage the TeamSpeak service. You can create it with the following command:<\/p>\r\n\r\n\r\n\r\n
nano \/lib\/systemd\/system\/ts3server.service<\/pre>\r\n\r\n\r\n\r\nAdd the following lines:<\/p>\r\n\r\n\r\n\r\n
[Unit]
Description=Teamspeak Service
Wants=network.target
[Service]
WorkingDirectory=\/home\/teamspeak
User=teamspeak
ExecStart=\/home\/teamspeak\/ts3server_minimal_runscript.sh
ExecStop=\/home\/teamspeak\/ts3server_startscript.sh stop
ExecReload=\/home\/teamspeak\/ts3server_startscript.sh restart
Restart=always
RestartSec=15
[Install]
WantedBy=multi-user.target<\/pre>\r\n\r\n\r\n\r\nSave and close the file then reload the systemd service with the following command:<\/p>\r\n\r\n\r\n\r\n
systemctl daemon-reload<\/pre>\r\n\r\n\r\n\r\nNext, start the TeamSpeak service and enable it to start at system reboot:<\/p>\r\n\r\n\r\n\r\n
systemctl start ts3server
systemctl enable ts3server<\/pre>\r\n\r\n\r\n\r\nNow, check the status of the TeamSpeak service with the following command:<\/p>\r\n\r\n\r\n\r\n
systemctl status ts3server<\/pre>\r\n\r\n\r\n\r\nOutput:<\/p>\r\n\r\n\r\n\r\n
\u25cf ts3server.service - Teamspeak Service
Loaded: loaded (\/lib\/systemd\/system\/ts3server.service; disabled; vendor preset: enabled)
Active: active (running) since Thu 2021-05-20 11:13:18 UTC; 5s ago
Main PID: 825 (ts3server)
Tasks: 21 (limit: 4691)
Memory: 25.2M
CGroup: \/system.slice\/ts3server.service
\u2514\u2500825 .\/ts3server
May 20 11:13:19 ubuntu2004 ts3server_minimal_runscript.sh[825]: serveradmin rights for your virtualserver. please
May 20 11:13:19 ubuntu2004 ts3server_minimal_runscript.sh[825]: also check the doc\/privilegekey_guide.txt for details.
May 20 11:13:19 ubuntu2004 ts3server_minimal_runscript.sh[825]: token=a4KYsOm0ixyWAf+rNsVmG95MlNfVjYYdl6EUR5Bq
May 20 11:13:19 ubuntu2004 ts3server_minimal_runscript.sh[825]: ------------------------------------------------------------------
May 20 11:13:19 ubuntu2004 ts3server_minimal_runscript.sh[825]: 2021-05-20 11:13:19.028321|INFO |Query | |listening for query on >
May 20 11:13:19 ubuntu2004 ts3server_minimal_runscript.sh[825]: 2021-05-20 11:13:19.028448|INFO | | |creating QUERY_SSH_RSA_>
May 20 11:13:19 ubuntu2004 ts3server_minimal_runscript.sh[825]: 2021-05-20 11:13:19.194739|INFO | | |myTeamSpeak identifier >
May 20 11:13:21 ubuntu2004 ts3server_minimal_runscript.sh[825]: 2021-05-20 11:13:21.890818|INFO |Query | |listening for ssh query>
May 20 11:13:21 ubuntu2004 ts3server_minimal_runscript.sh[825]: 2021-05-20 11:13:21.890981|INFO |Query | |listening for http quer>
May 20 11:13:21 ubuntu2004 ts3server_minimal_runscript.sh[825]: 2021-05-20 11:13:21.891138|INFO |CIDRManager | |updated query_ip_allowl>
lines 1-19\/19 (END)<\/pre>\r\n\r\n\r\n\r\nAt this point, the TeamSpeak server is started. You can check all ports used by the TeamSpeak server using the following command:<\/p>\r\n\r\n\r\n\r\n
ss -antpl | grep ts3server<\/pre>\r\n\r\n\r\n\r\nOutput:<\/p>\r\n\r\n\r\n\r\n
LISTEN 0 128 0.0.0.0:30033 0.0.0.0:* users:((\"ts3server\",pid=825,fd=36))
LISTEN 0 128 0.0.0.0:10011 0.0.0.0:* users:((\"ts3server\",pid=825,fd=57))
LISTEN 0 128 0.0.0.0:10080 0.0.0.0:* users:((\"ts3server\",pid=825,fd=61))
LISTEN 0 128 0.0.0.0:10022 0.0.0.0:* users:((\"ts3server\",pid=825,fd=59))
LISTEN 0 128 [::]:30033 [::]:* users:((\"ts3server\",pid=825,fd=37))
LISTEN 0 128 [::]:10011 [::]:* users:((\"ts3server\",pid=825,fd=58))
LISTEN 0 128 [::]:10080 [::]:* users:((\"ts3server\",pid=825,fd=62))
LISTEN 0 128 [::]:10022 [::]:* users:((\"ts3server\",pid=825,fd=60)) <\/pre>\r\n\r\n\r\n\r\n