Every public server is scanned and attacked constantly: SSH password guessing, WordPress login floods, vulnerability scanners probing paths. Fail2ban has handled this for years by banning IPs that misbehave. CrowdSec takes a similar idea further with a modular design, a library of community scenarios, and a shared reputation network. This guide explains how it works and how to deploy it on a VPS.
How CrowdSec Works
logs ─▶ Security Engine (parsers ─▶ scenarios) ─▶ decisions (Local API)
│
bouncers ◀──────────────────────┘
(firewall, Nginx, Cloudflare, application)
optional: share signals with the CrowdSec network, receive community blocklist
- Acquisition: which log files or sources to read.
- Parsers and scenarios: grouped in collections (for example Linux, SSH, Nginx, WordPress) that detect behaviours.
- Decisions: bans or captchas with a duration, stored in the Local API.
- Bouncers: components that enforce decisions.
Installation Outline
- Install the CrowdSec security engine from the official repository.
- Let it detect installed services, then install collections for SSH, Nginx and your applications.
- Install the firewall bouncer (nftables or iptables) to block decisions at the network level.
- For websites, add the Nginx bouncer to block or challenge at the HTTP layer.
- Whitelist your office, VPN and monitoring IPs so you never ban yourself.
- Optionally enroll in the CrowdSec console to view alerts and use blocklists.
CrowdSec vs Fail2ban
| Aspect | CrowdSec | Fail2ban |
|---|---|---|
| Detection | Scenarios with parsers, community library | Regex filters per jail |
| Enforcement | Separate bouncers (firewall, web server, CDN) | Actions in the same tool |
| Shared intelligence | Optional community blocklist | No built-in sharing |
| Multi-server | Central Local API for several servers | Per-server by default |
| Simplicity | More components | Very simple for SSH protection |
Fail2ban remains a fine choice for simple SSH protection (see our Fail2ban guide). CrowdSec suits servers with web applications and teams running several servers.
Protecting Web Applications
Web collections detect path scanning, brute-force logins, known exploit attempts and bad user agents in Nginx or Apache logs. The Nginx bouncer can show a captcha instead of blocking, which reduces harm from false positives. For sites behind a CDN, configure the real client IP from forwarded headers, or use a CDN bouncer, otherwise CrowdSec will see only CDN IPs.
Several Servers
Run one Local API and connect engines on other servers to it, so a ban triggered on one server applies to all. Bouncers on each server pull decisions from the central API. Protect the API with TLS and authentication and keep it on a private network.
Handling False Positives
- Whitelist your own IPs, monitoring services and known partners.
- Review decisions after enabling new collections.
- Prefer captcha for web traffic where real users might be caught.
- Use shorter ban durations at first and lengthen them once you trust the scenarios.
What CrowdSec Does Not Do
CrowdSec responds to behaviour visible in logs; it does not absorb volumetric DDoS floods, which need provider mitigation (see our firewall vs DDoS guide), and it is not a full SIEM (see our Wazuh guide).
Resource Use
The engine and bouncers use little CPU and memory, so they run comfortably on the same VPS as your applications. Very busy web servers with large logs need slightly more CPU for parsing.
Monitoring
Use the cscli metrics and decisions commands, or the console, to see what is detected and blocked. Export metrics to Prometheus if you already use it, and alert if the engine or bouncers stop running.
Example: A WordPress Agency
An agency hosting 40 WordPress sites on two VPS servers runs a central CrowdSec Local API with SSH, Nginx and WordPress collections. The firewall bouncer blocks scanners, the Nginx bouncer challenges suspicious login attempts with a captcha, and the agency's office and uptime monitor are whitelisted. Login-flood alerts dropped sharply within the first week.
Common Mistakes
- Not whitelisting your own IPs.
- Installing the engine without a bouncer, so nothing is blocked.
- Seeing only CDN IPs because real client IPs are not configured.
- Very long bans before checking for false positives.
- Treating CrowdSec as DDoS protection.
In Short
CrowdSec detects attacks from your logs and blocks them through bouncers, optionally using community intelligence. Install collections for your services, add firewall and web bouncers, whitelist yourself, centralise decisions across servers and watch for false positives.
Custom Scenarios for Your Application
Community collections cover common services, but your own application may have endpoints attackers abuse: a password reset form, an OTP verification route or a coupon checker. Log those events with the client IP in a consistent format, write a parser that extracts the fields, and create a scenario that triggers on bursts (for example ten failed OTP checks in a minute from one IP). Test it against sample logs before enabling it, start with captcha rather than a hard ban, and review decisions for the first week.
Next Steps
Install the engine and firewall bouncer on one server, whitelist your IPs, add collections for SSH and your web server, watch decisions for a week, then add the web bouncer and connect your other servers to a central Local API. Security tools are only as good as the people and routines around them, so assign an owner, schedule regular reviews and record what you change and why. Start small on one server, measure the results for a couple of weeks, and only then roll the same configuration out to the rest of your infrastructure, adjusting it for each server's role. If you are unsure where to begin, protect the services that face the internet first, such as SSH, administrative panels and login pages, because they receive the most automated attacks and give the quickest visible improvement.
SkyRainCloud Plans for This Workload
CrowdSec uses little CPU and memory; it runs alongside your applications on any SkyRainCloud VPS, from 2 vCores / 8 GB upward.
AMD EPYC 7C13 VPS
Dedicated KVM vCores on AMD EPYC 7C13 (up to 3.70 GHz) with DDR4 ECC memory, NVMe SSD and an unmetered 1 Gbps port.
| Plan | vCores | RAM | Storage | Network | Price | Good for | Buy |
|---|---|---|---|---|---|---|---|
| VPS 1 — AMD | 2 | 8 GB DDR4 ECC | 40 GB NVMe SSD | 1 Gbps, unmetered | ₹649/month | Websites, small APIs, bots, staging and VPN servers | Order |
| VPS 2 — AMD | 4 | 16 GB DDR4 ECC | 80 GB NVMe SSD | 1 Gbps, unmetered | ₹1,299/month | WooCommerce, Node.js/Python backends, Docker Compose stacks, CI runners | Order |
| VPS 3 — AMD | 8 | 32 GB DDR4 ECC | 150 GB NVMe SSD | 1 Gbps, unmetered | ₹2,499/month | Production databases, high-traffic sites, multi-container apps | Order |
| VPS 4 — AMD | 16 | 64 GB DDR4 ECC | 250 GB NVMe SSD | 1 Gbps, unmetered | ₹4,899/month | Large production workloads, SaaS platforms, analytics, in-memory caches | Order |
Intel Xeon Platinum 8269CY VPS
KVM VPS on Intel Xeon Platinum 8269CY (up to 3.80 GHz Turbo) with DDR4 ECC memory, NVMe SSD, full root access and an unmetered 1 Gbps port.
| Plan | vCores | RAM | Storage | Network | Price | Good for | Buy |
|---|---|---|---|---|---|---|---|
| VPS 1 — Intel | 2 | 8 GB DDR4 ECC | 40 GB NVMe SSD | 1 Gbps, unmetered | ₹649/month | Business websites, small apps, scheduled jobs and bots | Order |
| VPS 2 — Intel | 4 | 16 GB DDR4 ECC | 80 GB NVMe SSD | 1 Gbps, unmetered | ₹1,169/month | Business software, mid-size databases, several sites on one server | Check stock |
| VPS 3 — Intel | 8 | 32 GB DDR4 ECC | 150 GB NVMe SSD | 1 Gbps, unmetered | ₹2,249/month | ERP/CRM stacks, heavier databases, multiple production apps | Check stock |
| VPS 4 — Intel | 16 | 64 GB DDR4 ECC | 250 GB NVMe SSD | 1 Gbps, unmetered | ₹4,299/month | High-memory workloads and consolidated production servers | Check stock |
Prices are monthly in INR as listed on the SkyRainCloud store (verified 2026-11-14). Stock and final pricing are shown on the product page at checkout.