Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.
Installing TeamSpeak into Jail

Installing TeamSpeak into Jail

Here is a guide to install TeamSpeak port into Jail.
  • (Optional) Create teamspeak user and group in FreeNAS GUI. Disable the password and set the shell to /nologin and home directory to /nonexistent. This is only "mapping" user between host system and Jail.



  • Create new "Default (Clone Jail)" + configure network and VLAN as per your need.
  • Start the jail and connect to the Jail shell
jexec # tcsh

  • (Optional) Manually create transmission group and user with matching UID and GID as created in FreeNAS GUI
pw groupadd teamspeak -g 1054

Username: teamspeak
Full name: teamspeak
Uid (Leave empty for default): 1054
Login group [teamspeak]:
Login group is teamspeak. Invite teamspeak into other groups? []:
Login class [default]:
Shell (sh csh tcsh nologin) [sh]:
Home directory [/home/teamspeak]:
Home directory permissions (Leave empty for default):
Use password-based authentication? [yes]: no
Lock out the account after creation? [no]:
Username : teamspeak
Password : <disabled>
Full Name : teamspeak
Uid : 1054
Class :
Groups : teamspeak
Home : /home/teamspeak
Home Mode :
Shell : /bin/sh
Locked : no
OK? (yes/no): yes
adduser: INFO: Successfully added (teamspeak) to the user database.
Add another user? (yes/no): no
  • enable/update package management
pkg update
pkg upgrade
portsnap fetch
portsnap extract
portsnap fetch update

cd /usr/ports/audio/teamspeak3-server/
make install clean

//There will be few compile-selection prompts. Un-Tick any "Examples", "Documentation" and "Manuals" as they're not necessary. Leave the rest.
//Compile for each of dependent package will take a while
  • vi /etc/rc.conf and add following lines
# Enable TeamSpeak

  • Start teamspeak in order to init DB and environment + generate privilege key
service teamspeak start
  • Get the generated token from init logs.
cat /var/log/teamspeak/ts3server*


  • Connect to TS and enter the token to pop-up window. Your user will be granted with Server-Admin privileges

  • (optional) Change listening port of TS server
service teamspeak stop
#From FreeNAS HOST system (not from jail!), replace with proper path and port
cd /mnt/<poolname>/iocage/jails/<teamspeak_jail_name>/root/var/db/teamspeak
sqlite3 ts3server.sqlitedb
update servers set server_port=##### where server_id=1;

#From TS Jail again
service teamspeak start

Grant ServerQuery group to client
// Note that this is not officially supported anymore for security reasons (the old "tokenadd tokentype=0 tokenid1=2 tokenid2=0" will NOT work). Following "hack" is required.
  • Connect to TS server as user with ServerAdmin rights and select Permissions -> Privilege Keys

  • Click "Create" and select "Type: Server Group" , "Group: Admin" and "Description: SQ"
  • Click "Create" and COPY the generated key somewhere. It will be required later on

  • Change associated group of the token
service teamspeak stop
#From FreeNAS HOST system (not from jail!)
cd /mnt/<poolname>/iocage/jails/<teamspeak_jail_name>/root/var/db/teamspeak
sqlite3 ts3server.sqlitedb
update tokens set token_id1=2 where token_description='SQ';

#From TS Jail again
service teamspeak start
  • Connect to TS server again and select Permissions -> Use Privilege Key
  • Use the key previously generated and confirm
  • User gets ServerQuery permission

  • Now select Tools -> ServerQuery Login

  • Select different (!!) username than the one you're using for TS connection otherwise it will be in conflict.
  • Confirm and you will get generated password - save these.

  • You can use YaTQA GUI for ServerQuery. Use the Login and generated password in the red-boxes bellow.
  • If you've changed the default TS server port to something else fill the "Port (optional)" field as well.

  • To change the ServerQuery listening port
service teamspeak stop
echo "query_port=11111" >> /usr/local/etc/teamspeak/ts3server.ini
service teamspeak start

  • In order to use non-standard ServerQuery port in YaTQA it has to be allowed in Settings. Then enter proper port number to "Query port" field.

First release
Last update
0.00 star(s) 0 ratings