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:

SH
sudo pkg install crowdsec

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

Enable Serviceโ€‹

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

Start Serviceโ€‹

SH
sudo service crowdsec start
Command Output
SHCommand 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โ€‹

warning

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:

SH
sudo pkg install crowdsec-firewall-bouncer
warning

Before starting the firewall bouncer in pf mode, ensure your /etc/pf.conf defines the CrowdSec tables and blocking rules. See the Firewall Remediation Component pf setup guide.

Then you must enable it with the following commands:

Enable Serviceโ€‹

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

Start Serviceโ€‹

SH
sudo service crowdsec_firewall start
Command Output
SHCommand 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.

CrowdSec Docs
We use cookies

This site uses cookies to help us improve your experience. You can accept or decline below.