Installing TS3 musicbot on Arch Linux

Installing TS3 musicbot on Arch Linux – SINUSBOT

The voice communication is one of the most important thing during social activities. Gamers very often use TeamSpeak 3 to communicate to each other. In this article I will show you how to install musicbot to TeamSprak3, which can help you to spend some boring time listennig to music or radio or youtube. For this purpose we will use sinusbot

Installation

At first we need to install some packages we will need


$ sudo pacman -S libev x11vnc xorg-xinit xorg-server-xvfb libxcursor teamspeak3 youtube-dl screen

for security reason  we create new user:

$ sudo useradd -d /opt/ts3musicbot -m -s /bin/false musicbot

switch to home directory and to musicbot user

$

sudo -u musicbot -s
$
cd /opt/ts3musicbot

Now download and unpack musicbot

$ wget https://www.sinusbot.com/pre/sinusbot-0.9.9-8f70ff3.tar.bz2
$ tar -xjvf sinusbot-0.9.9-8f70ff3.tar.bz2

copy the configuration file

cp config.ini.dist config.ini

and change the path to your teamspeak3 client and youtube-dl

$ nano ./config.ini

this should be like this file:

TS3Path = "/opt/teamspeak3/ts3client_linux_amd64"       //change
ListenHost = "0.0.0.0"
DataDir = ""
YoutubeDLPath = "/usr/bin/youtube-dl"                   //change
ListenPort = 8087                                       //web-admin port 
LocalPlayback = false
EnableLocalFS = false
MaxBulkOperations = 300
LogLevel = 3
EnableProfiler = false
EnableDebugConsole = false
UploadLimit = 83886080
RunAsUser = 0
RunAsGroup = 0
InstanceActionLimit = 6
UseSSL = false
SSLKeyFile = ""
SSLCertFile = ""
Hostname = "

now  copy the plugin to the plugins directory of the TeamSpeak installation

# cp /opt/ts3musicbot/plugin/libsoundbot_plugin.so /opt/teamspeak3/plugins

and make sinusbot executable:

$ chmod 755 /opt/ts3musicbot/sinusbot

Runnig musicbot

There are two possibilities how to run this bot.

1.Manually

To do it just run (you are still as user musicbot at /opt/ts3musicbot) sinusbot using screen

$ screen -AmdS musicbot ./sinusbot

To stop

$ screen -x musicbot
Ctrl+C

2. Systemd

The second choice is using systemd service.
Create a systemd unit file:

# nano /etc/systemd/system/ts3musicbot.service
[Unit]
Description=Musicbot for teamspeak3 server
After=network.target

[Service]
User=musicbot
Group=musicbot
ExecStart=/opt/ts3musicbot/sinusbot

[Install]
WantedBy=multi-user.target

And now run the musicbot:

# systemctl start musicbot

check the status:

# systemctl status musicbot

stop the musicbot:

# systemctl stop musicbot

enable musicbot at system startup:

# systemctl enable musicbot

 

Musicbot administration

Administration of musicbot is done via web browser. Point to your server using port 8087 (see the config.ini above)

http://ip_of_musicbot:8087

if you installed it at localhost

http://localhost:8087

the default user         : admin
the default password: foobar

Change the password after your first login

 

Installing TS3 musicbot on Arch Linux- login1
Musicbot – login screen
Installing TS3 musicbot on Arch Linux - settings2
Musicbot – settings

Via webinterface you can manage all settings, upload music files, manage users and their permissions. All is well commented.

 

The musicbot can be controlled by user via teamspeak chat. Some useful commands:

Installing TS3 musicbot on Arch Linux - commands1
Sinusbot – teamspeak chat commands
Installing TS3 musicbot on Arch Linux - commands2
Sinusbot – teamspeak chat commands

Conclusion

In this short tutorial we installed musicbot  for teamspeak3 – sinusbot – and made basic configuration. Next steps is up to you to customize and use it according your needs. If you are behind firewall do not forget to allow port 8087.

Happy listening

References

Sinusbot official page
TeamSpeak ArchWiki
Sinusbot FAQ