canasta crowdsec bouncer-enroll

From Canasta Wiki

canasta > crowdsec > bouncer-enroll

canasta crowdsec bouncer-enroll

Register the Caddy bouncer with the CrowdSec engine

Synopsis

Register the Caddy bouncer with the running CrowdSec engine, store the generated API key as CROWDSEC_BOUNCER_API_KEY, and restart so the bouncer begins enforcing decisions.

Enabling CrowdSec (canasta config set CANASTA_ENABLE_CROWDSEC=true) now enrolls the bouncer automatically on the next start, so you rarely need to run this by hand. It is idempotent: if the bouncer is already enrolled and a key is stored, it reports success and does nothing. Use --force to revoke the existing bouncer and issue a fresh key (e.g. to rotate a key, or recover one that drifted out of sync). Distinct from console-enroll, which connects the engine to the cloud CrowdSec Console.

canasta crowdsec bouncer-enroll [flags]

Examples

canasta crowdsec bouncer-enroll
canasta crowdsec bouncer-enroll -i mysite
canasta crowdsec bouncer-enroll -i mysite --force

Flags

Flag Shorthand Description Default Required Orchestrator
--force -f Revoke the existing bouncer and issue a fresh key Both
--id -i Canasta instance ID * Both

* Defaults to the Canasta instance matching the current directory, if any.

Global Flags

Flag Shorthand Description Default Required Orchestrator
--help -h Show help message and exit Both
--verbose -v Enable verbose output Both