FL1GHT5 Lab • Privacy & Self-Hosting

How to Set Up CrowdSec for Home Lab Security

Who This Is For

Intermediate.

Think of it like a neighbourhood watch that actually shares notes. One house spots a suspicious car circling the block, and now the whole street knows to watch for it too.

What You'll Build

CrowdSec detects SSH or web events and applies an enforceable block through the correct bouncer component.

Prerequisites

Detection vs. Enforcement

CrowdSec's security engine only detects events from logs. A separate bouncer component is what actually enforces a block, pick the right one for the job: a firewall bouncer for host-level protection, or an Nginx bouncer for web applications.

Install CrowdSec

$curl -s https://install.crowdsec.net | sudo sh

Configure Log Acquisition

Point CrowdSec at your SSH logs, Nginx/reverse-proxy logs, and any Docker logs worth watching, then install the matching collections (e.g. crowdsecurity/sshd, crowdsecurity/nginx).

Install a Bouncer

$sudo apt install crowdsec-firewall-bouncer-iptables

Test Safely

Trigger a controlled failed-login test from a machine you control, then confirm a decision was issued:

$sudo cscli decisions list

Whitelist Trusted Networks

Carefully whitelist your own internal subnets and remote-access IP so you don't accidentally ban yourself.

Send Alerts

Wire up notifications to Discord, email, or another channel so you actually see what CrowdSec is blocking.

Security & Backup Notes

Troubleshooting

Lab Finish Line

CrowdSec detects SSH or web events and applies an enforceable decision through a bouncer.

What to Build Next

Planning a business implementation?

Explore our infrastructure and systems services.

View services