Fastest way to get started with Pangolin using the hosted control plane. No credit card required.
To install Crowdsec with the offical installer, start it with the --crowdsec flag. This will prompt for a Crowdsec install at the end of the process.
This is a community guide and is not officially supported. If you have any issues, please reach out to the author.
CrowdSec is a modern, open-source, collaborative behavior detection engine, integrated with a global IP reputation network. It functions as a massively multiplayer firewall, analyzing visitor behavior and responding appropriately to various types of attacks.
Crowdsec can be installed using the Pangolin Installer.
Enabling CrowdSec turns on Traefik access logging so CrowdSec can analyze traffic. This means config/traefik/logs/access.log will grow over time. If you want to set up log rotation, see the Traefik Access Log Rotation guide.
By default, only Traefik requests are secured through the Crowdsec bouncer. To extend protection to your host system (e.g., SSH), follow these steps to add a firewall bouncer:
Update the docker-compose.yml file to expose communication port 8080 for the CrowdSec container and restart the container:
service: crowdsec: ports: - 6060:6060 # Metrics port - 8080:8080 # Local API port
Docker’s NAT-based port publishing feature automatically exposes all ports: defined in the docker-compose file on all network interfaces. This behavior can bypass your host firewall settings, potentially exposing services that you did not intend to make public.
Please see complete warning about exposing ports.
Verify communication between the firewall bouncer and the CrowdSec container by running:
docker exec crowdsec cscli metrics
The output should look like this:
+------------------------------------------------------------------+| Local API Bouncers Metrics |+---------------------------+----------------------+--------+------+| Bouncer | Route | Method | Hits |+---------------------------+----------------------+--------+------+| traefik-bouncer | /v1/decisions/stream | HEAD | 2 || traefik-bouncer@10.0.4.20 | /v1/decisions | GET | 3 || vps-firewall | /v1/decisions/stream | GET | 84 | <---------+---------------------------+----------------------+--------+------+
Update the /config/traefik/dynamic_config.yml file with the following configuration, replacing <SERVICE> with your captcha provider (MUST BE either hcaptcha, recaptcha, or turnstile), and <KEY> with the appropriate site and secret keys: