Tutorials

Hands-on guides and configuration examples.

Configuration library · scripts and downloads ↗

Install Wazuh on Debian 13 with Docker

Wazuh collects and analyzes security events. The manager receives agent data, the indexer stores alerts and the dashboard lets you inspect them.

This guide deploys the three Wazuh 4.14.10 components in a Debian 13 VM with the official single-node Compose stack.

You will enroll a Linux agent, then verify that creating, modifying and deleting a file produces dashboard events.

  1. Prepare the Debian 13 VM

    Allow at least 4 cores, 8 GB of RAM and 50 GB of storage for the single-node deployment. Install Docker Engine and Compose. Set vm.max_map_count to at least 262144 on the Docker host for the indexer.

    Terminal
    sudo apt update && sudo apt install git
    map_count=$(sysctl -n vm.max_map_count)
    if [ "$map_count" -lt 262144 ]; then map_count=262144; fi
    printf 'vm.max_map_count=%s\n' "$map_count" | sudo tee /etc/sysctl.d/99-wazuh-max-map-count.conf
    sudo sysctl --system
    sysctl vm.max_map_count

    On Proxmox, run these commands inside the VM hosting Docker. The last line should show 262144 or higher.

  2. Get the Compose stack and limit exposed ports

    Clone the release shown below. In single-node/docker-compose.yml, edit the ports blocks before the first startup. Keep the supplied images and volumes.

    • Dashboard. Replace the 443:443 mapping with "127.0.0.1:8443:443" so access stays on the host and through the SSH tunnel.
    • Manager. Replace the 1514 and 1515 mappings with "192.168.50.20:1514:1514" and "192.168.50.20:1515:1515". Use the VM’s real private IP. Restrict access to the agent network at the upstream firewall.
    • Remove host mappings for 514/UDP and 55000 from the manager and the indexer ports block for 9200. Services still communicate over Docker’s internal network. Keep these ports and the dashboard out of internet port forwarding.
    Terminal
    git clone --depth 1 --branch v4.14.10 https://github.com/wazuh/wazuh-docker.git
    cd wazuh-docker/single-node
  3. Generate certificates and start the stack

    From single-node, validate Compose, generate internal certificates and start the services. Wait for the indexer before opening the dashboard.

    Terminal
    sudo docker compose config --quiet &&
    sudo docker compose -f generate-indexer-certs.yml run --rm generator &&
    sudo docker compose up -d
    sudo docker compose ps

    If the dashboard stays unavailable, run sudo docker compose logs --tail=100 wazuh.indexer wazuh.dashboard. Check RAM, vm.max_map_count and the certificate files.

  4. Open the dashboard and rotate credentials

    From your computer, open an SSH tunnel to the VM’s actual IP, then visit https://127.0.0.1:8443. Verify the lab’s self-signed certificate before signing in.

    • For initial lab access, this version supplies admin / SecretPassword. Then rotate the default indexer and API credentials using the official procedure.
    • Indexer rotation involves the hash in internal_users.yml, the Compose values and applying the security configuration. Keep the manager and dashboard in sync when rotating API credentials.
    Terminal
    ssh -N -L 127.0.0.1:8443:127.0.0.1:8443 user@192.168.50.20
  5. Enroll a Linux agent

    In the dashboard, open Agents management → Summary → Deploy new agent. Select DEB and the endpoint architecture. Enter the manager’s private IP, for example 192.168.50.20, and a unique agent name.

    • Run the generated install command on the client VM, then enable the service below. Use the same agent and manager version for this lab.
    • Check that the agent becomes Active. TCP 1515 handles enrollment and TCP 1514 handles agent traffic. If it fails, check the manager IP, both ports and ossec.log.
    Terminal
    sudo systemctl enable --now wazuh-agent
    sudo systemctl status wazuh-agent --no-pager
    sudo tail -n 30 /var/ossec/logs/ossec.log
  6. Monitor a test directory

    On the client VM, create the directory with sudo install -d -o "$(id -u)" -g "$(id -g)" -m 0750 /var/tmp/wazuh-lab. Edit /var/ossec/etc/ossec.conf and add the following line inside the existing syscheck block.

    /var/ossec/etc/ossec.conf
    <directories realtime="yes">/var/tmp/wazuh-lab</directories>

    Check that syscheck is enabled. Run sudo systemctl restart wazuh-agent. Wait for the initial scan to finish and real-time monitoring to start in /var/ossec/logs/ossec.log.

  7. Trigger an alert and verify it arrives

    Run this on the client VM with the account that created the directory. It creates a temporary file, modifies it and removes only that file.

    • In File Integrity Monitoring → Events, select your agent and a recent time range. Filter with rule.id:550 or rule.id:553 or rule.id:554. Check that the path matches the test file.
    • If the agent is Active but no alert appears, check syscheck, the initial scan and the manager and indexer logs. Preserve the Compose file, certificates and volumes during maintenance. Avoid docker compose down -v when preserving data.
    Terminal
    test_file=$(mktemp /var/tmp/wazuh-lab/test.XXXXXX) &&
    sleep 5 &&
    printf 'Wazuh FIM test\n' >> "$test_file" &&
    sleep 5 &&
    rm -- "$test_file"
Official Wazuh Docker documentation ↗