- Nov 2, 2015
- 997
- 723
- 161
*Tutorial restored from by browser cache*
For 0.9.8 (sinusbot), video tutorial made by @Joxiii :
https://r4p3.net/threads/have-more-...h-docker-containers-on-ubuntu.1080/#post-8692
Hello R4P3 community,
Today i'll be explaining you guys how to run more than 6 instances with the ts3soundboard. Please note that this setup is not optimal, because you will have several admin panels (eg.http://yourip:8087, http://yourip:8088, http://yourip:8089, etc). A crack would be way better. I recommend using the old ts3bot version (0.9.5) as the creator doesn't seem to be limiting the number of instances by ip and don't know if he'll actually do it in the newest versions cause let's be honest here, he only wants your money. In this tutorial, I'll be referring to "ts3bot" and "sinusbot", the ts3bot version being the one with maximum 6 instances (0.9.5) and sinusbot version being the one with maximum 2 instances (0.9.8+). I'm not sure if i'll be releasing the script for 0.9.8.
We will be running all those bots on 1 VPS with docker containers. Experienced users only. Make sure you have enough ram and processing power. I won't be explaining how to install docker on your distribution, just check to those link here :
What is a docker?
How to install docker
I am assuming that you correctly installed docker and that your permissions are correctly assigned to your user.
YOU NEED TO HAVE A KERNEL OF VERSION 3.10+! DOCKER WILL NOT WORK OTHERWISE!
examples:
2.6.32-42-pve WILL NOT WORK!
3.19.0-33-generic WILL WORK!
I also recommend installing shipyard as this will give you a webinterface to manage your docker containers and easily deploy your docker image.
Credits for my docker scripts goes to a guy called jtanderson. Those scripts have been modified to fit my needs, as the original script didn't support youtube-dl and needed it to download from youtube.
You need to create a user, add him to the docker group.:
Then change to this user:
1- Create a folder called "mydockerscript"
2- Go inside that folder. Create a file called "dockerfile" and paste this script inside of it:
3 - Create a script file called "run.sh" and paste this inside of it:
Make it executable :
4- We build the image
pathofmydockerscriptfolder being the path of your "mydockerscript" folder created in step 1. You should also already be in that folder, so you can get the path by doing "pwd".
5- Run the first docker container from the image we just created ("ts3soundboard095")
You will now be able to access your first ts3soundboard panel by going to http://yourip:8087
6- Run more docker containers from our "ts3soundboard095" image.
You will now be able to access your second ts3soundboard panel by going to http://yourip:8088
Change 8088 to 8089 if you want a third container running... Also change the name of the container to bot3. And so on...
For 0.9.8 (sinusbot), video tutorial made by @Joxiii :
https://r4p3.net/threads/have-more-...h-docker-containers-on-ubuntu.1080/#post-8692
Hello R4P3 community,
Today i'll be explaining you guys how to run more than 6 instances with the ts3soundboard. Please note that this setup is not optimal, because you will have several admin panels (eg.http://yourip:8087, http://yourip:8088, http://yourip:8089, etc). A crack would be way better. I recommend using the old ts3bot version (0.9.5) as the creator doesn't seem to be limiting the number of instances by ip and don't know if he'll actually do it in the newest versions cause let's be honest here, he only wants your money. In this tutorial, I'll be referring to "ts3bot" and "sinusbot", the ts3bot version being the one with maximum 6 instances (0.9.5) and sinusbot version being the one with maximum 2 instances (0.9.8+). I'm not sure if i'll be releasing the script for 0.9.8.
We will be running all those bots on 1 VPS with docker containers. Experienced users only. Make sure you have enough ram and processing power. I won't be explaining how to install docker on your distribution, just check to those link here :
What is a docker?
How to install docker
I am assuming that you correctly installed docker and that your permissions are correctly assigned to your user.
YOU NEED TO HAVE A KERNEL OF VERSION 3.10+! DOCKER WILL NOT WORK OTHERWISE!
Code:
uname -r
examples:
2.6.32-42-pve WILL NOT WORK!
3.19.0-33-generic WILL WORK!
I also recommend installing shipyard as this will give you a webinterface to manage your docker containers and easily deploy your docker image.
Credits for my docker scripts goes to a guy called jtanderson. Those scripts have been modified to fit my needs, as the original script didn't support youtube-dl and needed it to download from youtube.
You need to create a user, add him to the docker group.:
Code:
adduser tsbot
sudo usermod -aG docker tsbot
Then change to this user:
Code:
su tsbot
1- Create a folder called "mydockerscript"
Code:
mkdir mydockerscript
2- Go inside that folder. Create a file called "dockerfile" and paste this script inside of it:
TESTED ON UBUNTU.
Code:
FROM ubuntu
#VOLUME ["/tsmusic"]
ENV TSBOT_URL https://frie.se/ts3bot/ts3soundboardbot-0.9.5.tar.bz2
ENV TEAMSPEAK_URL http://dl.4players.de/ts/releases/3.0.18.2/TeamSpeak3-Client-linux_amd64-3.0.18.2.run
# Download TS3 file and extract it into /opt.
ADD ${TSBOT_URL} /opt/
RUN cd /opt && tar -xf /opt/ts3soundboardbot*.tar.bz2
ADD ${TEAMSPEAK_URL} /opt/ts3soundboard/
RUN cd /opt/ts3soundboard && chmod 0755 TeamSpeak3-Client-linux_amd64-3.0.18.2.run
RUN sed -i 's/^MS_PrintLicense$//' /opt/ts3soundboard/TeamSpeak3-Client-linux_amd64-3.0.18.2.run
RUN cd /opt/ts3soundboard && ./TeamSpeak3-Client-linux_amd64-3.0.18.2.run
# Install prerequisites
RUN apt-get -y update && apt-get -y upgrade
RUN apt-get -y install x11vnc xinit xvfb libxcursor1 libglib2.0-0 xorg openbox wget
RUN wget -O "/usr/local/bin/youtube-dl" "https://yt-dl.org/downloads/latest/youtube-dl" && \
chmod a+rx "/usr/local/bin/youtube-dl" && \
locale-gen --purge en_US.UTF-8 && \
echo LC_ALL=en_US.UTF-8 >> /etc/default/locale && \
echo LANG=en_US.UTF-8 >> /etc/default/locale && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
groupadd -g 3000 -r "ts3soundboard" && \
useradd -u 3000 -r -g "ts3soundboard" -d "/opt/ts3soundboard" "ts3soundboard"
# Copy the plugin into the client and update the bot
RUN cp /opt/ts3soundboard/libsoundbot_plugin.so /opt/ts3soundboard/TeamSpeak3-Client-linux_amd64/plugins
RUN chown -R ts3soundboard /opt/ts3soundboard && \
chmod 755 /opt/ts3soundboard/ts3bot
RUN /opt/ts3soundboard/ts3bot -update
# Add a startup script
ADD run.sh /run.sh
RUN chmod 755 /*.sh
EXPOSE 8087
CMD ["/run.sh"]
3 - Create a script file called "run.sh" and paste this inside of it:
#!/bin/bash
rm -rf /tmp/.X*
rm -f /tmp/TS3*
cd /opt/ts3soundboard
/usr/bin/xinit /opt/ts3soundboard/ts3bot -- /usr/bin/Xvfb :1 -screen 0 800x600x16 -ac
rm -rf /tmp/.X*
rm -f /tmp/TS3*
cd /opt/ts3soundboard
/usr/bin/xinit /opt/ts3soundboard/ts3bot -- /usr/bin/Xvfb :1 -screen 0 800x600x16 -ac
Make it executable :
Code:
chmod +x run.sh
4- We build the image
Code:
docker build -t ts3soundboard095 pathofmydockerscriptfolder
5- Run the first docker container from the image we just created ("ts3soundboard095")
Code:
docker run --restart=always -d --name bot1 -p 8087:8087 ts3soundboard095
6- Run more docker containers from our "ts3soundboard095" image.
Code:
docker run --restart=always -d --name bot2 -p 8088:8087 ts3soundboard095
Change 8088 to 8089 if you want a third container running... Also change the name of the container to bot3. And so on...
Code:
docker run --restart=always -d --name bot3 -p 8089:8087 ts3soundboard095
Last edited: