selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

crowdsec logo

Self-host crowdsec

v1.8.2

Crowdsourced IDS/IPS and WAF with community IP blocklists

ReleaseOpen SourceMIT
curl -s https://install.crowdsec.net | sudo sh
Updatedlast week
LanguageGo
Setup difficultyModerate
Stars
15 498
Rating
5.0 (1)
Port
8080 (Local API (LAPI) HTTP endpoint used by agents and remediation components)
Docker
crowdsecurity/crowdsec
crowdsec screenshot 1

What is crowdsec?

CrowdSec is a participative security stack for your own servers: an agent reads log files and HTTP requests, matches them against behavior scenarios, and issues decisions that separate remediation components carry out. Its AppSec module acts as a web application firewall; it is built on the Coraza engine, so ModSecurity-style SecLang rule sets, including the OWASP CRS, can be loaded next to CrowdSec's own YAML rules, and it can challenge suspicious clients with a JavaScript proof-of-work task to stop scrapers and headless browsers. Participation is what makes it "crowd" security: attacks you report feed a shared list of bad actors, and every enrolled engine pulls those validated IPs before they reach it. Day-to-day work happens through cscli, Prometheus metrics can be scraped, and a hosted Console adds dashboards and stack-health views. Keep in mind the engine only detects; blocking requires a remediation component. You can run it from vendor packages via a one-line installer on Linux, in a Docker or Podman container, on Windows, FreeBSD or macOS, or as a Helm chart on Kubernetes.

crowdsec alternatives

All self-hosted alternatives to ModSecurity → All self-hosted alternatives to Naxsi → All self-hosted alternatives to Fail2Ban →

Should you self-host crowdsec?

crowdsec scores 76/100 on selfhost.directory (how scoring works) and ranks #10 of 78 in Security. It has 15 498 GitHub stars, +430 in the last 30 days.

It shipped 8 stable releases in the past year. The latest, v1.8.2, came out on 26 October 2026. New versions land roughly every 2 months.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is MIT-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is UUSEC WAF (59/100, 1 720 stars). crowdsec scores higher overall. See crowdsec vs UUSEC WAF side by side.

Features

  • API-centric multi-machine setup
  • Automated IP banning (remediation)Requires a separate remediation component to enforce blocks
  • Bot and scraper detection
  • Built-in attack scenarios
  • CLI administration (cscli)
  • Cold-log / replay analysis
  • Crowdsourced community blocklist
  • Hosted web console for monitoringThe Console (app.crowdsec.net) is the vendor's hosted service, not a self-hosted UI
  • Log-based intrusion detection (IDS/IPS)
  • OWASP Core Rule Set / SecLang rule support
  • Prometheus Metrics
  • Web Application Firewall (WAF)

crowdsec README

How to install crowdsec

Install crowdsec with Docker Compose

crowdsec:
  image: crowdsecurity/crowdsec
  restart: always
  ports:
    - 127.0.0.1:8080:8080
  environment:
    COLLECTIONS: "crowdsecurity/nginx"
    GID: "${GID-1000}"
  depends_on:
    - "reverse-proxy"
  volumes:
    - ./crowdsec/acquis.yaml:/etc/crowdsec/acquis.yaml
    - logs:/var/log/nginx
    - crowdsec-db:/var/lib/crowdsec/data/
    - crowdsec-config:/etc/crowdsec/

Recommended for production; log sources must be mounted and data/config volumes persisted.

How to configure crowdsec

  • db_pathInside db_config: database file path for SQLite, or socket location for MySQL/PostgreSQL.
  • listen_uriInside api.server: address and port the Local API listens on, in host:port form.
  • COLLECTIONSSpace-separated list of CrowdSec collections to install (e.g. crowdsecurity/nginx).
  • TZUTCTimezone used in logs.
  • CONFIG_FILE/etc/crowdsec/config.yamlPath to the main config file; useful when mounting a single file instead of the whole directory.

crowdsec releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

More in Security

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…