Install CrowdSec (Linux)
For those that prefer hands-on approach, you can as well manually install crowdsec.
Install our repositories#
Installing our repositories allows you to access the latest packages of CrowdSec and bouncers.
info
We are using packagecloud.io service.
While curl | sudo bash can be convenient for some, alternative installation methods are available.
- Debian/Ubuntu
- EL/Centos7
- EL/Centos Stream 8
- Amzn Linux 2
- OpenWRT
- CloudLinux
curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh | sudo bashcurl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh | sudo bashcurl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh | sudo bashcurl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh | sudo bashcurl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh | os=el dist=7 sudo bashInstall CrowdSec#
- Debian/Ubuntu
- EL/Centos7
- EL/Centos Stream 8
- Amzn Linux 2
- OpenWRT
- CloudLinux
apt install crowdsecyum install crowdsecdnf install crowdsecyum install crowdsecopkg install crowdsecyum install crowdsecYou now have CrowdSec running ! You can move forward and install a bouncer, or take a tour of the software beforehand !
Directories:
- The application lives in the folder
\etc\crowdsecusing less than 0.5 MBytes of storage. - The data is stored in the folder
\lib\crowdsec\dataand needs around 97 MBytes of storage.
caution
Keep in mind that a CrowdSec package is only in charge of the "detection", and won't block anything on its own. You need to deploy a bouncer to "apply" decisions.
Install a bouncer#
- Debian/Ubuntu
- EL/Fedora/Centos7
- EL/Fedora/Centos8
- Amzn Linux 2
- OpenWRT
- CloudLinux
apt install crowdsec-firewall-bouncer-iptablesyum install crowdsec-firewall-bouncer-iptablesdnf install crowdsec-firewall-bouncer-iptablesyum install crowdsec-firewall-bouncer-iptablesopkg install crowdsec-firewall-bounceryum install crowdsec-firewall-bouncer-iptablesinfo
While we're suggesting the most common firewall bouncer, check our hub for more of them. Find a bouncer directly for your application (nginx, php, wordpress) or your providers (cloudflare, AWS/GCP/...)
Running CrowdSec on raspberry pi os/raspbian#
Please keep in mind that raspberry pi OS is designed to work on all raspberry pi versions. Even if the port target is known as armhf, it's not exactly the same target as the debian named armhf port.
The best way to have a CrowdSec version for such an architecture is to do:
- install golang (all versions from 1.16 will do)
export GOARCH=armexport CGO=1- Update the GOARCH variable in the Makefile to
arm - install the arm gcc cross compiler (On debian the package is gcc-arm-linux-gnueabihf)
- Compile CrowdSec using the usual
makecommand