Here is a guide to install TeamSpeak port into Jail.
For update process see the bottom of this guide
//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
teamspeak_enable="YES"
#From FreeNAS HOST system (not from jail!), replace with proper path and port
#From TS Jail again
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.
#From FreeNAS HOST system (not from jail!)
#From TS Jail again
DONE!
UPDATE of TeamSpeak with preserving the configuration
In case you're still on FreeNAS 11.3.x override the unsupported FreeBSD version (because FreeBSD 11.3 is out of life)
For update process see the bottom of this guide
- (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
jls
jexec # tcsh
- (Optional) Manually create teamspeak group and user with matching UID and GID as created in FreeNAS GUI
pw groupadd teamspeak -g 1054
adduser
- enable/update package management
pkg update
pkg upgrade
portsnap fetch
portsnap extract
portsnap fetch update
- In case you're still on FreeNAS 11.3.x override the unsupported FreeBSD version (because FreeBSD 11.3 is out of life)
setenv ALLOW_UNSUPPORTED_SYSTEM yes
- Install teamspeak as Port (alternatively as pre-compiled Package - Details: Details about differences )
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
teamspeak_enable="YES"
- 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;
quit
#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';
quit
#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.
DONE!
UPDATE of TeamSpeak with preserving the configuration
In case you're still on FreeNAS 11.3.x override the unsupported FreeBSD version (because FreeBSD 11.3 is out of life)
setenv ALLOW_UNSUPPORTED_SYSTEM yes
Code:
pkg update pkg upgrade portsnap fetch portsnap fetch update portsnap extract cd /usr/ports/audio/teamspeak3-server/ make reinstall service teamspeak start