Guide to Configuring CrowdSec for Multi-Cloud Server Protection from a Centralized Dashboard
This guide provides a detailed walkthrough for deploying CrowdSec to protect multi-cloud server clusters from a centralized dashboard, enabling unified management and automated...
This guide provides a detailed walkthrough for deploying CrowdSec to protect multi-cloud server clusters from a centralized dashboard, enabling unified management and automated threat response across environments such as AWS, GCP, Azure, and standalone VPS instances. With a distributed architecture, CrowdSec collects data from servers, analyzes user behavior, and shares threat intelligence (IOC) between nodes, forming a synchronized and efficient defense system. The guide covers setting up the dashboard server, configuring agents on servers, integrating with cloud platforms, and verifying protection operations.
Overview of CrowdSec and Multi-Cloud Architecture
CrowdSec is an open-source security platform that detects and blocks automated attacks by analyzing logs and learning user behavior. In a multi-cloud environment, each cloud or VPS can run a CrowdSec agent to collect data from services like Nginx, SSH, or web applications. These agents send threat intelligence (IOC) to a central dashboard server via API or WebSocket protocol. The dashboard aggregates, analyzes, and decides on actions—such as blocking IP addresses, sending alerts, or updating rules—based on data from multiple sources.
The key advantage of this architecture is scalability and centralized management: instead of configuring security individually on each server, you manage a single dashboard. This is especially beneficial when operating servers across different regions or cloud providers.
Prerequisites and Environment Preparation
To deploy this solution, you need:
- A dashboard server (which can be a VPS or Dedicated Server) to run the CrowdSec dashboard and API.
- At least one agent server (on a VPS, cloud server, or local machine) to collect data and send it to the dashboard.
- Stable network connectivity between agents and the dashboard (ports 3443 or 8080 must be open).
- Authentication and encryption (TLS/SSL) to secure communication between nodes.
For the dashboard server, you can use a High-Performance Dedicated Server or a NVMe Cloud VPS to ensure it can handle large volumes of data. Agent servers can run on smaller VPS instances or on physical servers in a data center.
Configuration Steps
1. Set up the dashboard server: Install CrowdSec on the dashboard server using the following commands:
curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh | sudo bash
sudo apt install crowdsec
sudo systemctl enable crowdsec crowdsec-api
sudo systemctl start crowdsec crowdsec-api
Then configure the API to allow agent connections. Open the file /etc/crowdsec/config.yaml and ensure the api: section is enabled:
api:
enabled: true
listen: 0.0.0.0:8080
# SSL config if needed
2. Configure agents: On each server to be protected, install the CrowdSec agent and configure it to connect to the dashboard. In the file /etc/crowdsec/config.yaml, add the following:
api:
server: "https://dashboard-ip:8080"
insecure: false
# If using self-signed SSL, add ca_cert
3. Share IOCs: The dashboard will automatically receive and analyze IOCs from agents. You can verify this by accessing the web dashboard at https://dashboard-ip:3443 (if using the integrated web interface) or checking logs with the command crowdsec status.
Verification and Testing
After configuration, verify functionality by:
- Running
crowdsec statuson an agent to check connection to the dashboard. - Accessing the dashboard and confirming data is received from all agents.
- Simulating a fake attack (e.g., using
hydrato attempt SSH login) and verifying CrowdSec detects and blocks the IP address.
To ensure consistency, you can refer to the guide on building a CTI platform from a host on VPS for deeper integration with threat intelligence systems.
Troubleshooting
If agents fail to connect to the dashboard:
- Check network connectivity and ensure ports 8080 (or 3443) are open.
- Verify that SSL certificates (if used) are correctly issued and trusted on the agent.
- Run
crowdsec logsto view specific error messages. - Temporarily set
insecure: true(only for testing environments) to rule out SSL issues.
For dashboards not receiving IOCs, recheck API configuration and ensure agents are added to the list of allowed connecting nodes.
Recommended NVMe Cloud VPS Plans to Deploy This Setup
Enterprise RAID 10 NVMe SSDs, CMC & FPT District 9 uplinks with Anycast Anti-DDoS and 99.99% SLA.
VPS-3E
10% VAT included
- CPU: 2 vCPU
- RAM: 4 GB
- SSD: 50 GB NVMe
