How to Install TeamSpeak 3 Server on Ubuntu 22.04 LTS
Follow this step-by-step tutorial to install TeamSpeak 3 server on your Ubuntu 22.04 LTS system.
Prerequisites
- A server running Ubuntu 22.04 LTS
- Access to the server via SSH
- A non-root user with sudo privileges
Step 1: Create a Dedicated User
Create a new system user to run the TeamSpeak server. This improves security by isolating the server from other processes
sudo useradd -mrd /opt/teamspeak teamspeak -s "$(which bash)"This command creates a user named teamspeak with the home directory /opt/teamspeak
Step 2: Download and Install TeamSpeak Server
Switch to the newly created user and download the latest TeamSpeak server package:
sudo su - teamspeakwget https://files.teamspeak-services.com/releases/server/3.13.7/teamspeak3-server_linux_amd64-3.13.7.tar.bz2 -O teamspeak-server.tar.bz2Extract the downloaded archive:
tar xvfj teamspeak-server.tar.bz2 --strip-componentsAccept the license agreement by creating an empty file:
touch ~/.ts3server_license_acceptedStep 3: Configure Systemd Service
Create a systemd service file to manage the TeamSpeak server:
sudo nano /etc/systemd/system/teamspeak.servicePaste the following configuration into the file
[Unit]
Description=Teamspeak Service
Wants=network.target
[Service]
WorkingDirectory=/opt/teamspeak
User=teamspeak
ExecStart=/opt/teamspeak/ts3server_minimal_runscript.sh
ExecStop=/opt/teamspeak/ts3server_startscript.sh stop
ExecReload=/opt/teamspeak/ts3server_startscript.sh restart
Restart=always
RestartSec=15
[Install]
WantedBy=multi-user.targetSave the file and reload systemd:
sudo systemctl daemon-reloadStep 4: Start TeamSpeak Server
Start the TeamSpeak server and set an admin password:
sudo su - teamspeak ./ts3server_startscript.sh start serveradmin_password=your_passwordReplace your_password with a strong password for the server admin account. Optionally, whitelist your server and client IP addresses in the allowlist file:
nano /opt/teamspeak/query_ip_allowlist.txtEnable and start the systemd service:
sudo systemctl enable --now teamspeakStep 5: Connect to TeamSpeak Server
Download and install the TeamSpeak client on your desktop machine from the official website. Launch the client and enter your server's IP address and admin password. You will be prompted for the privilege key, which can be obtained by running:
sudo systemctl status teamspeakLook for a line similar to token=eKnFZQ9EK7G7MhtuQB6+N2B1PNZZ6OZL3V1Wz8OToSJ. Enter the token in the client to gain admin access to your TeamSpeak 3 server
Congratulations! You have now installed and configured a TeamSpeak 3 server on your Ubuntu 22.04 LTS system.