Sign inSign up

ts3mb/ts3musicbot

By ts3mb

Updated over 1 year ago

[Offical] TS3MusicBot.net Docker Image - One Image endless Bots

Image
4

1M+

ts3mb/ts3musicbot repository overview

Jump to Changelog

Checked via Aquasoft Trivy Vulnerables


This README.md is created for the "nightly" Version. Some parameters are maybe missing in latest, beta and alpha. Updated: (see README image)

Table of Content

  1. Attention
  2. About
  3. Usage
  4. Parameters
  5. Ports
  6. Network
  7. Recommended Docker-Container / Tools
  8. Vulnerables
  9. Versions
  10. Latest Changes
  11. Support
  12. FAQ

1. ATTENTION 🡹

You need a Botlicense from https://ts3musicbot.net to use this container!


2. About 🡹

You ever wanted to play music on your teamspeak or discord server? Now you can!
TS3MusicBot is a unique feature for your teamspeak or discord server fully working on linux and windows.

Upload music files, manage folders, play all kind of music files, stream live internet radio stations, 
direct playback of youtube, soundcloud and more links.
The TS3MusicBot can be controlled with chat commands or with the build in webinterface.

Listen to music in groups while playing your favorite game. Let your friends listen to a youtube video you found.
A new experience to listen music live with others in the same channel.

3. Usage 🡹

Docker Create
docker create \
--name=TS3MB \
-p 8080:8080 \
-p 9000:9000 \
-e [email protected] \
-e PASSWORD_ADMIN=admin \
-e PASSWORD_USER=user \
-v [/path/to/bot_core]:/app/ts3mb_core \
-v [/path/to/bot_media]:/app/ts3mb_media \
-v [/path/to/shared/bot_temp]:/app/ts3mb_tmp \
-v /dev/shm:/dev/shm \
ts3mb/ts3musicbot
Docker Compose
version: '3.3'
services:
    ts3musicbot:
        ports:
            - '8080:8080'
            - '9000:9000'
        environment:
            - [email protected]
            - PASSWORD_ADMIN=admin
            - PASSWORD_USER=user
        volumes:
            - '[/path/to/bot_core]:/app/ts3mb_core'
            - '[/path/to/bot_media]:/app/ts3mb_media'
            - '[/path/to/shared/bot_temp]:/app/ts3mb_tmp'
            - '/dev/shm:/dev/shm'
        restart: always
        image: ts3mb/ts3musicbot

4. Parameters 🡹 (For more Settings contact support)

Required
-e [email protected] - This is your licensed account 
-v [/path/to/bot_core]:/app/ts3mb_core - Here the bot will be stored  (CAN'T be used by multiple containers)  
-v [/path/to/bot_media]:/app/ts3mb_media - Here is the music for the bot stored  (can be used by multiple containers)
-v [/path/to/shared/bot_temp]:/app/ts3mb_tmp - Here are shared librarys stored (USE THE SAME FOR ALL)
-v /dev/shm:/dev/shm - Give access to shared memory. Reduces memory consumtion for Browser and Player
Optional
*Botsettings
-e BETA=true - If you want to use the beta version of the bot set this ENV.
-e BIND_IP=23.45.278.90 - Bind query and webinterface to one ipaddress (remove env to disable it)
-e BIND_IP_WEBINTERFACE=23.45.278.90 - Bind only webinterface to one ipaddress (remove env to disable it)
-e CLP="" - additional command-line parameters (remove env to disable it)
-e CONFIG_NUMBER=1 - Only for private licence  [Values = 1, 2, 3, 4, 5 or 6] Define which config the bot load  (remove env to disable it)
-e CONNECT_OVER_PUBLIC_IP=23.45.278.90 - Connect-over-public-ip  (remove env to disable it)
-e DEMO_MODE=true - Disables the permissionsystem. Everyone can use admin chatcommands
-e DISBALE_YTDL=true - Disables the download-function of the bot
-e DISABLE_CLICKABLE_URLS_CHECK=true - Enable clickable urls for musicsearch in TS3 Chat
    -> force enables the clickable url feature and does not check if the webinterface port is open
-e ENABLE_CLICKABLE_URLS=true - Enable clickable urls for musicsearch in TS3 Chat
    -> ENABLE_CLICKABLE_URLS works only if external port and internal port for the container is the same or DISABLE_CLICKABLE_URLS_CHECK is set
-e EXAMPLE_FILES_MUSIC=/folder - if enabled bot will copy folder to ts3mb_media/music/examples folder [Limited to 100MB and 50 Files] (remove env to disable it)
-e EXAMPLE_FILES_RADIO=/folder - if enabled bot will copy folder to ts3mb_media/radio/examples folder [Limited to 100MB and 50 Files] (remove env to disable it)
-e EXAMPLE_FILES_PLAYLIST=/folder - if enabled bot will copy folder to ts3mb_media/playlist/examples folder [Limited to 100MB and 50 Files] (remove env to disable it)
-e EXAMPLE_FILES_FORCE=true - if enabled bot will cleanup the destination (one way synch)
[not supported yet] -e FORCE_CHANNEL=3 - forces the bot to stay in a specific channel (remove env to disable it)
-e FORCE_DISCORD_TXT_CHANNEL=3 - forces the bot to stay in a specific text channel in discord(remove env to disable it)
-e FORCE_DIRECT_MODE=true - disables the indirect playback mode
-e FORCE_USERNAME=Bot234 - forces the username for the bot (remove env to disable it)
[not supported yet] -e FORCE_WHISPER=true - forces the bot to activate whisper mode
-e HOSTERKEY=jhdzwjsh - Only for Hoster-API (remove env to disable it)
-e IDENTITY=ts3identity.ini- forces the bot to load this identity on startup (remove env to disable it)
-e KEEP_LOGIN=true - Disable automatic seed generation for login. This can break tools like Soundstream or Webstream
-e MAX_DISKSPACE=500 - How much space the bot should use for music, playlists and co? (remove env for infinite)
-e OTC=true - One Time Code that will be added to the password and to the Username (if username is forced)
    -> OTC can be readed from logs or from startcommand (in startcommand b64 encoded) 
-e PASSWORD_ADMIN=admin - The admin password of the webinterface (visible settings) 
-e PASSWORD_USER=user - The user password of the webinterface (hidden settings) 
	-> All passwords will be automatical base64 encoded and if ENV not set a password will be generated at startup.
	--> You can set your own base64 string. You need to add b64 infront of it. (e.g. PASSWORD_ADMIN='b64dGVzdA==' for dGVzdA==)
-e PORTABLE=true - Starts the bot in portable mode. Uses 10 times more disk space. Use only in case of bugs!
-e QUERY=true - run bot in query mode
-e SET_MUSIC_PERMISSIONS=true|force - try to set permissions for music library at startup
-e START_CHANNEL=3 - forces the bot to join a specific channel at startup (remove env to disable it)

**Healthcheck
-e HEALTHI_DEBUG=true - turn on the debug mode for the internal health script
-e DISABLE_HEALTHCHECK=true - Disables the healthcheck (internal & external)

**Webbrowser Feature
-e DISBALE_WEBBROWSER=true - disables the webbrowser
-e WEBBROWSER_MEMLIMIT=300 - sets a memory limit for the browser in MB (default 300) [ 0 = unlimited]
-e WEBBROWSER_CPULIMIT=80 - sets a cpu limit for the browser in % (default 80) [ 0 = unlimited | can be higher than 100]

**MaxLifeTime Feature
-e MAX_LIFETIME=300 - stops the bot container after x seconds (remove env to disable it)
-e MAX_LIFETIME_BLOCK=true - prevent bot container from restarting, if it's maximal lifetime is reached - reset by recreate container 
-e MAX_LIFETIME_WEBSTART=true - starts countdown on first login
-e MAX_LIFETIME_COMMANDSTART=true - starts countdown on first command

**Bridge/Hub Feature
-e FORCE_BRIDGE_MODE=true - force enables the bridge mode for the bot
-e FORCE_BRIDGE_TOKEN=true - forces the bot to use the given token
-e FORCE_HUB_MODE=true - force enable the hub mode for the bot

**Ports
-e PORT=8080 - Webinterface port (Standard 8080) 
-e STREAMPORT=9000 - Port for Soundstream (Standard 9000)

**Reset Feature
-e RESET_CORE=true - removes the systemfolder of the bot EVERY startup
-e RESET_MEDIA=true - removes the mediafolder of the bot EVERY startup [**Attention** - Deletes all music]
-e RESET_SETTINGS=true - the bot deletes the configuration at startup (-number affects which config will be deleted)

**Runtime Parameter
-e PUID=1000 - run as user with id 1000
-e PGID=1000 - run as user group with id 1000
-e TZ=Europe/Berlin - Timezone

5. Ports 🡹

  -p 8080 - Webinterface Port
  -p 9000 - Streaming Port

The Ports should not be identical between different bots of a private license. Otherwise you'll run into this problem:License expired or could not be checked 🡻


6. Network 🡹

Create a new network with "docker network create" and use this.

THE HOSTNETWORK (--net host) IS NOT SUPPORTED


We recommend the following Docker-Container / Tools to manage your Bot-Containers.

Clean up your mess with this original commands

https://docs.docker.com/config/pruning/

or as container: https://hub.docker.com/r/liske/docker-prune

AutoHeal - Restart unhealthy containers - Restart bots with problem automatically
Monitor and restart unhealthy docker containers. 
This functionality was propose to be included with the addition of HEALTHCHECK, however didn't make the cut. 

https://hub.docker.com/r/willfarrell/autoheal

Watchtower - Updates your Bot-Containers automatically
A process for watching your Docker containers and automatically restarting them whenever their base image is refreshed.

https://hub.docker.com/r/containrrr/watchtower

Portainer - Easy Docker management
Portainer is a lightweight management UI which allows you to easily manage your Docker host or Swarm cluster.

https://hub.docker.com/r/portainer/portainer

Nginx-Proxy - Run your bots with subdomains
nginx-proxy sets up a container running nginx and docker-gen. 
docker-gen generates reverse proxy configs for nginx and reloads nginx when containers are started and stopped.

ATTENTION Please bind a custom config file to /etc/nginx/conf.d/my_proxy.conf with e.g.

-v /path/to/my_proxy.conf:/etc/nginx/conf.d/my_proxy.conf:r

and write inside this configfile

client_max_body_size 100M;

to prevent 413 Request Entity Too Large Errors

https://hub.docker.com/r/jwilder/nginx-proxy

Lets-Encrypt - in combination with Nginx-Proxy you can use https
letsencrypt-nginx-proxy-companion is a lightweight companion container for nginx-proxy.
It handles the automated creation, renewal and use of Let's Encrypt certificates for proxyed Docker containers.

https://hub.docker.com/r/jrcs/letsencrypt-nginx-proxy-companion

Driver local-persist
This driver let create you volumes with defined path

https://github.com/CWSpear/local-persist


8. Vulnerables 🡹

The reports are inside the image in the folder "out/" of the working directory.

  • report-[digest].html: Report with all Vulnerables (including unfixed)

  • report_no-unfixed_clean-version_[digest].html: Report only with fixed vulnerables

9. Versions 🡹

  • [latest]: is the latest stable version

  • [beta]: version for testing

  • [alpha]: version for testing

  • [nightly]: this Update is very unstable and untested - can break every time at every moments - use only if instructed by support

  • [*-hub_only]: smaller image that has only dependencies for hub mode. Bot will be forced to start in Hub Mode

  • [testing-*]: trying new stuff- use only if instructed by support

  • [version-*]: all versions inclusive nightly - don't use if you don't know what to do


10. Latest Changes 🡹

Normal

Version 0.7.0 [nightly][alpha][beta][latest]
  • e upgrade to bookworm
Version 0.6.3
  • + added new packages for new TS-Client
  • e update packages
Version 0.6.2
  • f expose port 8080 instead of 80
  • f fix forced stop with missing account credentials
  • - remove reporting to dropbox
Version 0.6.1
  • + expose ports
Version 0.6.0
  • + added FORCE_BRIDGE_MODE
  • + added FORCE_BRIDGE_TOKEN
  • + added FORCE_HUB_MODE
  • + added HUB-ONLY Image
  • + added SET_MUSIC_PERMISSIONS
  • e increased waiting time for shutdown from 2 to 5
  • e updated python to 3.9
  • e updated debian to bullseye
Version 0.5.0
  • + added DEMO_MODE
  • + added HEALTHI_DEBUG
  • + added FORCE_DISCORD_TXT_CHANNEL
  • + added Aquasoft Trivy with open reports for vulnerables
  • + fast internal healthcheck (restarts the bot even at shutdown)
  • e change image link on update page of bot
  • e added better RESET_SETTINGS
  • e added support in Healthcheck for Bridge/Hub-Mode
  • e New improved console log
  • e changed buildprocess for containerimages
  • f fixed a problem with the permissions on ts3mb_media folder for new bots
  • f fixed a problem with language management inside container
  • - removed legacy RESET_SETTINGS completely
  • - removed check for old ENV completely
  • - removed Aquasoft Microscanner
Version 0.4.0
  • + added support for base64 passwords
  • + added DISABLE_CLICKABLE_URLS_CHECK
  • + added FORCE_WHISPER
  • + added FORCE_DIRECT_MODE
  • + added FORCE_CHANNEL
  • + added START_CHANNEL
  • + added IDENTITY
  • + added DISBALE_WEBBROWSER
  • + added WEBBROWSER_MEMLIMIT
  • + added WEBBROWSER_CPULIMIT
  • + added MAX_LIFETIME_COMMANDSTART
  • + added EXAMPLE_FILES_MUSIC
  • + added EXAMPLE_FILES_RADIO
  • + added EXAMPLE_FILES_PLAYLIST
  • + added EXAMPLE_FILES_FORCE
  • + added rsync package
  • e all passwords will be base64 encoded
  • e if no password ENV is set a new password will be generated at every startup
  • e increased internal shared memory
  • f MAX_LIFETIME_BLOCK works now as expected
Version 0.3.5
  • f fixed "clibs.tar failed to decompress" at first run
Version 0.3.4
  • + Added dependencies for upcomming features
  • e change chmod and chown directories
Version 0.3.3
  • + Added option for starting the bot in portable mode
  • + Reset Settings now fully supported
  • e The OTC (One Time Code) is begins now with - and not with +
  • e Maxlife Script now waits on Reset Settings Script
  • e Maxlife Script and Reset Settings Script waiting for the complete startup of the bot
  • e Better console output for script messages
Version 0.3.2
  • + block start, if old ENV are used
Version 0.3.1
  • + Added DISABLE_HEALTHCHECK
  • + Added OTC
Version 0.3.0
  • e Upgrade from Debian Stretch to Debian Buster
  • e changed configuration variables for better usage
Version 0.2.3 [latest]
  • f added dep for TS3 Client 3.3.0
Version 0.2.2
  • + added keeplogin & enclickableurls env
Version 0.2.1
  • + added webif-bind-ip env
  • f fixed EOF error
  • f fixed parameter problem
Version 0.2.0
  • e Volumepaths changed from /ts3mb to /app/ts3mb
  • e Standardport changed from 80 to 8080
  • e Bot runs as non-root
  • + Streamingport support.
  • + Timezone settings
  • + Image verification
  • + Timer for maximal lifetime of the bot
  • much more
Version 0.1.2 (deleted for security reasons)
  • + added env for streamingport

Now you can bind the port for the Soundstream tool to a single port. default: 9000

  • e healthcheck incl botupdate

Healthcheck marks container now unhealthy if bot has an update. Healtcheck will be paused, if bot runs an update.

  • e change healthcheck timing

new timing: 3 retries, 15s starttime, check every 20s, timeout 15s

Version 0.1.1 (deleted for security reasons)
  • e add new healthcheck

Marks container as unhealthy if webinterface is offline or botstate is negative

  • e change healthcheck timing

new timing: 3 retries, 15s starttime, check every 60s, timeout 30s

Version 0.1.0 (deleted for security reasons)
  • + first release

Testing

nothing here atm


11. SUPPORT 🡹

Supported Tags:

  • [latest]
  • [alpha]
  • [beta]

LiveSupport Website E-Mail


12. FAQ 🡹

Why is this image so big?

This image runs the bot in non-portable mode. This means the image is bigger because it includes all libraries, but the software each bot needs to download is much smaller. You safe space from the second bot. The first bot needs about 1024MB space, the next bots only 45-70MB per bot.

I'm getting 413 Request Entity Too Large

Go to Nginx-Proxy🡹 and look at the Attention section.

[PRIVATE LICENSE] License expired or could not be checked. Please check the internet connection and make sure that the license is active

If you run multiple Bots via private license, then change the environment variable PORT to another value (e.g. 8080 -> 8081 ) and edit your -p command (e.g. -p 8080:8081) The license check thinks the bot is startet multiple times on the same port.

Tag summary

Content type

Image

Digest

sha256:5a3313687

Size

326.6 MB

Last updated

over 1 year ago

docker pull ts3mb/ts3musicbot