A web-based management interface for CrowdSec security stack with Pangolin integration. This project provides a modern, user-friendly web UI built with Go and React for managing your CrowdSec security infrastructure.
⚠️ BETA SOFTWARE WARNING⚠️ This software is currently in BETA and should be used with caution.
- Always deploy and test on a non-production/test machine first
- Do not use in production environments until thoroughly tested
- Backup your existing configuration before deployment
- Report issues and bugs to help improve the software
While we strive for stability, beta software may contain bugs, incomplete features, or unexpected behavior. Use at your own risk..
- Features
- Prerequisites
- Installation
- Configuration
- Docker Compose Setup
- Environment Variables
- Volume Mappings
- Network Configuration
- Usage
- API Documentation
- Development
- Troubleshooting
- Contributing
- License
- System Health Monitoring - Real-time container status and diagnostics
- IP Management - Block, unban, and monitor IP addresses
- Whitelist Management - Comprehensive IP and CIDR whitelisting for CrowdSec and Traefik
- Decision Management - View and manage CrowdSec security decisions
- Bouncer Management - Monitor CrowdSec bouncers and their status
- Modular Architecture - Run with or without optional components (Pangolin, Gerbil)
- Custom Scenarios - Deploy custom CrowdSec detection scenarios
- Captcha Protection - Configure Cloudflare Turnstile captcha integration
- Traefik Integration - Seamless CrowdSec-Traefik middleware configuration
- Console Enrollment - Easy CrowdSec Console integration
- Real-time Log Streaming - WebSocket-based live log viewing
- Advanced Log Analysis - Analyze Traefik logs with statistics
- Prometheus Metrics - View CrowdSec metrics
- Multi-service Logs - View logs from all services (CrowdSec, Traefik, Pangolin, Gerbil)
- Automated Backups - Create full system backups
- Scheduled Backups - Configure cron jobs for automatic backups
- Easy Restoration - Restore from any backup with confirmation
- Retention Management - Automatic cleanup of old backups
- Version Management - Update Docker images with custom tags
- Graceful Updates - Safe updates with automatic rollback on failure
- Flexible Configuration - Update with or without CrowdSec
Before deploying CrowdSec Manager, ensure you have:
- Docker 20.10+ installed and running
- Docker Compose 2.0+ installed
- Network access to pull Docker images
- Sufficient disk space (minimum 2GB recommended)
- Test environment for initial deployment (see Beta Warning above)
- CPU: 1 core minimum, 2+ cores recommended
- RAM: 512MB minimum, 1GB+ recommended
- Disk: 2GB minimum for application and logs
- Network: Internet access for Docker image pulls
- Set up a test server or VM
- Install Docker and Docker Compose
- Ensure you have backups of any existing configurations
# Create configuration directory
sudo mkdir -p /root/config
sudo mkdir -p /root/config/traefik/logs
# Create backup directory (in your project directory)
mkdir -p ./backups
# Create data directory (in your project directory)
mkdir -p ./dataCreate or update your docker-compose.yml file with the following configuration:
services:
crowdsec-manager:
image: hhftechnology/crowdsec-manager:latest
container_name: crowdsec-manager
restart: unless-stopped
expose:
- "8080"
environment:
- PORT=8080
- ENVIRONMENT=production
- DOCKER_HOST=unix:///var/run/docker.sock
- COMPOSE_FILE=/app/docker-compose.yml
- PANGOLIN_DIR=/app
- CONFIG_DIR=/app/config
- DATABASE_PATH=/app/data/settings.db
- TRAEFIK_DYNAMIC_CONFIG=/dynamic_config.yml
- TRAEFIK_STATIC_CONFIG=/etc/traefik/traefik_config.yml
- TRAEFIK_ACCESS_LOG=/var/log/traefik/access.log
- TRAEFIK_ERROR_LOG=/var/log/traefik/traefik.log
- CROWDSEC_ACQUIS_FILE=/etc/crowdsec/acquis.yaml
- BACKUP_DIR=/app/backups
- RETENTION_DAYS=60
- INCLUDE_CROWDSEC=false
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /root/config:/app/config
- /root/docker-compose.yml:/app/docker-compose.yml
- ./backups:/app/backups
- /root/config/traefik/logs:/app/logs
- ./data:/app/data
- /root/config/traefik/logs:/var/log/traefik
networks:
- pangolin
networks:
pangolin:
external: trueThe compose file requires an external network named pangolin. Create it if it doesn't exist:
docker network create pangolinOr if you're using an existing network, ensure it's properly configured.
# Pull the latest image
docker pull hhftechnology/crowdsec-manager:latest
# Start the container
docker-compose up -d
# Check container status
docker ps | grep crowdsec-manager
# View logs
docker logs -f crowdsec-manager-
Check container health:
curl http://localhost:8080/health
-
Access the web interface:
- Open your browser to
http://your-server-ip:8080 - Or configure Traefik routing (see Network Configuration section)
- Open your browser to
The following environment variables can be configured in your docker-compose.yml:
| Variable | Default | Description |
|---|---|---|
PORT |
8080 |
Port on which the API server listens (exposed internally) |
ENVIRONMENT |
production |
Environment mode (development or production) |
LOG_LEVEL |
info |
Logging level: debug, info, warn, error |
LOG_FILE |
/app/logs/crowdsec-manager.log |
Path to log file inside container |
| Variable | Default | Description |
|---|---|---|
DOCKER_HOST |
unix:///var/run/docker.sock |
Docker daemon socket path |
COMPOSE_FILE |
/app/docker-compose.yml |
Path to docker-compose.yml inside container |
PANGOLIN_DIR |
/app |
Base directory for Pangolin operations |
CONFIG_DIR |
/app/config |
Configuration directory path |
| Variable | Default | Description |
|---|---|---|
DATABASE_PATH |
/app/data/settings.db |
SQLite database file path |
| Variable | Default | Description |
|---|---|---|
TRAEFIK_DYNAMIC_CONFIG |
/dynamic_config.yml |
Traefik dynamic configuration file path |
TRAEFIK_STATIC_CONFIG |
/etc/traefik/traefik_config.yml |
Traefik static configuration file path |
TRAEFIK_ACCESS_LOG |
/var/log/traefik/access.log |
Traefik access log file path |
TRAEFIK_ERROR_LOG |
/var/log/traefik/traefik.log |
Traefik error log file path |
| Variable | Default | Description |
|---|---|---|
CROWDSEC_ACQUIS_FILE |
/etc/crowdsec/acquis.yaml |
CrowdSec acquisition file path |
INCLUDE_CROWDSEC |
false |
Include CrowdSec in operations (true/false) |
INCLUDE_PANGOLIN |
true |
Include Pangolin service (true/false) |
INCLUDE_GERBIL |
true |
Include Gerbil service (true/false) |
| Variable | Default | Description |
|---|---|---|
BACKUP_DIR |
/app/backups |
Directory for storing backups |
RETENTION_DAYS |
60 |
Number of days to retain backups before auto-cleanup |
For a detailed explanation of volume mappings, directory structure, and permissions, please refer to VOLUMES_AND_PATHS.md.
The application uses an external Docker network named pangolin. This network should connect all related services (CrowdSec, Traefik, Pangolin, Gerbil, etc.).
If the network doesn't exist, create it:
docker network create pangolinCheck that the network exists and the container is connected:
# List networks
docker network ls | grep pangolin
# Inspect network
docker network inspect pangolin
# Check container network
docker inspect crowdsec-manager | grep -A 10 NetworksThe container exposes port 8080 internally. To access the web interface:
-
Direct Access (if port is published):
ports: - "8080:8080"
-
Via Tailscale/WireGuard (recommended)
Once the container is running, access the web interface:
- Via Tailscale/WireGuard:
http://your-tailscale-ip:8080( port has to be published)
-
Health Check: Verify the service is running
curl http://localhost:8080/api/health/stack
-
View Dashboard: Open the web interface in your browser
-
Configure Services: Use the UI to:
- Check system health
- Configure whitelists
- Set up backups
- Monitor logs
curl -X POST http://localhost:8080/api/whitelist/current \
-H "Content-Type: application/json" \
-d '{"add_to_crowdsec": true, "add_to_traefik": true}'curl http://localhost:8080/api/ip/security/1.2.3.4curl -X POST http://localhost:8080/api/backup/create \
-H "Content-Type: application/json" \
-d '{"dry_run": false}'curl http://localhost:8080/api/health/complete- Dashboard: Overview of system status
- IP Management: Block/unban IPs, check security status
- Whitelist Management: Manage IP and CIDR whitelists
- Logs: View and stream logs from all services
- Backups: Create, restore, and manage backups
- Updates: Update Docker images and services
- Configuration: Manage CrowdSec and Traefik settings
GET /api/health/stack- Check all container statusesGET /api/health/complete- Complete system diagnostics
GET /api/ip/public- Get current public IPGET /api/ip/blocked/:ip- Check if IP is blockedGET /api/ip/security/:ip- Comprehensive IP security checkPOST /api/ip/unban- Unban an IP address
GET /api/whitelist/view- View all whitelisted IPsPOST /api/whitelist/current- Whitelist current public IPPOST /api/whitelist/manual- Whitelist specific IPPOST /api/whitelist/cidr- Whitelist CIDR rangePOST /api/whitelist/crowdsec- Add to CrowdSec whitelistPOST /api/whitelist/traefik- Add to Traefik whitelistPOST /api/whitelist/comprehensive- Setup full whitelist
GET /api/backup/list- List all backupsPOST /api/backup/create- Create new backupPOST /api/backup/restore- Restore from backupDELETE /api/backup/:id- Delete backupPOST /api/backup/cleanup- Remove old backupsGET /api/backup/latest- Get latest backup
GET /api/logs/crowdsec- Get CrowdSec logsGET /api/logs/traefik- Get Traefik logsGET /api/logs/traefik/advanced- Advanced log analysisGET /api/logs/:service- Get service logsGET /api/logs/stream/:service- Stream logs (WebSocket)
For complete API documentation, see the API Documentation section in the original README.
Backend:
go build -o crowdsec-manager ./cmd/serverFrontend:
cd web
npm install
npm run buildDocker Image:
docker build -t crowdsec-manager:latest .Backend:
go test -v ./...Frontend:
cd web
npm run lint
npm testUse docker-compose.dev.yml for development with hot reload:
docker-compose -f docker-compose.dev.yml upCheck logs:
docker logs crowdsec-managerVerify Docker socket:
ls -la /var/run/docker.sockCheck permissions:
# Ensure Docker socket is accessible
sudo chmod 666 /var/run/docker.sock
# Or add user to docker group
sudo usermod -aG docker $USERVerify network exists:
docker network ls | grep pangolinCreate network if missing:
docker network create pangolinCheck container network:
docker inspect crowdsec-manager | grep -A 10 NetworksCheck directory permissions:
# Ensure directories exist
sudo mkdir -p /root/config
sudo mkdir -p /root/config/traefik/logs
# Check permissions
ls -la /root/config
ls -la ./backups
ls -la ./dataFix permissions if needed:
sudo chown -R $USER:$USER ./backups ./data
sudo chmod -R 755 ./backups ./dataIf port 8080 is already in use:
-
Change the port in docker-compose.yml:
ports: - "8090:8080"
-
Or find and stop the conflicting service:
sudo lsof -i :8080 sudo kill <PID>
Check database file:
ls -la ./data/settings.dbReset database (
rm ./data/settings.db
docker-compose restart crowdsec-managerCheck backup directory:
ls -la ./backupsVerify permissions:
chmod 755 ./backupsCheck disk space:
df -hVerify Traefik log paths:
ls -la /root/config/traefik/logs/Check log file permissions:
sudo chmod 644 /root/config/traefik/logs/*.logManual health check:
curl http://localhost:8080/healthCheck container status:
docker ps -a | grep crowdsec-managerRestart container:
docker-compose restart crowdsec-managerBefore deploying to production:
-
Test on a dedicated test server
- Use a VM or separate server
- Don't use your production infrastructure
-
Test all features
- IP management
- Whitelist operations
- Backup creation and restoration
- Log viewing
- Service updates
-
Monitor resource usage
- CPU and memory consumption
- Disk space for backups
- Network traffic
-
Test failure scenarios
- Container restarts
- Network disconnections
- Disk space exhaustion
- Permission issues
-
Verify backups
- Create backups
- Test restoration
- Verify data integrity
-
Check integration
- CrowdSec integration
- Traefik integration
- Log aggregation
- Service discovery
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Original bash script by hhf-technology
- CrowdSec for the security engine
- Traefik for reverse proxy
- Shadcn/ui for UI components
Built with ❤️ for the CrowdSec community














