Files
crowdsec-bouncer-traefik-pl…/examples/standalone-mode
mathieuHaandGitHub e6b10b8ac4 ⬆️ 📝 Update exemples and version traefik 3, crowdsec 1.6.1-2, plugin … (#160)
* ⬆️ 📝 Update exemples and version traefik 3, crowdsec 1.6.1-2, plugin 1.3.0

* 📝 🐛 Fix race in exemple and doc for tls
2024-05-01 20:03:19 +02:00
..
2023-09-24 13:31:29 +02:00

Generate CAPI credentials (only for alone mode)

You need to create a crowdsec API credentials for the CAPI. You can follow the documentation here: https://docs.crowdsec.net/docs/central_api/intro

curl -X POST "https://api.crowdsec.net/v2/watchers" -H  "accept: application/json" -H  "Content-Type: application/json" -d "{ \"password\": \"PASSWORD\",  \"machine_id\": \"LOGIN\"}"

These CAPI credentials must be set in your docker-compose.yml or in your config files

...
whoami:
  labels:
    - "traefik.http.middlewares.crowdsec.plugin.bouncer.enabled=true"
    - "traefik.http.middlewares.crowdsec.plugin.bouncer.crowdsecMode=alone"
    - "traefik.http.middlewares.crowdsec.plugin.bouncer.crowdsecCapiMachineId=LOGIN"
    - "traefik.http.middlewares.crowdsec.plugin.bouncer.crowdsecCapiPassword=PASSWORD"
    - "traefik.http.middlewares.crowdsec.plugin.bouncer.crowdsecCapiScenarios=crowdsecurity/http-generic-bf,crowdsecurity/http-xss-probing,..."

You can then run all the containers:

docker-compose up -d