Skip to main content

Install on FreeBSD

New to CrowdSec? Start with the introduction to understand the components and prerequisites.

Configure repositories

FreeBSD packages are available in the official repositories.

By default, pkg install uses quarterly releases (January, April, July, October), which include security fixes.

You can check /etc/pkg/FreeBSD.conf and change quarterly to latest if you feel comfortable upgrading your system.

Install the Security Engine

The CrowdSec package itself can be installed with:

sudo pkg install crowdsec

You'll see a message that tells you how to activate the service:

Enable Service

sudo sysrc crowdsec_enable="YES"
Command Output
crowdsec_enable:  -> YES

Start Service

sudo service crowdsec start
Command Output
Fetching hub inventory
INFO[21-12-2021 03:13:35 PM] Wrote new 197364 bytes index to /usr/local/etc/crowdsec/hub/.index.json
[...]

Install a Remediation Component

The Security Engine only detects. To block malicious traffic, install a Remediation Component.

For a quick start, we install the PF firewall Remediation Component. This may not fit every environment, so see the Remediation documentation for alternatives.

To install:

sudo pkg install crowdsec-firewall-bouncer

Then you must enable it with the following commands:

Enable Service

sudo sysrc crowdsec_firewall_enable="YES"
Command Output
crowdsec_firewall_enable:  -> YES

Start Service

sudo service crowdsec_firewall start
Command Output
Registered: cs-firewall-bouncer-ZjpcXlUx

Next steps

Great, you now have CrowdSec installed. Continue with the post-installation steps to finish setup and optimize your deployment.