Setup Teamspeak Server Ubuntu 15.04

October 17, 2015 64.4k views
Deployment Getting Started Applications MariaDB Ubuntu

Someone asked me to write a tutorial about how to setup a teamspeak server on Ubuntu 15.04. If you got any problems after using this tutorial, please make a comment. I made this tutorial in a way I think is the best, if you got any improvements or want to use something else please tell me.

Prerequisites

  • A droplet with Ubuntu 15.04
  • An SSH client / SFTP client

What we will do

  • Install MariaDB
  • Install Teamspeak
  • Configure Teamspeak
  • Create an autostart script

Install MariaDB
MariaDB is a replacement for MySQL with a better performance. The database will hold all users/settings etc. of the Teamspeak server instead of SQLlite.
Inside your droplet use the following command:

sudo apt-get install mariadb-client mariadb-server

Once the install process is finished, you have to firstly setup your MariaDB install with new root password (default is blank). Issue this command:

/usr/bin/mysql_secure_installation
Enter current password for root (enter for none): Enter
Set root password? [Y/n]  Y
Remove anonymous users? [Y/n]  y
Disallow root login remotely? [Y/n] Depends on what you want
Remove test database and access to it? [Y/n]   y
Reload privilege tables now? [Y/n]   y

Now the MariaDB service should be running with a new root password.

Lets configure the database now. We will create a new user and database for the Teamspeak server. Create the database with your own password:

sudo mysql -u root -p
create database teamspeak3;
GRANT ALL PRIVILEGES ON teamspeak3.* TO teamspeak3@localhost IDENTIFIED BY 'PASSWORD';
flush privileges;
quit

Install Teamspeak
First we will create a new user with its own directory in /opt/. Then we will download the latest teamspeak server and unpack it.

sudo useradd -d /opt/teamspeak3-server -m teamspeak3-user

Now download, extract, move and change permissions of the teamspeak server files:

sudo wget http://dl.4players.de/ts/releases/3.0.11.4/teamspeak3-server_linux-amd64-3.0.11.4.tar.gz
sudo tar -zxvf teamspeak3-server_linux-amd64-3.0.11.4.tar.gz
sudo mv teamspeak3-server_linux-amd64/* /opt/teamspeak3-server
sudo chown teamspeak3-user:teamspeak3-user /opt/teamspeak3-server -R
sudo rm -fr teamspeak3-server_linux-amd64-3.0.11.4.tar.gz teamspeak3-server_linux-amd64

Symlink library libmariadb.so.2 from /redist folder to TeamSpeak3 server directory.

sudo ln -s /opt/teamspeak3-server/redist/libmariadb.so.2 /opt/teamspeak3-server/libmariadb.so.2

Run ldd to prints the shared libraries required by TeamSpeak3 server.

sudo ldd /opt/teamspeak3-server/libts3db_mariadb.so

If libmariadb.so.2 ==> not found shows, use the following command:

sudo apt-get install libmariadb2

Configure Teamspeak
We are going to configure TeamSpeak3 server with the MySQL-MariaDB database,
We have to manually create configfiles:

  • queryipblacklist.txt
  • queryipwhitelist.txt
  • ts3server.ini
  • ts3db_mariadb.ini

Create blacklist configfile.

sudo touch /opt/teamspeak3-server/query_ip_blacklist.txt

Create whitelist configfile.

sudo cat  << EOT > /opt/teamspeak3-server/query_ip_whitelist.txt
127.0.0.1
EOT

Create configfile with MySQL-MariaDB database option.

sudo nano /opt/teamspeak3-server/ts3server.ini

With the following inside of it:

machine_id=
default_voice_port=9987
voice_ip=0.0.0.0
licensepath=
filetransfer_port=30033
filetransfer_ip=0.0.0.0
query_port=10011
query_ip=0.0.0.0
query_ip_whitelist=query_ip_whitelist.txt
query_ip_blacklist=query_ip_blacklist.txt
dbsqlpath=sql/
dbplugin=ts3db_mariadb
dbsqlcreatepath=create_mariadb/
dbpluginparameter=ts3db_mariadb.ini
dbconnections=10
logpath=logs
logquerycommands=0
dbclientkeepdays=30
logappend=0
query_skipbruteforcecheck=0

Create the configfile for the database for the TeamSpeak3 server.
Change PASSWORD the same password you have created configuring MySQL database.

sudo nano /opt/teamspeak3-server/ts3db_mariadb.ini

Input:

[config]
host=127.0.0.1
port=3306
username=teamspeak3
password=PASSWORD
database=teamspeak3
socket=

Now you need to change permissions of the new config files:
sudo chown teamspeak3-user:teamspeak3-user /opt/teamspeak3-server -R
Now the configuration is done.

Create ts3 init script of TeamSpeak3 server (autostart)
sudo nano /etc/init.d/ts3
With:

#! /bin/sh
### BEGIN INIT INFO
# Provides:          ts3
# Required-Start:    $network mysql
# Required-Stop:     $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: TeamSpeak3 Server Daemon
# Description:       Starts/Stops/Restarts the TeamSpeak Server Daemon
### END INIT INFO

set -e

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="TeamSpeak3 Server"
NAME=teamspeak3-server
USER=teamspeak3-user
DIR=/opt/teamspeak3-server
OPTIONS=inifile=ts3server.ini
DAEMON=$DIR/ts3server_startscript.sh
#PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0

sleep 2
sudo -u $USER $DAEMON $1 $OPTIONS

Now change permissions for the scripts:

sudo chmod a+x /etc/init.d/ts3
sudo chmod a+x /opt/teamspeak3-server/ts3server_startscript.sh
sudo chmod a+x /opt/teamspeak3-server/ts3server_minimal_runscript.sh
sudo update-rc.d ts3 defaults

Now everything should be done, and ready to go. Lets start the Teamspeak3 server for the first time:
sudo /etc/init.d/ts3 start
You will first see the serveradmin password and token key. Make sure you save the serveradmin password somewhere save. With this you can query inside your teamspeak server. For the token key, you can also look in the logs:

/opt/teamspeak3-server/logs

Hit enter, and its all running.

Hope this worked for you. Please do not comment or answer if it has got nothing to do with this.

25 comments
  • nice tutorial :) quick and efficient, I can confirm this works fine on debian jessie

  • unable to init database, doesn't work if i copy paste everything running ubuntu 15.04

    Edit: Never mind, i'm an idiot. Forgot to change password to my own in this command: GRANT ALL PRIVILEGES ON teamspeak3.* TO teamspeak3@localhost IDENTIFIED BY 'PASSWORD';

  • @schinsue No problem, these things can happen. If you just copy past everything without reading (like I sometimes do as well) you don't see things like that. Good you got it working!

  • Hey there. Awesome tutorial.
    Uhm... when I try to install libmariadb2 on 64-bit Ubuntu 14.04 (trusty), I can't find the package.

    When I run this, as per the instructions....

    If libmariadb.so.2 ==> not found shows, use the following command:
         sudo apt-get install libmariadb2
    

    I get this:

    Unable to locate package libmariadb2
    

    Everything else worked fine except for this.

  • @TrevorLaneRay Hello, thank you for the compliment. Yes this package isn't included in the trusty version yet, please use the following command and then follow the tutorial again:

    sudo ln -s /opt/teamspeak3-server/redist/libmariadb.so.2 /usr/lib/
    

    If you got any more questions don't hesistate to ask them.

  • Oh, that's awesome. I was pulling out my hair trying to figure out what I did wrong.
    So looking at schinsue's comment, I have to change this command...

    GRANT ALL PRIVILEGES ON teamspeak3.* TO teamspeak3@localhost IDENTIFIED BY 'PASSWORD';
    

    to include the password like so...?

    GRANT ALL PRIVILEGES ON teamspeak3.* TO teamspeak3@localhost IDENTIFIED BY 'PasswordGoesHere123';
    
  • @TrevorLaneRay Good, yes that text between quotes is the password you want to use.

  • Awesomesauce. Thanks for all your help. Total newb to sql databases here. ^u^

  • Well i got one problem. After everything done right i cant run my server. I got error
    "sudo: -: command not found"

  • @paticzek
    Wich operating system are you using? And please give me the full command you are trying to execute.

  • what if I'm already using MySql and don't want to replace it with MariaDB?

  • This is an excellent guide, I used this to setup a TS server a few days ago and it worked flawlessly. My only "problem" (truthfully it is not so much a problem as it is curiosity) is the next day a new TS server version was released. So I'm now wondering what would be the process for upgrading the TS server after having followed this method.

  • As sort of a continuance of my previous post, I have some updates to this guide as some of the steps have changed slightly (newer TS server releases are .tar.bz2 instead of .tar.gz and the file name format has changed):
    These changes are all in the section labeled 'Now download, extract, move and change permissions of the teamspeak server files:'

    sudo wget http://dl.4players.de/ts/releases/3.0.12.2/teamspeak3-server_linux_amd64-3.0.12.2.tar.bz2
    sudo tar -jxvf teamspeak3-server_linux_amd64-3.0.12.2.tar.bz2
    sudo mv teamspeak3-server_linux_amd64/* /opt/teamspeak3-server
    sudo chown teamspeak3-user:teamspeak3-user /opt/teamspeak3-server -R
    sudo rm -fr teamspeak3-server_linux_amd64-3.0.12.2.tar.bz2 teamspeak3-server_linux_amd64
    

    Additionally, updating the server is simple:

    1. Shutdown the server:

      sudo /etc/init.d/ts3 stop
      
    2. Follow this modified 'Now download, extract, move and change permissions of the teamspeak server files:' section:

    sudo wget http://dl.4players.de/ts/releases/3.0.12.2/teamspeak3-server_linux_amd64-3.0.12.2.tar.bz2
    sudo tar -jxvf teamspeak3-server_linux_amd64-3.0.12.2.tar.bz2
    sudo rsync -a -v --remove-source-files teamspeak3-server_linux_amd64/* /opt/teamspeak3-server
    sudo chown teamspeak3-user:teamspeak3-user /opt/teamspeak3-server -R
    sudo rm -fr teamspeak3-server_linux_amd64-3.0.12.2.tar.bz2 teamspeak3-server_linux_amd64
    
    1. Restart the server: sudo /etc/init.d/ts3 start
    Notes:
    1. This update process worked for me without any issues when updating from 3.0.12.0 to 3.0.12.2
    2. I don't know if it was necessary to run the 'sudo chown' line during this update process, I used the command as a precaution when I updated my server.
    
  • I followed your guide step by step, but ran into the issue when starting the server

    789173|CRITICAL|ServerLibPriv |   |Server() unable to initialize database 
    TeamSpeak 3 server could not start
    
    
  • @RS7588 be sure that the password of teamspeak user in mysql and /opt/teamspeak3-server/ts3db_mariadb.ini match, and privileges

  • Hi, everything worked perfectly for me, but when I run "/opt/teamspeak3-server/logs" all it does is tell me "is a directory." I can't get the privilege key without the file, so if I can't fix that, everything was useless. :/

    EDIT: Changed access, nothing is in the folder...
    EDIT AGAIN: Removed the folder, redid the tutorial, for some reason I got the token this time, thank you Cryptic! Everything works fine!

  • Hi, how can I setup an external MariaDB? I want to connect to the MariaDB over the DigitalOcean Private Networking. I tried it but I failed. TeamSpeak says:

    2016-08-02 10:46:22.231297|CRITICAL|ServerLibPriv | |Server() unable to initialize database
    TeamSpeak 3 server could not start

    What can I do now?

  • Hello, I'd like to move my server from one server to another. How do I do it keeping all the server's information and config?

  • This does have to do with this guide - as I think its important to other new users new to ubuntu and servers to know this answer -

    I have one ubuntu 16001 droplet server running with nginx , php, mysql db... If I follow this guide to also install and host TS, will this mess up my other mysql DB and can i run it on the same droplet? I also have my own domain... so, an i follow this guide and setup the ts server to point to say ts.mydomain.com?

  • @TopMax Since DigitalOcean didn't accept me as a tutorial writer I made my own blog. Please visit cryptic-designs.net and make a comment on the Teamspeak tutorial. I will answer all questions there since this topic is getting overloaded a bit.
    Be aware that the blog is still being improved.

    @BatmanJK This is possible with different sort of ways. Please make a comment at cryptic-designs.net and I will explain both ways.

    @ronniem71 This tutorial should not mess up anything else on your current setup. You can use this without being worried about anything getting messen up by it. If you got any other questions please visit cryptic-designs.net

  • First off, awesome tutorial. I am, however having an issue. I followed the instructions (on Ubuntu 16.04), however I get the following when I try to start the TS3 server for the first time.

    myuser@mydomain:~$ sudo /etc/init.d/ts3 start
    Starting the TeamSpeak 3 server
    TeamSpeak 3 server started, for details please view the log file
    
    

    I tried looking in the logs folder, but it doesn't exist (there are also no errors that show on the screen). I've checked netstat, which didn't show anything listening. I've also looked for the process, however it doesn't seem to be running (although the .pid file is there).

    Any suggestions?

  • Having an error: unable to create tables. Anyone come across this problem? I followed everything in the tutorial I thought.

  • @shdwtek Do you get any specific error? Most of the time the logs say it all.

  • Hello,

    is there a way to allow the access to the ts3-server via client only for a special vhost or cname?
    For Example:

    My IP is 192.0.2.0
    My domain is example.com

    now i want to access the ts3 server only by using ts.example.com
    and "block" the ip-address access

  • @alexanderstudte basically a domain record IS an IP address. A domain is just an easier way for humans to remember something. So no, you can't block an IP address from connecting.

    HOWEVER, you can sort of bypass this. For example;
    If you change your teamspeak server port to a non-default port (for example 6135) and people try to connect by IP, they won't be able to connect because they have to also fill in the (secret) port.
    With this, you can create a DNS A record and SRV record so when they fill in the A record, they will be redirected to the Teamspeak server.

    If you need more help with this, or don't understand this don't hesistate to ask another question.

16 Answers

This tutorial works on Ubuntu 14.04 ?

  • Yes, as you can see the comment of TrevorLaneRay above it all works. You only need to change one command.
    From:

    sudo apt-get install libmariadb2
    

    To:

    sudo ln -s /opt/teamspeak3-server/redist/libmariadb.so.2 /usr/lib/
    

This worked for my machine, but what if I want to create more than 1 teamspeak from one Instance(Server). I already checked to log in with the port 3306, but I didn't work.

  • Good to hear, I am sorry for the late reply.

    If you like to have multiple virtual teamspeak servers you would need a license from Teamspeak. You can find more information about which license fits you on their website

quick question.... i followed everything you said and got to the end... after having to add lines to the sources for the libmariadb2 installation... but when i start the service i get this:::

Starting the TeamSpeak 3 server
TeamSpeak 3 server started, for details please view the log file
root@ArkabLegions:~# 2016-03-19 17:44:06.674268|CRITICAL|ServerLibPriv | | Server() unable to initialize database

Is the server running?

  • What does your teamspeak log tells you? This gives usefull information most of the time.
    Do you have the mariadb server running?
    Wich OS are you using?

    • I used Ubuntu 14.04, i dont' know how to get to the log. i am sort of new at this. i don't know if the mariadb server is running. i followed the setup instructions word for word... and you have to add in the source for the mariadb2 which i already did... and i updated and upgraded all through apt-get... so i am just confused...

      I just found the log... here is what it says::

      2016-03-19 21:18:07.102172|INFO |ServerLibPriv | | TeamSpeak 3 Server 3.0.11.4 (2015-08-18 13:30:34)
      2016-03-19 21:18:07.102642|INFO |ServerLibPriv | | SystemInformation: Linux 3.13.0-79-generic #123-Ubuntu SMP F$
      2016-03-19 21:18:07.102697|INFO |ServerLibPriv | | Using hardware aes
      2016-03-19 21:18:07.105581|INFO |DatabaseQuery | | dbPlugin name: MariaDB plugin, (c)TeamSpeak Systems GmbH
      2016-03-19 21:18:07.105639|INFO |DatabaseQuery | | dbPlugin version: 1
      2016-03-19 21:18:07.107010|ERROR |DatabaseQuery | | mysqlrealconnect() failed with error: Access denied for us$
      2016-03-19 21:18:07.107082|CRITICAL|ServerLibPriv | | Server() unable to initialize database

    • nevermind... i figured it out on my own... i had to change the /opt/teamspeak3-server/ts3db_mariadb.ini file and remove the line that reads "socket="

      after that it booted and ran perfectly fine

      • I was having the same issue, so I did as you did by removing "socket=". It didnt help in my case.

        I've doubled back to make sure I correctly typed the username/password correctly, too. Both in the ini file and for the database itself.

        Any help would be appreciated.

        • i honestly don't know what it could be... i was doing trial and error with different google searches. try to boot it up and then get the log after the error and post it up in here and see if there is something missing in the log.

          • I've got it working since then. I created a new database and user (ts3) and a simpler password. I'm not sure why this worked other then maybe making a typing error when entering the password where needed . . . but i double, triple checked that. Thanks for looking into it, though.

          • Yeah to be honest, i had to wipe and start over probably 4 or 5 times before i got the thing to run properly. let me know if you figure out how to add the Non-Profit License in through putty or how ever you have to do it....

        • hey... i had to reinstall again because i wanted an email server as well as website and ts3 and i was told to start with email server and i ran into the problem again... and i think i figured it out.... when you are creating the database... you have to actually specify the password unless you going to leave it as PASSWORD.... so...

          sudo mysql -u root -p
          create database teamspeak3;
          GRANT ALL PRIVILEGES ON teamspeak3.* TO teamspeak3@localhost IDENTIFIED BY '(yourmysqlpassword)';
          flush privileges;
          quit

          • Do you mean that you need to configure the password in the teamspeak ts3db_mariadb.ini file the same you setup the database password with?

            Yes, thats the point of setting up a database with a user so the Teamspeak server can communicate with the database.

Cannot get past: sudo apt-get install mariadb-client mariadb-server

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Hey

really nice scripts and thanks for making it for me as a noob in Linux.

Everything went fine and its running without errors.

But how do i change the PASSWORD to something else after i made it with PASSWORD as password ?

And another thing is ........

Now with the TS3 server running, where is it ? Shouldnt i have an icon on my GUI/desktop to start a GUI version of the TS3 server and how do i let people into it and how do i use/configure it ?

Sorry im new in Linux and a bit lost now :)

Gaio

  • Hey there,

    Well in the tutorial you could have made another password as you wanted. However if you didn't change this you have to

    • Change the database password
    • Change the password in the Teamspeak config

    Change the database password

    Login to your mysql with command

    sudo mysql -u root -p
    

    Change the teamspeak user password

    SET PASSWORD FOR 'teamspeak3'@'localhost' = PASSWORD('newpassword');
    

    MAKE SURE YOU CHANGE newpassword WITH YOUR OWN

    Change the password in the Teamspeak config

    Open the config file

    sudo nano /opt/teamspeak3-server/ts3db_mariadb.ini
    

    Change password=PASSWORD to password=newpassword
    MAKE SURE YOU CHANGE newpassword TO THE PASSWORD YOU JUST MADE IN THE DATABASE

    After this restart the teamspeak server

    sudo /etc/init.d/ts3 start
    

    Now with the TS3 server running, where is it ? Shouldnt i have an icon on my GUI/desktop to start a GUI version of the TS3 server and how do i let people into it and how do i use/configure it ?
    Well you just setup the TS3 server. The client you need to download yourself on your client PC. You can download this at the teamspeak website

    Once you have it, go to Connections --> Connect -->
    And use the IP of your droplet to connect to.

    Hope this helps you out!

Could you please add a tutorial on how to insert the NPL licencekey? Or just some instructions.

Starting the TeamSpeak 3 server
TeamSpeak 3 server started, for details please view the log file
root@ubuntu-512mb-nyc1-01:~# 2016-07-21 17:43:56.807569|CRITICAL|ServerLibPriv | | Server() unable to initialize database

Logs:
2016-07-21 17:53:30.972983|INFO |ServerLibPriv | | TeamSpeak 3 Server 3.0.11.4 (2015-08-18 13:30:34)
2016-07-21 17:53:30.973160|INFO |ServerLibPriv | | SystemInformation: Linux 4.4.0-28-generic #47~14.04.1-Ubuntu SMP Fri Jun 24 16:30:35 UTC 2016 x8664 Binary: 64bit
2016-07-21 17:53:30.973242|INFO |ServerLibPriv | | Using hardware aes
2016-07-21 17:53:30.978651|INFO |DatabaseQuery | | dbPlugin name: MariaDB plugin, (c)TeamSpeak Systems GmbH
2016-07-21 17:53:30.978754|INFO |DatabaseQuery | | dbPlugin version: 1
2016-07-21 17:53:30.984100|ERROR |DatabaseQuery | | mysql
real_connect() failed with error: Access denied for user 'teamspeak3'@'localhost' (using password: YES)
2016-07-21 17:53:30.984205|CRITICAL|ServerLibPriv | | Server() unable to initialize database

  • Hi,

    This is because you didn't use the same password in your TS3 server config file as the database user password. Are you sure you are using the same password for both the database and the config file?

    • Yes i think i use the same password , anyway how i can check the config file to see if there is same password?

      • Open the config file with

        sudo nano /opt/teamspeak3-server/ts3db_mariadb.ini
        

        and check the password= section

  • I'm having the same problem. I copied and pasted the commands and file content to avoid any typos.

    i can't change directory into logs i get permission denied. I tried adding my user name to the teamspeak3-user group and will change permissions to allow me next.

    however when i start the server i get the the server() unable to initialize database

    toonamo@toonamo-Virtual-Machine:/opt/teamspeak3-server$ sudo /etc/init.d/ts3 startStarting the TeamSpeak 3 server
    2016-10-01 00:12:54.486042|CRITICAL|ServerLibPriv |   | Server() unable to initialize database
    TeamSpeak 3 server could not start
    

    i can however use the same user and password from the ini file to connect to mysql and create a table and drop it.

    Brand new install. Any thoughts?

    • changed user to teamspeak3-user by useing

      
      sudo su teamspeak3-user
      

      log stated:

      2016-10-01 00:12:54.481932|INFO    |ServerLibPriv |   | TeamSpeak 3 Server 3.0.11.4 (2015-08-18 13:30:34)
      2016-10-01 00:12:54.482194|INFO    |ServerLibPriv |   | SystemInformation: Linux 4.4.0-36-generic #55-Ubu$
      2016-10-01 00:12:54.482284|INFO    |ServerLibPriv |   | Using hardware aes
      2016-10-01 00:12:54.484632|INFO    |DatabaseQuery |   | dbPlugin name:    MariaDB plugin, (c)TeamSpeak Sy$
      2016-10-01 00:12:54.484744|INFO    |DatabaseQuery |   | dbPlugin version: 1
      2016-10-01 00:12:54.485933|ERROR   |DatabaseQuery |   | mysql_real_connect() failed with error: Can't con$
      2016-10-01 00:12:54.486042|CRITICAL|ServerLibPriv |   | Server() unable to initialize database
      

      so i added a new user to the database

      CREATE USER 'teamspeak3'@'%' IDENTIFIED BY 'mypass';
      

      i then granted permisions:

      GRANT ALL ON *.* TO 'myuser'@'localhost';
      GRANT ALL ON *.* TO 'myuser'@'%';
      

      and changed the ip from 127.0.0.1 to my local ip address and tried to run it.
      log is as follows:

      2016-10-01 00:25:59.987923|INFO    |ServerLibPriv |   | TeamSpeak 3 Server 3.0.11.4 (2015-08-18 13:30:34)
      2016-10-01 00:25:59.988183|INFO    |ServerLibPriv |   | SystemInformation: Linux 4.4.0-36-generic #55-Ubu$
      2016-10-01 00:25:59.988274|INFO    |ServerLibPriv |   | Using hardware aes
      2016-10-01 00:25:59.989917|INFO    |DatabaseQuery |   | dbPlugin name:    MariaDB plugin, (c)TeamSpeak Sy$
      2016-10-01 00:25:59.990019|INFO    |DatabaseQuery |   | dbPlugin version: 1
      2016-10-01 00:25:59.991300|ERROR   |DatabaseQuery |   | mysql_real_connect() failed with error: Can't con$
      2016-10-01 00:25:59.991413|CRITICAL|ServerLibPriv |   | Server() unable to initialize database
      
      • Hello @toonamo ,

        Try to remove the socket= line at the end of /opt/teamspeak3-server/ts3db_mariadb.ini. This worked for some cases.

        If that doesn't work try to use a valid socket:

        socket=/var/run/mysqld/mysqld.sock
        
        • still the same error. teamspeak is not able to access the database.

          • Allright, please try the following. I have found MySQL sometimes doesn't like the use of localhost, so try tonusenthe following:

            sudo mysql -u root -p
            create database teamspeak3;
            GRANT ALL PRIVILEGES ON teamspeak3.* TO 'teamspeak3'@'127.0.0.1' IDENTIFIED BY 'PASSWORD';
            flush privileges;
            quit
            

            And if you are using a secure difficult generated password , please try to use a less difficult password. Have seen that passwords with alot of symbolics and high length don't work.
            Please try these options and give a feedback.

          • it still wasn't working. so i deleted all users from the table mysql.user
            DELETE FROM mysql.user WHERE user='teamspeak3';

            then droped the users.
            DROP USER 'teamspeak3'@'localhost';
            DROP USER 'teamspeak3'@'%';
            DROP USER 'teamspeak3'@'127.0.0.1';

            then i created the user
            CREATE USER 'teamspeak3'@'localhost' IDENTIFIED BY 'password';

            granted permission
            GRANT ALL PRIVILEGES ON teamspeak3 . * TO 'teamspeak3'@'localhost';

            then flushed the database
            FLUSH PRIVILEGES;

            i did use a much simpler password as well, and used localhost for the host rather than 127.0.0.1

            that seemed to allow it to work.

            Thank you for all your help.

Thanks a lot for answer :)

And what if I need to have more admins? I think that it is possible but I don't know how to do it. Can someone help me, please? :-D

edit: aaaand, I have a problem.. I have removed the ip of my ts3 client from the whitelist and I have restarted the ts3 server, but the *client *connected anyway. How is it possible?

  • @igic This is not really a setup question but I'm happy to help you.
    There are two ways, easiest way is the first;

    • You can assign admins by righ clicking on their name and assigning them a server group.
    • You can create a privilege key inside Permissions --> Privilege keys --> Create and then give them the key You can read alot more about server groups, Teamspeak permissions and security online. For example here

    What do you mean with the second question? What client connected and what are you trying to achieve?

when a do

Now everything should be done, and ready to go. Lets start the Teamspeak3 server for the first time:
sudo /etc/init.d/ts3 start

Nothing happens, No error or anything.

a run Ubuntu 16.10 x64 is that the problem ?

  • @kulaN If it doesn't return anything the first time you might need to wait a while.
    Try to check if the server is running by /etc/init.d/ts3 status and also try to connect to your Teamspeak server with your client.

    I have recently made a new tutorial using Ubuntu 16.10 x64. Find the latest tutorial on my blog:
    cryptic-designs.net

I followed the tutorial and I still can't get the TS to start. I keep getting "bad interperter: No such file or directory when trying to /etc/init.d/ts3 start Any help would be appreciated as I'm installing new head shaped dents into my desk. Thanks in advance for any help.

I've followed this tutorial twice for 2 droplets. There weren't any error messages or logs generated but I'm unable to connect to the server. The logs generated are fine as well.

These are the logs from starting the teamspeak server: http://pastebin.com/raw/Ltms89Gb
In Teamspeak, when I try connecting, the clients logs are

17/12/2016 15:58:40 ClientUI    Info    Initiating connection: 123.456.78.123:9987 123.456.78.123   
17/12/2016 15:58:41 ClientUI    Info    Connect status: Connecting  
17/12/2016 15:58:45 ClientUI    Info    Connect status: Disconnected    
17/12/2016 15:58:45 ClientUI    Info    Failed to connect to server, want autoreconnect = 0 

Thanks in advance!

  • @SprX if you followed my latest tutorial on the link I gave you last time and the scripts are working this time, then this sounds like a firewall problem.
    Please check if your teamspeak is running with

    netstat -anp | grep 9987
    

    also check if you have any firewall running with

    ufw status
    

    or

    iptables -L
    

    You can also check if your port is open from the outside once you have checked and made all necessary ports open with this tool

Worked perfectly with Ubuntu 16.04 LTS as well. As always, you will need to get the correct path to the current version of Teamspeak 3 from the Teamspeak 3 download page for the wget command.

Honestly the first guide that has worked flawlessly for me in a year. Thanks for the detail and good instructions!

Have another answer? Share your knowledge.