How to use the Server Query

How do you use and work with the server query?

ServerQuery is a commandline based administration tool/feature of TeamSpeak 3 server.

There are two ways to use a ServerQuery:

  • Telnet (Putty or Linux Commandline)
  • Graphical Webinterface YatQa (Take a look at https://yat.qa)

Telnet
You can open a “telnet” connection to your TeamSpeak 3 server. Just follow the steps:

  • Windows

    1. Download Putty: http://www.putty.org/
    2. Open Putty
    3. Enter your TeamSpeak 3 server address in the Putty field ‘Host Name (or IP Address)’
    4. Connection Type: Telnet
    5. Port: 10011 (default)
    6. Now open your telnet connection by pressing the button “Open”
    7. If all was correctly, you will see something like this:

TS3
Welcome to the TeamSpeak 3 ServerQuery interface, type “help” for a list of commands and “help ” for information on a specific command.

  1. As next step, you have to login with your ServerQuery account:
Code:
 
 login <serverquery username> <serverquery password>

For example like this:

Code:
login serveradmin verySecret$Password2013

Your server will answer you, if your login was successfull or not:

error id=0  **msg=ok**
  1. Now: You can run every command, which is listed in the help list:
Code:

**help** TeamSpeak 3 Server :: ServerQuery (c) TeamSpeak Systems GmbH ServerQuery is a command-line interface built into the TeamSpeak 3 Server which allows powerful scripting and automation tools to be built based on the exact same instruction set and functionality provided by the TeamSpeak 3 Client. For example, you can use scripts to automate the management of virtual servers or nightly backups. In short, you can perform operations more efficiently by using ServerQuery scripts than you can by using a user interface. Command Overview: help | read help files login | authenticate with the server logout | deselect virtual server and log out quit | close connection use | select virtual server banadd | create a ban rule banclient | ban a client . . .
  • Linux

    1. Open a terminal
    2. Enter the following command to connect to your TeamSpeak 3 server:

    Code:

       telnet host serverquery port
    

For example:

Code:

telnet yourdomain.com 10011
  1. If it was correctly, you will see something like this:

Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
TS3
Welcome to the TeamSpeak 3 ServerQuery interface, type “help” for a list of commands and “help ” for information on a specific command.

  1. As next step, you have to login with your ServerQuery account:
Code:

login <serverquery username> <serverquery password>

For example like this:

Code:

login serveradmin verySecret$Password2013

Your server will answer you, if your login was successfull or not:

error id=0  **msg=ok**
  1. Now: You can run every command, which is listed in the help list:
Code:

**help** TeamSpeak 3 Server :: ServerQuery (c) TeamSpeak Systems GmbH ServerQuery is a command-line interface built into the TeamSpeak 3 Server which allows powerful scripting and automation tools to be built based on the exact same instruction set and functionality provided by the TeamSpeak 3 Client. For example, you can use scripts to automate the management of virtual servers or nightly backups. In short, you can perform operations more efficiently by using ServerQuery scripts than you can by using a user interface. Command Overview: help | read help files login | authenticate with the server logout | deselect virtual server and log out quit | close connection use | select virtual server banadd | create a ban rule banclient | ban a client . . .

To the commands: If you don’t know, how they are working: run the command “help ”. You will get the detailled usage informations about the command.

For example like that:

Code:

**help servercreate** *Usage: servercreate [virtualserver_properties...]* Creates a new virtual server using the given properties and displays its ID and initial administrator token. If virtualserver_port is not specified, the server will test for the first unused UDP port. Example: servercreate virtualserver_name=TeamSpeak\s]\p[\sServer virtualserver_port=9988 virtualserver_maxclients=32 sid=7 token=HhPbcMAMdAHGUip1yOma2Tl3sN0DN7B3Y0JVzYv6 virtualserver_port=9988 error id=0 msg=ok error id=0 msg=ok

Webinterface
You can use a graphical user interface and can do some until all commands by clicking (without knowing the ServerQuery commands). The Webinterface is running the ServerQuery commands in background.

7 Likes

so uhm, I try connecting to the server query with putty on windows and telnet on linux(the same vps that the server is hosted on) and it said “Connection refused” on both. I also tried YaTQA and that didn’t work, I don’t know what to do so someone help, I know the username and password, I used serveradmin and my own account I made on it and nothing worked. Help, thx

Make sure you have the sufficient permissions for the query access.

If you are authorized for query access, take a look at the following tutorial.

1 Like

The port isn’t forwarded or your firewall/router blocks the connection or you used the wrong port to connect to the ServerQuery Interface.

  • Make sure your server uses the right port. Check server log 0 for current used port.
  • Open the right port for the right IP.
  • check your firewall/router settings.
1 Like