Pangolin Discord Bot
5.6K
A comprehensive Discord bot for remotely monitoring and controlling Docker containers on your VPS server, with specialized support for the Pangolin stack (including Traefik, CrowdSec, and other microservices).
This Discord bot provides a seamless interface to monitor your server's health, manage Docker containers, handle security via CrowdSec, and perform system operations—all through Discord slash commands. It's particularly tailored for the Pangolin self-hosting stack but works with any Docker deployment.
The bot is built with Node.js and uses:
services:
server-bot:
container_name: server-bot
image: hhftechnology/pangolin-discord-bot:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./backups:/app/backups
- /proc:/host/proc:ro # Read-only access to proc filesystem
- /sys:/host/sys:ro # Read-only access to sys filesystem
- /root:/root # Mount the Pangolin root directory. all pangolin files have to be here other wise backup and restore function will not work
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
environment:
- DISCORD_TOKEN=${DISCORD_TOKEN} #Bot Token
- DISCORD_CLIENT_ID=${DISCORD_CLIENT_ID} #Application ID
- DISCORD_GUILD_ID=${DISCORD_GUILD_ID} #Disocrd Guiild ID
- BACKUP_DIR=/app/backups
- HOST_PROC=/host/proc # Point to the mounted proc directory
- HOST_SYS=/host/sys # Point to the mounted sys directory
- TZ=${TZ}
restart: unless-stopped
docker compose up -d
.env fileThe bot supports automatic restarting of unhealthy containers. Configure containers for auto-restart with:
/autorestart enable container:container_name max_attempts:3
/dockercreate - Create a new Docker container/dockerinfo - Show Docker host information/dockerimages - List all Docker images/dockerpull - Pull a Docker image/dockerremove - Remove a Docker container/dockerremoveimage - Remove a Docker image/dockershow - Show detailed container information/dockerlogs - View logs from any containers/startcontainer - Start a stopped container/stopcontainer - Stop a running container/restartcontainer - Restart a container/pangolinstatus - Check overall Pangolin stack status/stackhealth - Detailed health check of all components/backup - Create a backup of your configuration/restorebackup - Restore from a previous backup/crowdsecalerts - Manage security alerts/crowdsecbouncers - Manage enforcement agents/crowdseccollections - Manage collections of scenarios/crowdsecconfig - Configure CrowdSec/crowdsecdecisions - Manage security decisions (bans, captchas)/crowdsechelp - Show help for CrowdSec commands/crowdsecmachines - Manage CrowdSec machines/crowdsecmetrics - View security metrics/crowdsecparsers - Manage log parsers/crowdsecrestart - Restart CrowdSec service/crowdsecscenarios - Manage detection scenarios/crowdsecstatus - Show CrowdSec security status/crowdsecwhitelist - Manage IP whitelists/vpsload - Check CPU, memory, and disk usage/vpsbandwidth - Monitor network usage/ping - Check if the bot is running/allcontainers - List all containers with statusThe bot includes a health monitoring system that can:
Configure auto-healing with the /autorestart command to keep your services running smoothly.
The bot offers comprehensive control over CrowdSec security including:
Use the /crowdsechelp command to see all available security commands.
For issues, questions, or contributions, please open an issue on por forums https://forum.hhf.technology/t/pangolin-discord-bot-to-manage-the-stack/.
Built with ❤️ by HHF Technology for Pangolin self-hosters
Content type
Image
Digest
sha256:a2ed88723…
Size
80.4 MB
Last updated
about 1 year ago
docker pull hhftechnology/pangolin-discord-bot