bolt Valebyte VPS from $4/mo — NVMe, 60s deploy.

Get a VPS arrow_forward
eco Beginner Tutorial/How-to

Wazuh SIEM Deployment on a

calendar_month Sep 07, 2026 schedule 20 min read visibility 24 views
Развёртывание Wazuh SIEM на VPS: комплексный мониторинг безопасности и обнаружение угроз
info

Need a server for this guide? We offer dedicated servers and VPS in 50+ countries with instant setup.

Need a server for this guide?

Deploy a VPS or dedicated server in minutes.

Deploying Wazuh SIEM on a VPS: Comprehensive Security Monitoring and Threat Detection

TL;DR

In this detailed guide, we will set up Wazuh SIEM (Security Information and Event Management) step-by-step on your own VPS. You will get a powerful platform for collecting, analyzing, and correlating security logs, detecting intrusions, monitoring file integrity, and assessing vulnerabilities. This will significantly enhance the security level of your servers and applications, providing proactive protection against cyber threats.

  • Installation and configuration of all Wazuh components: Manager, Indexer (OpenSearch), and Dashboard (OpenSearch Dashboards).
  • Basic server preparation, including SSH setup, firewall configuration, and system updates.
  • Configuration examples for secure HTTPS access using Certbot and Nginx.
  • Recommendations for choosing a suitable VPS configuration and scaling.
  • Backup and maintenance strategies for long-term system stability.
  • Answers to frequently asked questions and solutions to common problems.

What we are setting up and why

Diagram: What we are setting up and why
Diagram: What we are setting up and why

We will be deploying Wazuh — a free and open-source security monitoring platform that combines SIEM, XDR (Extended Detection and Response), and SOAR (Security Orchestration, Automation and Response) functionalities. Wazuh allows you to collect, index, and analyze security data from various sources, such as operating system logs, applications, network devices, as well as real-time security events. At its core, Wazuh features a powerful engine for threat detection, file integrity monitoring, vulnerability analysis, incident response, and compliance.

Ultimately, you will get a centralized system that will monitor the security of your VPS or even an entire infrastructure. Wazuh will help you to:

  • Detect intrusions: identify suspicious activity, brute-force attempts, and anomalies in user and process behavior.
  • Monitor file integrity: track unauthorized changes in critical system files and configurations.
  • Assess vulnerabilities: scan installed software for known vulnerabilities (CVEs).
  • Collect and analyze logs: centralize logs from all your systems for easy searching, analysis, and auditing.
  • Respond to incidents: automatically perform actions in response to detected threats, such as blocking IP addresses.
  • Comply with standards: simplify the auditing process and compliance with standards such as PCI DSS, GDPR, HIPAA.

There are various approaches to deploying SIEM systems. You can choose cloud-managed solutions (e.g., Splunk Cloud, Azure Sentinel) or self-hosted deployment. Cloud solutions offer convenience and scalability without the need for infrastructure management, but often come with high costs and less control over data. Self-hosting Wazuh on a VPS, on the other hand, provides full control over your data and infrastructure, significantly reduces operational costs, and allows deep customization of the system to your unique requirements. This is an ideal option for VPS/dedicated server owners who want to build a reliable security system with minimal investment and maximum flexibility.

What VPS configuration is needed for this task

Diagram: What VPS configuration is needed for this task
Diagram: What VPS configuration is needed for this task

Choosing the right VPS configuration for Wazuh is critical, as the system can be quite resource-intensive, especially the Indexer (OpenSearch), which stores and indexes all logs. Requirements heavily depend on the volume of logs generated and the number of monitored agents.

Minimum requirements for a single VPS (Wazuh Manager, Indexer, Dashboard on one machine) for small environments (up to 20-30 agents)

  • CPU: 4 vCPU (virtual cores). This will provide sufficient performance for indexing and event processing.
  • RAM: 8-12 GB RAM. OpenSearch is the primary memory consumer; it will require at least 4-6 GB for stable operation, with the rest for Wazuh Manager and the operating system.
  • Disk: 100-200 GB NVMe SSD. Disk speed is critical for OpenSearch. The volume depends on the log retention period. NVMe SSD significantly outperforms regular SSDs in terms of performance.
  • Network: 1 Gbit/s. For log transmission and dashboard access.

Specific VPS plan for the task (for 30-50 agents)

For more active use, monitoring 30-50 agents, and storing logs for several weeks, we recommend the following basic configuration:

  • CPU: 6-8 vCPU
  • RAM: 16 GB RAM
  • Disk: 200-300 GB NVMe SSD
  • Network: 1 Gbit/s

A VPS with the specified characteristics will ensure comfortable Wazuh operation for most small and medium-sized projects. It is important to remember that these figures are a starting point, and actual needs may change depending on your workload.

When a dedicated server is needed, not a VPS

If you plan to monitor more than 100-200 agents, store logs for a long period (several months), or process a very large volume of data (e.g., logs from high-load web servers), then you should consider a dedicated server. Dedicated servers offer guaranteed resources, higher disk subsystem performance, and often a better price/performance ratio for heavy workloads. For example, a large deployment might require a server with 16+ physical cores, 64+ GB RAM, and several TB of NVMe SSD in a RAID array. In such cases, you should consider a suitable dedicated server to ensure the necessary performance and reliability.

Location: what it affects

The choice of VPS location affects several factors:

  • Latency: The closer the server is to your agents and dashboard users, the lower the latency and faster the response.
  • Legislation: Choose a location that complies with your data storage requirements and privacy laws (e.g., EU for GDPR).
  • Cost: VPS prices can vary depending on the region.

It is generally recommended to choose a location that is geographically close to most of your monitored systems.

Server preparation

Diagram: Server preparation
Diagram: Server preparation

Before installing Wazuh, you need to perform basic preparation of your Ubuntu 24.04 LTS-based VPS. This includes creating a secure user, configuring SSH, the firewall, and updating the system.

1. Connecting via SSH

First, connect to your new VPS as the root user (or the one provided by your provider):


ssh root@ВАШ_IP_АДРЕС

2. Creating a new user with sudo privileges

Working as root is insecure. Let's create a new user and add them to the sudo group.


adduser wazuhadmin
usermod -aG sudo wazuhadmin

Replace wazuhadmin with your chosen username. You will be prompted to set a password and enter additional information (which can be skipped).

3. Configuring SSH keys for the new user (recommended)

For increased security, it is recommended to use SSH keys instead of passwords. Copy your public SSH key to the server.


su - wazuhadmin
mkdir -p ~/.ssh
chmod 700 ~/.ssh
exit

Now, copy your public key (which is on your local machine, usually in ~/.ssh/id_rsa.pub) to the server:


cat ~/.ssh/id_rsa.pub | ssh wazuhadmin@ВАШ_IP_АДРЕС "cat >> ~/.ssh/authorized_keys"

Make sure the permissions for authorized_keys are set correctly:


ssh wazuhadmin@ВАШ_IP_АДРЕС "chmod 600 ~/.ssh/authorized_keys"

4. Disabling password login for SSH (optional, but recommended)

Edit the SSH server configuration file to allow key-only login.


sudo nano /etc/ssh/sshd_config

Find and change the following lines:


#PasswordAuthentication yes
PasswordAuthentication no
#PermitRootLogin prohibit-password
PermitRootLogin no

Save changes (Ctrl+O, Enter) and exit (Ctrl+X). Restart the SSH service:


sudo systemctl restart sshd

Before disconnecting from root, ensure you can log in as wazuhadmin using your SSH key in a new terminal.


ssh wazuhadmin@ВАШ_IP_АДРЕС

If the login is successful, you can close the root session.

5. Configuring the firewall (UFW)

We will install and configure UFW (Uncomplicated Firewall) to allow only necessary ports.


sudo apt update && sudo apt install ufw -y

Allow SSH (port 22), Wazuh Manager (1514/TCP, 55000/TCP), OpenSearch (9200/TCP), and OpenSearch Dashboards (443/TCP for HTTPS).


sudo ufw allow 22/tcp comment 'SSH'
sudo ufw allow 1514/tcp comment 'Wazuh Agent communication'
sudo ufw allow 55000/tcp comment 'Wazuh API'
sudo ufw allow 9200/tcp comment 'OpenSearch REST API'
sudo ufw allow 443/tcp comment 'HTTPS for OpenSearch Dashboards'
sudo ufw enable
sudo ufw status verbose

Confirm firewall activation by typing y.

6. Installing Fail2Ban (recommended)

Fail2Ban will help protect against brute-force attacks on SSH and other services.


sudo apt install fail2ban -y
sudo systemctl enable fail2ban
sudo systemctl start fail2ban
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
sudo nano /etc/fail2ban/jail.local

In the jail.local file, find the [sshd] section and ensure it is enabled (enabled = true). You can also configure bantime (block duration) and maxretry (number of attempts).


[sshd]
enabled = true
port = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s

Save and exit. Restart Fail2Ban.


sudo systemctl restart fail2ban
sudo fail2ban-client status sshd

7. Updating the system and installing basic utilities

Ensure all packages are updated and install necessary utilities.


sudo apt update && sudo apt upgrade -y
sudo apt install curl wget apt-transport-https gnupg2 -y

Your server is now ready for Wazuh installation.

Software Installation — Step-by-Step

Diagram: Software Installation — Step-by-Step
Diagram: Software Installation — Step-by-Step

We will install Wazuh 5.0 (current version for 2026) in a unified architecture (Manager, Indexer, Dashboard on a single server) using official repositories.

1. Java Development Kit (JDK) Installation

OpenSearch (Indexer) requires Java. We will install OpenJDK 17.


sudo apt install openjdk-17-jdk -y # Install OpenJDK 17
java -version # Check Java version

2. Adding the Wazuh Repository

We will add the official Wazuh repository and its GPG key.


curl -s https://packages.wazuh.com/key/GPG-KEY-WAZUH | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/wazuh.gpg > /dev/null # Add Wazuh GPG key
echo "deb https://packages.wazuh.com/5.x/apt/ stable main" | sudo tee -a /etc/apt/sources.list.d/wazuh.list # Add Wazuh 5.x repository
sudo apt update # Update package list

3. Wazuh Indexer (OpenSearch) Installation

We will install Wazuh Indexer, which is a fork of OpenSearch. Wazuh 5.0 will use OpenSearch 2.x.


sudo apt install wazuh-indexer -y # Install Wazuh Indexer

After installation, it is necessary to generate certificates for secure communication between components. Wazuh provides a utility for this.


sudo /usr/share/wazuh-indexer/bin/indexer-cert-tool.sh # Run certificate generation utility

This utility will create the necessary certificate files (admin-key.pem, admin.pem, node-key.pem, node.pem, ca.pem) in the current directory. We will move them to the required locations.


sudo mkdir /etc/wazuh-indexer/certs
sudo mv ~/admin-key.pem ~/admin.pem ~/node-key.pem ~/node.pem ~/ca.pem /etc/wazuh-indexer/certs/ # Move certificates
sudo chown -R wazuh-indexer:wazuh-indexer /etc/wazuh-indexer/certs # Set correct permissions
sudo chmod -R 500 /etc/wazuh-indexer/certs # Restrict access to certificates
sudo chmod 400 /etc/wazuh-indexer/certs/key.pem # Restrict access to private keys

Now, edit the Indexer configuration to use these certificates. Open the file /etc/wazuh-indexer/opensearch.yml.


sudo nano /etc/wazuh-indexer/opensearch.yml

Add or modify the following lines:


# ---------------------------------- Network -----------------------------------
network.host: 0.0.0.0 # Allow access from all interfaces
http.port: 9200 # Standard HTTP port
# --------------------------------- Security ---------------------------------
plugins.security.ssl.http.enabled: true
plugins.security.ssl.http.pemcert_filepath: /etc/wazuh-indexer/certs/node.pem
plugins.security.ssl.http.pemkey_filepath: /etc/wazuh-indexer/certs/node-key.pem
plugins.security.ssl.http.rootcas_filepath: /etc/wazuh-indexer/certs/ca.pem
plugins.security.ssl.transport.enabled: true
plugins.security.ssl.transport.pemcert_filepath: /etc/wazuh-indexer/certs/node.pem
plugins.security.ssl.transport.pemkey_filepath: /etc/wazuh-indexer/certs/node-key.pem
plugins.security.ssl.transport.rootcas_filepath: /etc/wazuh-indexer/certs/ca.pem
plugins.security.ssl.transport.enforce_hostname_verification: false
plugins.security.allow_unsafe_democertificates: true # Temporarily for simplification, in production it's better to use your own CAs
plugins.security.nodes_dn:
  - "CN=.wazuh-indexer.local" # Replace with your FQDN if you are using one

Save and exit. Now you can start and check the Indexer.


sudo systemctl daemon-reload # Reload systemd units
sudo systemctl enable wazuh-indexer # Enable Indexer autostart
sudo systemctl start wazuh-indexer # Start Indexer
sudo systemctl status wazuh-indexer # Check Indexer status

Wait a few minutes for the Indexer to fully start. You can check its functionality by accessing the API:


curl -XGET https://localhost:9200 -u admin:admin -k # Check OpenSearch API availability (default login/password admin:admin)

You should receive a JSON response with cluster information.

4. Wazuh Manager Installation

Wazuh Manager is the core of the system, which processes, analyzes, and correlates data from agents.


sudo apt install wazuh-manager -y # Install Wazuh Manager

After installation, you need to configure the Manager to communicate with the Indexer. Edit the file /etc/wazuh/wazuh_indexer.yaml.


sudo nano /etc/wazuh/wazuh_indexer.yaml

Specify the IP address or FQDN of your Indexer (in this case, localhost).


# Configuration for connection to Wazuh Indexer
# This file is managed by the wazuh-manager package.
# Do not edit this file directly, use the /etc/wazuh/wazuh_indexer.yaml.template file instead.

---
nodes:
  - address: "localhost" # Change to the IP address or FQDN of your Indexer
port: 9200
# SSL configuration
# If using custom certificates for the Wazuh Indexer, specify the path to the CA certificate.
# Otherwise, the default certificates generated by the Wazuh Indexer will be used.
ssl_certificate_authorities:
  - "/etc/wazuh-indexer/certs/ca.pem" # Path to the Indexer's CA certificate

Save and exit. Now start the Manager.


sudo systemctl enable wazuh-manager # Enable Manager autostart
sudo systemctl start wazuh-manager # Start Manager
sudo systemctl status wazuh-manager # Check Manager status

5. Wazuh Dashboard (OpenSearch Dashboards) Installation

Wazuh Dashboard provides a web interface for visualizing and managing security data.


sudo apt install wazuh-dashboard -y # Install Wazuh Dashboard

Similar to the Indexer, the Dashboard also needs certificates for secure operation. We will use the same certificates as for the Indexer.


sudo mkdir /etc/wazuh-dashboard/certs
sudo cp /etc/wazuh-indexer/certs/ca.pem /etc/wazuh-indexer/certs/node.pem /etc/wazuh-indexer/certs/node-key.pem /etc/wazuh-dashboard/certs/ # Copy certificates
sudo chown -R wazuh-dashboard:wazuh-dashboard /etc/wazuh-dashboard/certs # Set correct permissions
sudo chmod -R 500 /etc/wazuh-dashboard/certs # Restrict access to certificates
sudo chmod 400 /etc/wazuh-dashboard/certs/key.pem # Restrict access to private keys

Edit the Dashboard configuration file /etc/wazuh-dashboard/opensearch_dashboards.yml.


sudo nano /etc/wazuh-dashboard/opensearch_dashboards.yml

Add or modify the following lines:


server.host: "0.0.0.0" # Allow access from all interfaces
server.port: 443 # Use standard HTTPS port 443
opensearch.hosts: ["https://localhost:9200"] # Specify Indexer address
opensearch.ssl.verificationMode: none # Temporarily disable SSL verification, as we are using self-signed certificates
opensearch.ssl.certificate: /etc/wazuh-dashboard/certs/node.pem
opensearch.ssl.key: /etc/wazuh-dashboard/certs/node-key.pem
opensearch.ssl.certificateAuthorities: ["/etc/wazuh-dashboard/certs/ca.pem"]
# Wazuh API configuration
wazuh.manager.host: "https://localhost" # Wazuh Manager address
wazuh.manager.port: 55000 # Wazuh API port
wazuh.manager.ssl.verify: false # Disable SSL verification for Wazuh API

Save and exit. Now start the Dashboard.


sudo systemctl enable wazuh-dashboard # Enable Dashboard autostart
sudo systemctl start wazuh-dashboard # Start Dashboard
sudo systemctl status wazuh-dashboard # Check Dashboard status

Wait a few minutes for the Dashboard to fully start. After that, you will be able to access the web interface at https://YOUR_IP_ADDRESS. The default login and password for OpenSearch Dashboards are admin:admin.

Configuration

Diagram: Configuration
Diagram: Configuration

After the basic installation of Wazuh Manager, Indexer, and Dashboard, additional configuration is required to enhance security and usability. We will focus on configuring TLS/HTTPS for the Dashboard via Certbot and Nginx, as well as basic health checks.

1. Configuring Nginx as a Reverse Proxy for Wazuh Dashboard

Although Wazuh Dashboard can run directly on port 443, using Nginx as a reverse proxy provides more flexibility, allows easy integration of Certbot for automatic issuance of Let's Encrypt SSL certificates, and centralizes traffic management.

1.1. Nginx Installation

sudo apt install nginx -y # Install Nginx
sudo systemctl enable nginx # Enable Nginx autostart
sudo systemctl start nginx # Start Nginx
1.2. Creating Nginx Configuration for Wazuh Dashboard

We will disable Wazuh Dashboard from listening directly on port 443 and configure Nginx. First, change the Dashboard port to avoid conflicts with Nginx. Open /etc/wazuh-dashboard/opensearch_dashboards.yml.


sudo nano /etc/wazuh-dashboard/opensearch_dashboards.yml

Change server.port to, for example, 5601:


server.port: 5601 # Change port for Dashboard

Save and exit. Restart the Dashboard:


sudo systemctl restart wazuh-dashboard

Now, create a new Nginx configuration file for your domain (e.g., wazuh.yourdomain.com).


sudo nano /etc/nginx/sites-available/wazuh.yourdomain.com

Insert the following configuration, replacing wazuh.yourdomain.com with your actual domain:


server {
    listen 80;
    listen [::]:80;
    server_name wazuh.yourdomain.com;
    return 301 https://$host$request_uri; # Redirect HTTP to HTTPS
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name wazuh.yourdomain.com;

    ssl_certificate /etc/letsencrypt/live/wazuh.yourdomain.com/fullchain.pem; # Will be generated by Certbot
    ssl_certificate_key /etc/letsencrypt/live/wazuh.yourdomain.com/privkey.pem; # Will be generated by Certbot
    ssl_session_cache shared:SSL:10m;
    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";
    ssl_prefer_server_ciphers on;

    location / {
        proxy_pass http://localhost:5601; # Proxy to Dashboard port
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_buffering off;
        proxy_http_version 1.1;
        proxy_set_header Connection "Keep-Alive";
        proxy_set_header Proxy-Connection "Keep-Alive";
        proxy_read_timeout 600s;
        proxy_send_timeout 600s;
    }
}

Save and exit. Activate the configuration and check Nginx syntax:


sudo ln -s /etc/nginx/sites-available/wazuh.yourdomain.com /etc/nginx/sites-enabled/ # Create symbolic link
sudo nginx -t # Check Nginx syntax
sudo systemctl restart nginx # Restart Nginx

2. Install Certbot and obtain a Let's Encrypt SSL certificate

Now that Nginx is configured, we will obtain a free SSL certificate from Let's Encrypt using Certbot.

2.1. Certbot Installation

sudo apt install certbot python3-certbot-nginx -y # Install Certbot and Nginx plugin
2.2. Obtaining the certificate

Ensure that your domain (wazuh.yourdomain.com) points to your VPS's IP address in your DNS records. Then execute:


sudo certbot --nginx -d wazuh.yourdomain.com # Run Certbot to obtain the certificate

Certbot will ask a few questions (email, agreement to terms, HTTP to HTTPS redirection). Choose automatic redirection. Certbot will automatically modify the Nginx configuration, adding certificate paths. Upon successful completion, you will see a message indicating that the certificate has been successfully installed. Certbot will also configure automatic certificate renewal.

3. Health Check

Now that everything is configured, let's check Wazuh's accessibility and functionality.

  • Dashboard Access: Open a web browser and navigate to https://wazuh.yourdomain.com. You should see the Wazuh Dashboard login page with a valid SSL certificate. Use the login admin and password admin (default) to log in.
  • Check service status:
  • 
    sudo systemctl status wazuh-manager wazuh-indexer wazuh-dashboard nginx # Check status of all services
    
  • Check Wazuh Manager API:
  • 
    curl -u wazuh:wazuh -k "https://localhost:55000/api/overview/info" # Check Manager API
    

    You should receive a JSON response with Manager information. The default password for the Manager API is wazuh.

4. Changing Default Passwords

VERY IMPORTANT: Change the default passwords for Indexer/Dashboard (admin:admin) and Wazuh API (wazuh:wazuh) immediately after installation. Instructions for changing passwords can be found in the official Wazuh documentation, as the process may vary for different versions. This is typically done via OpenSearch or Wazuh CLI utilities.

For Indexer/Dashboard: use the securityadmin.sh utility (for OpenSearch 2.x):


sudo /usr/share/wazuh-indexer/plugins/opensearch-security/tools/wazuh-passwords-tool.sh # Interactive tool for changing passwords

For Wazuh API: change the password in the /var/ossec/etc/ossec.conf file in the section or use the agent_auth utility to generate a new API key.

Backups and Maintenance

Diagram: Backups and Maintenance
Diagram: Backups and Maintenance

Regular backups and timely maintenance are key aspects to ensure the stability and security of your Wazuh SIEM system.

1. What to Back Up

The following components are critically important for Wazuh SIEM:

  • Indexer Data (OpenSearch): This is the largest and most important part. All collected logs and security events are stored here. Indices need to be backed up.
  • Wazuh Manager Configuration: Files in /var/ossec/etc/, especially ossec.conf, agent_keys (although they can be restored by re-registering agents), decoders, rules, and shared.
  • Wazuh Dashboard Configuration: The /etc/wazuh-dashboard/opensearch_dashboards.yml file and any custom visualizations/dashboards, if not stored in the Indexer.
  • Certificates: All generated and used SSL/TLS certificates (e.g., in /etc/wazuh-indexer/certs/, /etc/wazuh-dashboard/certs/, /etc/letsencrypt/).

2. Simple Auto-Backup Script for Configurations

For configuration files, a simple script with rsync or tar, run by cron, can be used. For Indexer data, it's better to use OpenSearch's built-in mechanisms.

Example script for backing up configurations (/opt/wazuh-backup.sh):


#!/bin/bash

# Directory for temporary backups
BACKUP_DIR="/var/backups/wazuh_configs"
DATE=$(date +%Y%m%d_%H%M%S)
BACKUP_FILE="${BACKUP_DIR}/wazuh_configs_${DATE}.tar.gz"

# Create directory if it doesn't exist
mkdir -p "$BACKUP_DIR"

# Archive critical files
tar -czf "$BACKUP_FILE" \
    /var/ossec/etc/ossec.conf \
    /var/ossec/etc/agent_keys \
    /var/ossec/etc/decoders \
    /var/ossec/etc/rules \
    /var/ossec/etc/shared \
    /etc/wazuh-indexer/opensearch.yml \
    /etc/wazuh-indexer/certs/ \
    /etc/wazuh-dashboard/opensearch_dashboards.yml \
    /etc/wazuh-dashboard/certs/ \
    /etc/nginx/sites-available/wazuh.yourdomain.com \
    /etc/letsencrypt/live/wazuh.yourdomain.com/ \
    /etc/letsencrypt/archive/wazuh.yourdomain.com/

# Delete old backups (e.g., older than 7 days)
find "$BACKUP_DIR" -type f -name "*.tar.gz" -mtime +7 -delete

echo "Backup of Wazuh configurations completed: $BACKUP_FILE"

Make the script executable:


sudo chmod +x /opt/wazuh-backup.sh

Add it to crontab for daily execution (e.g., at 3 AM):


sudo crontab -e

Add the line:


0 3 * * * /opt/wazuh-backup.sh > /dev/null 2>&1

3. Where to Store Backups

Local storage of backups on the same server is susceptible to data loss in case of server failure. Remote storage is recommended:

  • Cloud Storage (S3-compatible): AWS S3, DigitalOcean Spaces, Backblaze B2. Utilities like s3cmd or rclone can be used for this.
  • Separate VPS: Set up a second VPS as a backup storage and use rsync over SSH for synchronization.
  • Network Storage (NFS/SMB): If you have a local network.

4. Indexer Data Backup (OpenSearch Snapshots)

OpenSearch has built-in snapshots functionality for creating incremental backups of indices. To do this, you need to register a repository (e.g., S3 or a local path) and then create snapshots.

Example of registering a local repository (for testing):


sudo mkdir /var/lib/wazuh-indexer/snapshots # Create directory for snapshots
sudo chown wazuh-indexer:wazuh-indexer /var/lib/wazuh-indexer/snapshots # Set permissions

Then via the Indexer API:


curl -XPUT "https://localhost:9200/_snapshot/my_backup_repository" -u admin:admin -k -H 'Content-Type: application/json' -d '{
  "type": "fs",
  "settings": {
    "location": "/var/lib/wazuh-indexer/snapshots"
  }
}'

And creating a snapshot:


curl -XPUT "https://localhost:9200/_snapshot/my_backup_repository/snapshot_1?wait_for_completion=true" -u admin:admin -k

In production, it is recommended to use S3-compatible repositories and automate snapshot creation via Index State Management or cron.

5. Updates: rolling vs maintenance window

Updating Wazuh and its components requires a careful approach.

  • Wazuh Manager/Indexer/Dashboard: For small deployments on a single VPS, use a "maintenance window" approach. Schedule a time when system downtime will be least critical. Stop all services, update packages, and then start them. Always read the official release notes before updating, as there may be changes in configuration or procedure.
  • 
    sudo systemctl stop wazuh-dashboard wazuh-manager wazuh-indexer
    sudo apt update && sudo apt upgrade -y # Update all packages
    sudo systemctl start wazuh-indexer wazuh-manager wazuh-dashboard
    
  • Wazuh Agents: Agents can be updated "rolling" (gradually) to avoid mass downtime. Wazuh provides remote agent update functionality via API or Kibana.
  • System: Regularly update the operating system (sudo apt update && sudo apt upgrade -y) to receive security patches.

Always make a backup before major updates!

Troubleshooting + FAQ

This section collects common problems and answers to frequently asked questions that may arise during the deployment and operation of Wazuh SIEM.

Unable to connect to Wazuh Dashboard via browser.

What to check:

  1. Ensure that Nginx and Wazuh Dashboard are running: sudo systemctl status nginx wazuh-dashboard.
  2. Check that port 443 is open in the firewall: sudo ufw status.
  3. Check Nginx logs (sudo tail -f /var/log/nginx/error.log) and Wazuh Dashboard logs (sudo tail -f /var/log/wazuh-dashboard/wazuh-dashboard.log) for errors.
  4. Make sure the domain name correctly points to your VPS's IP address.

How to fix: Restart the services. If the problem is with Nginx, check its configuration (sudo nginx -t). If it's with the Dashboard, ensure it's configured to the correct port (e.g., 5601) and that the Indexer is accessible.

Wazuh Indexer (OpenSearch) does not start or runs unstably.

What to check:

  1. Check Indexer logs: sudo journalctl -u wazuh-indexer -f or sudo tail -f /var/log/wazuh-indexer/wazuh-indexer.log.
  2. Ensure there is enough RAM. OpenSearch is very demanding on RAM.
  3. Check free disk space: df -h.
  4. Check the /etc/wazuh-indexer/opensearch.yml configuration for errors, especially certificate paths.

How to fix: Increase the RAM for your VPS, if possible. Free up disk space. Correct configuration errors and restart the service.

Wazuh agents are not connecting to the Manager.

What to check:

  1. Ensure that Wazuh Manager is running: sudo systemctl status wazuh-manager.
  2. Check that port 1514/TCP is open in your VPS firewall: sudo ufw status.
  3. Check Manager logs: sudo journalctl -u wazuh-manager -f.
  4. Ensure that agents are configured to the correct Manager IP address/FQDN and are using the correct key.

How to fix: Check network connectivity between the agent and the Manager (telnet YOUR_IP_ADDRESS 1514). Ensure that agent keys are correctly imported and used. Restart the agent on the client machine.

What is the minimum suitable VPS configuration?

For a test deployment or a very small environment (up to 10 agents), you can start with a VPS with 2-4 vCPU, 8 GB RAM, and 100 GB NVMe SSD. However, for stable operation and data retention for a reasonable period (several weeks), at least 4 vCPU, 12-16 GB RAM, and 200 GB NVMe SSD are recommended. Smaller configurations may lead to slower indexing and performance issues as log volume grows.

What to choose — VPS or dedicated for this task?

The choice between a VPS and a dedicated server depends on the scale of your infrastructure and the volume of data. For small to medium deployments (up to 50-100 agents) with moderate log volume, a VPS with good specifications (as described above) will be sufficient and cost-effective. If you plan to monitor hundreds of agents, process terabytes of logs, require long-term data retention, or demand maximum performance and predictability, then a dedicated server with a high-performance CPU, large amount of RAM, and a fast disk array will be preferable. Dedicated servers provide exclusive access to all physical resources, which is critical for high-load SIEM systems.

How to update Wazuh to a new version?

Updating Wazuh typically involves stopping all components (Indexer, Manager, Dashboard), updating packages via the package manager (apt upgrade), and then sequentially starting them. Always check the official Wazuh documentation for the specific version you are upgrading to, as there may be special steps or configuration changes. Before updating, always make a full system backup.

How to change the password for the admin Dashboard user?

The password for the admin user in Wazuh Dashboard (OpenSearch Dashboards) is managed by OpenSearch. To change it, you need to use the wazuh-passwords-tool.sh utility, which is located in the Indexer's security plugins directory. Run it with sudo privileges, and it will interactively prompt you to change passwords for various users, including admin. After changing the password, you may need to restart the Indexer and Dashboard.

Conclusions and Next Steps

Diagram: Conclusions and next steps
Diagram: Conclusions and next steps

We have successfully deployed a comprehensive Wazuh SIEM system on a single VPS, configuring all necessary components: Wazuh Manager, Indexer (OpenSearch), and Dashboard (OpenSearch Dashboards). You now have a powerful tool for security monitoring, threat detection, and centralized log management. This significantly enhances the transparency and security of your infrastructure.

To make the most effective use of your new SIEM system, consider the following steps:

  1. Agent Deployment: Install Wazuh agents on all your servers, workstations, and cloud instances that you want to monitor. This will allow you to collect data from all sources.
  2. Fine-tuning Rules and Decoders: Explore the Wazuh documentation to create your own threat detection rules and log decoders specific to your applications and infrastructure.
  3. Integration with Other Systems: Consider integrating Wazuh with notification systems (Slack, Telegram, email), ticketing systems (Jira), or other security tools to automate incident response.
  4. Performance Monitoring: Regularly monitor the performance of your VPS and Wazuh components to ensure the system can handle the data volume, and if necessary, consider scaling (increasing VPS resources or transitioning to a cluster architecture).

Was this guide helpful?

Your feedback helps us improve our guides.

Share this post:

Send this guide to someone who may find it useful.

Telegram VKVK WhatsApp Facebook LinkedIn XX

Wazuh SIEM Deployment on VPS: Comprehensive Security Monitoring and Threat Detection
support_agent
Valebyte Support
Usually replies within minutes
Hi there!
Send us a message and we'll reply as soon as possible.