I normally would recommend to use the official sinusbot docker image, but unfortunately it is outdated and requires you to compile a newer python version inside the container to get it running and a lot of the packages are very outdated.
But because you are very lucky today, I went through the hassle to recompile python on the container and replace the existing python 3.7 with a much newer python 3.11.10 so it should be futureproof for a while. I also updated yt-dlp and all packages inside the container. The default admin password is generated on first start of the container, just check your logs or attach to the container so you can see it. Otherwise you always can run the container with the "OVERRIDE_PASSWORD" env set to the desired admin password.
You can pull the image and start the container by entering:
Bash:
"docker run -v scripts:/opt/sinusbot/scripts \
-v data:/opt/sinusbot/data attax/sinusbot:2024_09"
in your webserver terminal.
The bot listens on port 8087 for http traffic so i would strongly advise to put the container behind a reverse proxy (apache2, nginx, traefik, etc.) and enforce HSTS. You obviously need a SSL certificate, which you can either generate yourself or get from LetsEncrypt.
I would recommend to use the "nginx-proxy" and "nginx-proxy-acme" docker containers to automate the process.
In this case just add the following variables for the sinusbot container:
Bash:
VIRTUAL_HOST="bot.yourdomain.com"
LETSENCRYPTHOST="bot.yourdomain.com"
VIRTUAL_PORT="8087"
Here is a short example on how to run the container so it is accessible via bot.mydomain.com, the admin password set to "1234" and automatically deployed HTTPS with enforced HSTS via a free LetsEncrypt cert. After installing docker and all dependencies just run the following commands in the terminal. Make sure nothing else is running on port 80 or 443, otherwise you have just have to replace the ports in the first command with the disired ones (only change the first number, so if you want to use port 8080 instead of 80 it is "8080:80". Also dont forget to replace mydomain.com with you own domain.
IMPORTANT: I would strongly recommend to add an A record to your dns server with the host "*" poitnting to the ip of your server, otherwise it might come to issues.
Bash:
docker run --detach \
--name nginx-proxy \
--publish 80:80 \
--publish 443:443 \
--volume certs:/etc/nginx/certs \
--volume html:/usr/share/nginx/html \
--volume /var/run/docker.sock:/tmp/docker.sock:ro \
nginxproxy/nginx-proxy
Bash:
docker run --detach \
--name nginx-proxy-acme \
--volumes-from nginx-proxy \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
--volume acme:/etc/acme.sh \
--env "DEFAULT_EMAIL=[EMAIL][email protected][/EMAIL]" \
nginxproxy/acme-companion
Bash:
docker run -e VIRTUAL_HOST="bot.mydomain.com" \
-e LETSENCRYPT_HOST="bot.mydomain.com" \
-e VIRTUAL_PORT="8087" \
-e OVERRIDE_PASSWORD="1234" \
-v scripts:/opt/sinusbot/scripts \
-v data:/opt/sinusbot/data \
attax/sinusbot:2024_09
Feel free to ask any questions you might have.
Kind regards,
aTTaX420