# Wazuh SIEM Platform

> Wazuh security platform with SIEM, XDR, and compliance monitoring.

- Category: Security & Networking
- Difficulty: advanced
- Components: wazuh-manager, wazuh-indexer, wazuh-dashboard
- Tags: wazuh, siem, security, compliance, xdr
- Source: https://docker.recipes/security/wazuh-siem

## Overview

Wazuh is an open-source security platform that originated as a fork of OSSEC HIDS, evolving into a comprehensive SIEM, XDR, and security monitoring solution. The Wazuh manager serves as the central analysis engine that processes security events, performs log analysis, runs integrity checks, detects rootkits, and manages security policies across distributed environments. It integrates threat intelligence feeds, provides vulnerability detection, and offers compliance monitoring for standards like PCI DSS, GDPR, and HIPAA. This Docker stack combines three essential Wazuh components: the wazuh-indexer (based on OpenSearch) for data storage and search capabilities, the wazuh-manager for security analysis and agent coordination, and the wazuh-dashboard for visualization and management. Together, they create a unified security operations center that can monitor file integrity, detect intrusions, analyze logs in real-time, and provide comprehensive security reporting. The platform excels at correlating events across multiple data sources and provides both signature-based and behavioral analysis capabilities. Security teams, compliance officers, and system administrators benefit from this stack's ability to centralize security monitoring across hybrid infrastructure while providing detailed forensic capabilities. The combination offers enterprise-grade security intelligence with the flexibility of containerized deployment, making advanced threat detection and compliance monitoring accessible to organizations of all sizes without requiring extensive security expertise to get started.

## Features

- Real-time security event correlation engine with custom rule creation capabilities
- Distributed agent architecture supporting Windows, Linux, macOS, and cloud workloads
- Built-in compliance dashboards for PCI DSS, GDPR, HIPAA, and NIST frameworks
- File integrity monitoring with baseline creation and change detection
- Vulnerability assessment integration with CVE database correlation
- Cloud security monitoring for AWS, Azure, and Google Cloud Platform
- Active response capabilities for automated threat mitigation
- RESTful API for integration with SOAR platforms and custom workflows

## Use cases

- Enterprise SOC deployment for centralized security monitoring across multiple locations
- Cloud security posture management and compliance reporting for regulated industries
- Managed service provider offering security monitoring services to multiple clients
- DevSecOps integration for container and Kubernetes security monitoring
- Incident response team requiring detailed forensic analysis and threat hunting capabilities
- Small to medium business SIEM implementation with limited security staff
- Compliance audit preparation and ongoing regulatory requirement monitoring

## Prerequisites

- Minimum 4GB RAM allocated to Docker (indexer requires 1GB+ heap space)
- Docker host with at least 20GB available storage for security event data
- Understanding of security log formats and SIEM concepts for effective rule tuning
- Network access planning for agent communication on ports 1514, 1515, and 55000
- SSL certificate management knowledge for production dashboard deployment
- Basic familiarity with OpenSearch/Elasticsearch for data retention configuration

## docker-compose.yml

```yaml
services:
  wazuh-indexer:
    image: wazuh/wazuh-indexer:4.7.0
    container_name: wazuh-indexer
    environment:
      - "OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g"
      - bootstrap.memory_lock=true
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536
        hard: 65536
    volumes:
      - wazuh_indexer_data:/var/lib/wazuh-indexer
    networks:
      - wazuh-network

  wazuh-manager:
    image: wazuh/wazuh-manager:4.7.0
    container_name: wazuh-manager
    hostname: wazuh-manager
    environment:
      - INDEXER_URL=https://wazuh-indexer:9200
      - INDEXER_USERNAME=admin
      - INDEXER_PASSWORD=${INDEXER_PASSWORD}
      - FILEBEAT_SSL_VERIFICATION_MODE=full
    volumes:
      - wazuh_api_config:/var/ossec/api/configuration
      - wazuh_etc:/var/ossec/etc
      - wazuh_logs:/var/ossec/logs
      - wazuh_queue:/var/ossec/queue
    ports:
      - "1514:1514"
      - "1515:1515"
      - "514:514/udp"
      - "55000:55000"
    depends_on:
      - wazuh-indexer
    networks:
      - wazuh-network

  wazuh-dashboard:
    image: wazuh/wazuh-dashboard:4.7.0
    container_name: wazuh-dashboard
    hostname: wazuh-dashboard
    environment:
      - INDEXER_USERNAME=admin
      - INDEXER_PASSWORD=${INDEXER_PASSWORD}
      - WAZUH_API_URL=https://wazuh-manager
      - DASHBOARD_USERNAME=kibanaserver
      - DASHBOARD_PASSWORD=${DASHBOARD_PASSWORD}
      - API_USERNAME=wazuh-wui
      - API_PASSWORD=${API_PASSWORD}
    volumes:
      - wazuh_dashboard_config:/usr/share/wazuh-dashboard/data/wazuh/config
      - wazuh_dashboard_custom:/usr/share/wazuh-dashboard/plugins/wazuh/public/assets/custom
    ports:
      - "443:5601"
    depends_on:
      - wazuh-manager
    networks:
      - wazuh-network

volumes:
  wazuh_indexer_data:
  wazuh_api_config:
  wazuh_etc:
  wazuh_logs:
  wazuh_queue:
  wazuh_dashboard_config:
  wazuh_dashboard_custom:

networks:
  wazuh-network:
    driver: bridge
```

## .env

```bash
# Wazuh
INDEXER_PASSWORD=SecretPassword
DASHBOARD_PASSWORD=SecretPassword
API_PASSWORD=SecretPassword
```

## Usage notes

- Dashboard at https://localhost:443
- Default user: admin
- Install agents on monitored systems
- Compliance modules included
- Use official installer for production

## Troubleshooting

- Bootstrap check failures on indexer startup: Increase vm.max_map_count to 262144 on Docker host
- Wazuh agents showing as disconnected: Verify firewall allows TCP 1514/1515 and agent manager IP configuration
- Dashboard login fails with SSL errors: Check certificate validity and browser security settings for self-signed certificates
- High memory usage causing container restarts: Adjust OPENSEARCH_JAVA_OPTS heap size based on available system resources
- Missing security events in dashboard: Verify wazuh-manager to indexer connectivity and check filebeat SSL configuration
- Agent enrollment failures: Ensure agent authentication key matches and manager hostname is resolvable from agent systems

