Managing three to five or more Ubuntu servers quickly leads to a “blind spot” problem. SSH logs are scattered across individual machines. A web server might get scanned all night without you noticing until the next morning, or a newly disclosed CVE might hit OpenSSL before you have a chance to audit your fleet. Standalone tools like Fail2ban only act locally on each node, leaving you with no central place to aggregate logs and correlate events.
Wazuh SIEM solves this cleanly without licensing fees. It combines both SIEM and XDR capabilities into a single dashboard, while remaining lightweight enough to run smoothly on a modestly sized VPS. This guide walks straight through installing, connecting agents, and fine-tuning Wazuh on Ubuntu 24.04 LTS.
Quick Start: Install Wazuh SIEM in 5 Minutes on Ubuntu 24.04
An All-in-One deployment (comprising the Server, Indexer, and Dashboard) can easily handle environments with fewer than 15 agents. Your Ubuntu 24.04 server needs at least 4GB of RAM, 2 vCPUs, and 50GB of free SSD space. First, update your system packages and run the official installation script:
sudo apt update && sudo apt upgrade -y
curl -sO https://packages.wazuh.com/4.9/wazuh-install.sh
sudo bash ./wazuh-install.sh -a
The -a flag handles everything automatically, from installing the services and generating internal SSL certificates to wiring all the components together. The process takes around 3–5 minutes depending on your network speed.
Once finished, the terminal prints the admin username along with a randomly generated password. Copy it right away, then open your browser and navigate to:
https://<WAZUH-SERVER-IP>
Accidentally closed the terminal window? You can still retrieve the password from the tar archive created by the installer:
sudo tar -O -xvf wazuh-install-files.tar wazuh-install-files/wazuh-passwords.txt
Deep Dive: How Does Wazuh Handle Monitoring?
Don’t stop at the login screen. Understanding the data flow between components will help you troubleshoot much faster if an agent disconnects or disk usage spikes unexpectedly.
1. The 3-Component Core Architecture
- Wazuh Indexer: Built on OpenSearch, it stores and indexes all JSON-formatted logs so you can filter events in seconds.
- Wazuh Server (Manager): Receives data from agents and evaluates it against more than 4,000 default rules to catch patterns like SSH brute-force attacks, unauthorized sudo usage, or system file modifications.
- Wazuh Dashboard: A web interface (running on port 443) for viewing alert charts, inspecting raw logs, and exporting compliance reports (PCI-DSS, HIPAA).
2. Installing the Wazuh Agent on Monitored Servers
Installing the Manager alone only monitors the Manager itself. To collect logs from web servers or database servers, you need to deploy the Wazuh Agent on each target machine. Run the following commands on the server you want to monitor (remember to replace 10.0.1.10 with your Wazuh Server’s private IP):
curl -s https://packages.wazuh.com/key/GPG-KEY-WAZUH | sudo gpg --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/wazuh.gpg --import && sudo chmod 644 /usr/share/keyrings/wazuh.gpg
echo "deb [signed-by=/usr/share/keyrings/wazuh.gpg] https://packages.wazuh.com/4.x/apt/ stable main" | sudo tee /etc/apt/sources.list.d/wazuh.list
sudo apt update
sudo WAZUH_MANAGER="10.0.1.10" apt install -y wazuh-agent
sudo systemctl daemon-reload
sudo systemctl enable --now wazuh-agent
Wait about 30 seconds and refresh the Agents tab on the Dashboard. The new host should appear with a green Active status.
3. Enabling Centralized Vulnerability Detection
You no longer need to SSH into every machine to run apt list manually. The Wazuh Agent periodically sends its dpkg package inventory to the Manager, which matches it against CVE feeds from Canonical and NVD. Version 4.9 usually enables this out of the box, but it’s worth double-checking /var/ossec/etc/ossec.conf on the Wazuh Server:
<vulnerability-detection>
<enabled>yes</enabled>
<index-status>yes</index-status>
<feed-update-interval>60m</feed-update-interval>
</vulnerability-detection>
Every 60 minutes, the CVE feed refreshes automatically. If a Critical vulnerability shows up in OpenSSL or the Linux Kernel on Ubuntu 24.04, the Dashboard flags it immediately in red along with the patched version number.
Advanced: Tuning File Integrity Monitoring (FIM) and Reducing Alert Noise
Right after setting up Wazuh, it’s easy to get flooded with false positives—or worse, have someone modify your web application code without triggering a single alert. That happens because the File Integrity Monitoring module (syscheck) only watches core system directories like /etc and /usr/bin by default.
On web servers, open /var/ossec/etc/ossec.conf on the Wazuh Agent to add your source code directory for real-time monitoring. Just be sure to exclude cache and log directories so you don’t bottleneck disk I/O:
<syscheck>
<directories check_all="yes" realtime="yes" report_changes="yes">/var/www/html</directories>
<ignore type="sregex">^/var/www/html/storage/logs|^/var/www/html/cache</ignore>
</syscheck>
When testing this configuration on a staging cluster before rolling it out to Ubuntu 24.04 production, I once forgot the <ignore> tag for the cache directory. As a result, every time the app rendered temporary files, the Agent fired over 3,000 events in just 5 minutes, freezing the Dashboard. Once the proper exclusions were in place, agent CPU usage stayed under 2% and alerts only triggered when PHP or JS files were unexpectedly modified.
After editing the XML file, restart the agent and check the last 30 lines of the log for any syntax errors:
sudo systemctl restart wazuh-agent
sudo tail -n 30 /var/ossec/logs/ossec.log
Practical Tips for Long-Term Wazuh SIEM Operations
- Cap Indexer storage growth: Security logs grow fast—averaging several GB per day for a 10-server fleet. Go to Dashboard → Index Management and configure a policy to delete or compress old indices after 30–90 days so a full disk doesn’t crash OpenSearch.
- Lock down your firewall with UFW: Only open ports
1514(Agent communication) and1515(Agent enrollment) to your private subnet or the static IPs of your monitored servers. Port443for the Dashboard should sit behind an internal VPN or an admin IP allowlist rather than being exposed to the public internet. - Test thoroughly before writing custom rules: When adding custom rules in
/var/ossec/etc/rules/local_rules.xml, even a single unclosed XML tag will preventwazuh-managerfrom restarting. Always run/var/ossec/bin/wazuh-logtestto validate your syntax before reloading the service. - Don’t send every alert to Slack/Telegram: Only route notifications to chat channels for events at level 10 or higher (system file changes, unexpected root logins, malware detections). Keep lower-severity events on the Dashboard for a weekly review.

