Hint: You can use the Tab key to autocomplete all filenames and directories, so you don't have to type in the complete file or directory name manually.
Note: If you want to install the music bot for a TeamSpeak 3 server and you don't have your own TeamSpeak 3 server yet, you can also have a look at my tutorial on how to install a TeamSpeak 3 server on Linux.
This tutorial was last checked and updated on July 5, 2020.
- If you havn't already done so, download the program "PuTTY".
- Connect to your root server or VPS/vServer via SSH using PuTTY. To do this, open PuTTY and enter the domain or IP address of your server in the text box named "Host Name (or IP address)". Then click the "OK" button below.
- Update your package lists with the command
- Now install any available updates of the packages already installed on your server using the command
apt upgrade -y.
- Next, install the packages needed for the music bot by executing the following command:
apt install x11vnc xvfb libxcursor1 ca-certificates bzip2 libnss3 libegl1-mesa x11-xkb-utils libasound2 libpci3 libxslt1.1 libxkbcommon0 libxss1 libglib2.0-0 libxcomposite1 curl screen nano -y.
- Optional (if you want to use the YouTube playback feature):
- Install the packages needed for the YouTube playback feature using the command
apt install python -y.
- Download the software package for the YouTube download function ("youtube-dl"). This software will be used from the music bot to play the audio of any YouTube video. To do this, execute the command
wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl.
- After that run the command
chmod +x /usr/local/bin/youtube-dlto assign the required execution permissions.
- Install the packages needed for the YouTube playback feature using the command
- Then add a user with the username "sinusbot" who will run the music bot. Use the following command:
adduser --disabled-login sinusbot.
- You can skip all further information such as the name, telephone number, etc. by pressing enter as well.
- Now create the directory in which the music bot will be installed by executing this command:
mkdir -p /opt/sinusbotand use the command
chown -R sinusbot:sinusbot /opt/sinusbot/to give the music bot user the required permissions for this directory.
- After that use the command
su sinusbotto switch to your music bot user.
- Run the command
cd /opt/sinusbot/to get to the directory where the music bot will be installed
- Now download the music bot called "SinusBot" by running the following command:
- After the download is completed, you should see the downloaded .tar.bz2 archive using the command
ls. Extract the archive you just downloaded by executing the command
tar xjf sinusbot.current.tar.bz2. Then you can delete it using the command
- Then copy the configuration file using the following command:
cp config.ini.dist config.ini
- Now you need the TeamSpeak 3 Client for Linux, so that the music bot can connect to your TeamSpeak 3 server. Even if you only want to use the music bot in conjunction with a Discord server, you'll need to download the TeamSpeak 3 client, otherwise the music bot won't start. Download this client with the following command:
- Use the command
chmod +x TeamSpeak3-Client-linux_amd64-3.5.3.runto assign the required execution permissions to this file.
- Now you need to start the TeamSpeak 3 client on your server once in order to accept the license terms. To do this, run the command
./TeamSpeak3-Client-linux_amd64-3.5.3.run. Use the enter key to scroll through the text. By pressing the "Q" key you'll jump to the end of this file. Confirm that you have read and accepted the license terms by pressing the "Y" key and then hit enter.
- Optional (if you want to use the YouTube playback feature): Open the configuration file with the command
nano config.iniand add the parameter "YoutubeDLPath" in a new line. Enter the path to the YouTube download software as the value for this parameter (in the same format as the existing parameters/lines). This path is "/usr/local/bin/youtube-dl". Save your changes by pressing CTRL + X, then hit the "Y" key and press enter.
- Next, delete the file "libqxcb-glx-integration.so" using the command
- Then create the plugin directory for the TeamSpeak 3 client with the command
mkdir TeamSpeak3-Client-linux_amd64/pluginsand copy the music bot plugin into this directory. To do this, use this command:
cp plugin/libsoundbot_plugin.so /opt/sinusbot/TeamSpeak3-Client-linux_amd64/plugins/.
- Now you have to assign the required permissions, so that you can run the music bot script. Do that with the command
chmod +x sinusbot.
- The music bot is now installed and you can start it. Make sure that you are logged in with the music bot user you created earlier and that you are in the music bot directory. If this is not the case, you can use the command
su sinusbotto switch to this user and then run the command
cd /opt/sinusbot/to go to your music bot directory. Execute the following command for the first start of the music bot:
screen -dmS sinusbot ./sinusbot -override-password YourPassword. Instead of "YourPassword" you need to specify a password for the web interface.
- Your music bot is now running. You can access the web interface with the IP address or domain of your root server or VPS/vServer and the port 8087. For example, open "http://22.214.171.124:8087" in your web browser. The username is "admin" and the password is what you just set within the start command.
- Because this password is just temporarily set at the first start (using the command from step 22), you must now change it permanently within the settings in the web interface. To do this, click on "Settings" in the web interface's top menu and then click on "User Accounts" on the left. A user overview table now appears. Click on the edit button next to the admin user and set your desired password. Finally save this change by clicking on the "Save changes" button. Then you have to log in again with the password you just set.
- If you want to use the music bot on a Discord server, also follow these steps:
- Click on "Instances" within the settings menu of the web interface (on the left) and add another music bot instance using the "Add Instance" button.
- Now select "Discord" as "Backend" and set a name for the music bot.
- Click the red marked word/link "here" below the last text box to get to the overview page of your Discord apps. Here you have to register the music bot as a Discord app by clicking on "New Application".
- Specify a name for your music bot, which will later be displayed on the Discord server (e.g. "SinusBot").
- Then create your Discord app by clicking the "Create" button.
- Now click on the menu item "Bot" on the left, then click on the button called "Add Bot", then click on "Yes, do it!".
- Next, click on the "Copy" button under the headline "Token" to copy the token for your music bot. Paste this token into the text box called "Bot-Token" in the music bot web interface. After you've done this, click on "Create".
- In the instance overview, select the newly created Discord instance by clicking on the corresponding "Select" button.
- Now go to the "Instance Settings" within the web interface settings (on the left).
- Click on the red link named "Click here to allow the bot to join your server", then select your Discord server and click on the "Authorize" button to connect the music bot with your Discord server.
- Start the music bot instance by clicking on the power button in the top menu of the web interface. Now the music bot should join your Discord server.
- Reload the web interface settings page in your browser, select your Discord channel under "Default Channel" and save your changes by clicking on "Save changes". The music bot should now join the selected Discord channel and is ready to use.
- In order to be able to control the music bot via chat commands (in addition to the web interface), you must link the users of your TeamSpeak 3 server or Discord server with the corresponding web interface users. To do this, click on "User Accounts" in the web interface settings (on the left).
- Currently there is only the user "admin", but you can add more users by clicking on "Add User Account".
- You can associate a user with a TeamSpeak or Discord user by clicking the Edit button on the right. Here you can select the user on your server under "Bind to another identity". Then you have to click on the "Save changes" button. In the user table you can click on the buttons in the column named "Privileges" to select which actions a specific user is allowed to perform.
- To see all available chat commands, click on "Info" in the web interface settings on the left and then click the "Commands" tab.
- Your music bot is now running continuously in the background, so you can close PuTTY without causing the bot to stop. To stop the music bot, use the command
screen -r sinusbot -X quit. You can start it at any time. Just log in to your root server or VPS/vServer as the music bot user (either directly at the SSH login in PuTTY or with the command
su sinusbot). Then go to the music bot directory (using the command
cd /opt/sinusbot/) and run the command
screen -dmS sinusbot ./sinusbot.