Security

Host CrowdSec on VeloxaHost

CrowdSec is an intrusion detection and prevention engine: it reads your services' logs and HTTP requests, spots behaviour such as brute-force logins and scans, and hands the offending IP addresses to remediation components that block them. Server owners use it as a modern alternative to fail2ban, with a community blocklist built from what its users report.

The one-click install runs CrowdSec's repository script from install.crowdsec.net, which adds CrowdSec's APT repository to Ubuntu 24.04, then installs the crowdsec package and enables the crowdsec service. That package is the Security Engine with its Local API, which listens on the server's loopback address, 127.0.0.1:8080, by default.

It detects, but does not block yet

CrowdSec's own docs are plain about it: "The Security Engine by itself is a detection engine -- it will not block anything." Blocking is done by a separate remediation component, also called a bouncer, and the one-click install does not add one. Until you do, CrowdSec records alerts and decisions but every address still gets through.

For services such as SSH, install the firewall bouncer from the same repository. Check which backend the server uses with iptables -V: if the output mentions nf_tables, take the nftables package instead.

apt install -y crowdsec-firewall-bouncer-iptables
cscli metrics show bouncers

Its configuration is /etc/crowdsec/bouncers/crowdsec-firewall-bouncer.yaml; if it cannot authenticate with the Local API, create a key with cscli bouncers add and put it in api_key there. For web traffic, CrowdSec also has bouncers for web servers and proxies such as Nginx, Traefik and HAProxy, which can block at the HTTP layer.

What it watches

CrowdSec reads logs on the server it runs on. A server with only CrowdSec on it has little to watch, so the usual pattern is to install the app you want to protect on the same server, for example Nginx or Traefik, and add the matching detection collection from CrowdSec's hub:

cscli collections list
cscli collections install crowdsecurity/nginx
systemctl reload crowdsec

cscli alerts list and cscli decisions list show what it has seen and which addresses it has decided to block. To protect several servers from one place, CrowdSec can register each engine with a remote Local API (cscli lapi register); on VeloxaHost, reach that API through a forwarded port, since servers cannot reach each other over the host's bridge.

The Local API's default port, 8080, is also the default for several other apps. If one of them runs on the same server, move one of the two.

Sharing and the community blocklist

The engine can share signals about the attacks it sees with CrowdSec. In CrowdSec's words, attacks you report feed a community blocklist, and the engine blocks the addresses on that list too, once a bouncer is in place. Enrolling in CrowdSec's hosted console with cscli console enroll is optional and adds dashboards and extra blocklists.

What it needs

CrowdSec's docs set no hardware figures. The catalogue's minimum is 1 vCPU and 512 MB; on a shared server it runs next to the app it protects, so size the server for that app plus a little headroom. On its own, the Veloxa Nano size fits: 1 vCPU, 1 GB RAM and 25 GB of disk for $4 a month, billed at $0.01 an hour and capped at the monthly price.

Reaching it on VeloxaHost

There is no web interface to open: you manage CrowdSec with cscli in the browser terminal on the server's page. Every server gets a block of ports (10 by default) on the region's shared IPv4 address, and the first forwards to SSH. With the crowdsecurity/sshd collection and the firewall bouncer, CrowdSec watches and protects that SSH port.

Backups and updates

Configuration is under /etc/crowdsec, including the bouncer settings. Turn on automatic snapshots on the server page (hourly up to weekly, kept for 1 to 30 days) or scheduled backups (every 6 hours up to weekly, keeping 1 to 10).

To update the engine, take a snapshot, then apt update && apt upgrade; CrowdSec's packages come from its own repository. Update detection rules from the hub with cscli hub update and cscli hub upgrade.

FAQ

Does CrowdSec block attacks out of the box?

Not with the one-click install alone. The engine detects; a bouncer such as crowdsec-firewall-bouncer-iptables does the blocking. Install one as shown above.

Is CrowdSec a replacement for fail2ban?

It covers the same ground, reading logs and banning addresses, and adds a shared community blocklist and a hub of detection scenarios.

Can it protect my other VeloxaHost servers?

Install CrowdSec on each server whose logs you want watched. Engines can report to one central Local API, reached through a forwarded port on the shared address.

What license is CrowdSec under?

The CrowdSec engine is released under the MIT License. The hosted console and some blocklists are separate services from CrowdSec.

Which VeloxaHost size fits CrowdSec?

On its own, a Veloxa Nano: 1 vCPU, 1 GB RAM and 25 GB of disk for $4 a month, billed at $0.01 an hour and capped at that price. Next to another app, size the server for that app.