$ run as a normal user# run as root (or with sudo)
Know it before you install
Three central parts — the indexer (stores alerts, based on OpenSearch), the server/manager (receives agent data, decodes and matches rules, makes alerts) and the dashboard (web UI). Agents run on every monitored host. Rules have levels 0–15; higher = more serious.
| Item | Value |
|---|---|
| Install | the wazuh-install.sh assistant (all-in-one or distributed) |
| Agent package | wazuh-agent (Linux, Windows, macOS) |
| Config (manager and agent) | /var/ossec/etc/ossec.conf |
| Local rules | /var/ossec/etc/rules/local_rules.xml, decoders in /var/ossec/etc/decoders/ |
| Agent groups | /var/ossec/etc/shared/<group>/agent.conf |
| Ports | 1514/tcp (agent data), 1515/tcp (enrollment), 55000/tcp (API), 9200/tcp (indexer), 443/tcp (dashboard) |
| Size (all-in-one) | 4 vCPU, 8 GB RAM, 50+ GB disk for a small lab (more with many agents and long retention) |
Install the central components (RHEL and Ubuntu)
Use the assistant for your Wazuh version (the path contains the version, here 4.13 — take the current one from the Wazuh docs):
curl -sO https://packages.wazuh.com/4.13/wazuh-install.sh
less wazuh-install.sh
bash ./wazuh-install.sh -a
INFO: --- Summary ---
INFO: You can access the web interface https://<wazuh-dashboard-ip>:443
User: admin
Password: 9Xq…
INFO: Installation finished.
tar -O -xvf wazuh-install-files.tar wazuh-install-files/wazuh-passwords.txt-a installs indexer, server and dashboard on this host with self-signed certificates. Save the passwords from the output (and the wazuh-install-files.tar) in your password manager.
Open the firewall:
firewall-cmd --permanent --add-port={443,1514,1515}/tcp
firewall-cmd --reloadOpen https://SERVER and log in as admin. Change the default passwords with the password tool (wazuh-passwords-tool.sh) if you did not save them.
Add Linux agents
On each host, from the Wazuh repository, with the manager address set at install time:
rpm --import https://packages.wazuh.com/key/GPG-KEY-WAZUH
printf '[wazuh]\nname=Wazuh repository\nbaseurl=https://packages.wazuh.com/4.x/yum/\ngpgcheck=1\ngpgkey=https://packages.wazuh.com/key/GPG-KEY-WAZUH\nenabled=1\n' > /etc/yum.repos.d/wazuh.repo
WAZUH_MANAGER="10.0.0.5" WAZUH_AGENT_GROUP="linux-servers" dnf -y install wazuh-agent
systemctl daemon-reload
systemctl enable --now wazuh-agentOn Ubuntu:
curl -fsSL https://packages.wazuh.com/key/GPG-KEY-WAZUH | gpg --dearmor -o /usr/share/keyrings/wazuh.gpg
echo "deb [signed-by=/usr/share/keyrings/wazuh.gpg] https://packages.wazuh.com/4.x/apt/ stable main" > /etc/apt/sources.list.d/wazuh.list
apt-get update
WAZUH_MANAGER="10.0.0.5" WAZUH_AGENT_GROUP="linux-servers" apt-get install -y wazuh-agent
systemctl enable --now wazuh-agent(The dashboard's Deploy new agent page shows the same commands for every OS.) The agent version must be the same as or older than the manager. Check on the manager:
/var/ossec/bin/agent_control -l
ID: 001, Name: web1, IP: any, ActiveFirst configuration: the modules that matter
Configure all Linux agents at once in the group file (pushed by the manager):
<agent_config>
<syscheck>
<frequency>43200</frequency>
<directories realtime="yes" check_all="yes">/etc,/usr/bin,/usr/sbin</directories>
<directories check_all="yes" report_changes="yes">/var/www</directories>
<ignore>/etc/mtab</ignore>
</syscheck>
<localfile>
<log_format>journald</log_format>
<location>journald</location>
</localfile>
<localfile>
<log_format>apache</log_format>
<location>/var/log/nginx/access.log</location>
</localfile>
<sca>
<enabled>yes</enabled>
<scan_on_start>yes</scan_on_start>
<interval>12h</interval>
</sca>
</agent_config>| Module | What it gives you |
|---|---|
syscheck (FIM) | Alerts when files in /etc, binaries or the web root change (real time for key folders). |
localfile | Which logs to read: journald, Nginx, auth logs, app logs. |
sca | CIS benchmark checks per OS with a score and fixes. |
| Vulnerability detection | Matches installed packages against CVE feeds (on by default in the manager). |
Active response — block an IP on the host for 10 minutes when an SSH brute force rule (5763) fires; on the manager:
<active-response>
<command>firewall-drop</command>
<location>local</location>
<rules_id>5763</rules_id>
<timeout>600</timeout>
</active-response>/var/ossec/bin/wazuh-control restartA local rule for your own app, and how to test rules:
<group name="local,shop,">
<rule id="100100" level="10">
<if_sid>5716</if_sid>
<srcip>!10.0.0.0/8</srcip>
<description>SSH login failure from outside the company network</description>
<mitre><id>T1110</id></mitre>
</rule>
</group>/var/ossec/bin/wazuh-logtestwazuh-logtest reads a log line you paste and shows which decoder and rule match.
Daily use: the commands and the real uses
/var/ossec/bin/agent_control -l
/var/ossec/bin/manage_agents -l
/var/ossec/bin/agent_groups -l
tail -f /var/ossec/logs/alerts/alerts.json | jq -r '.rule.level, .rule.description'
tail -f /var/ossec/logs/ossec.log
systemctl status wazuh-manager wazuh-indexer wazuh-dashboard
curl -k -u wazuh-wui:PASSWORD -X POST "https://localhost:55000/security/user/authenticate?raw=true"In the dashboard: Threat hunting (all alerts), File integrity monitoring, Vulnerability detection, Configuration assessment (CIS), MITRE ATT&CK view, and compliance dashboards (PCI DSS, GDPR, NIST).
Real uses at work:
- A free SIEM for small and medium companies: central security logs and alerts.
- File integrity and CIS hardening evidence for audits.
- Vulnerability overview of all servers and laptops; automatic blocks of brute force.
Make it safe
Security checklist:
- Change all default passwords; keep
wazuh-install-files.tarsecret. - Replace the self-signed certificates with your own CA for production.
- Dashboard (443) only from admin networks/VPN; 1514/1515 only from agent networks.
- Agent enrollment with a password (
authdpassword) so unknown hosts can not enroll. - Retention policy on the indexer (ISM) so the disk does not fill; snapshot backups.
- Keep manager, indexer, dashboard and agents updated (manager first, then agents).
Update and remove
Upgrade the central components first (indexer, server, dashboard — follow the Wazuh upgrade guide for your version), then the agents:
dnf -y upgrade wazuh-agent
apt-get install --only-upgrade -y wazuh-agent
dnf -y remove wazuh-agent
bash ./wazuh-install.sh -uwazuh-install.sh -u uninstalls the central components installed by the assistant.
Fix common problems
| Problem | Cause | Fix |
|---|---|---|
Agent Never connected / Disconnected | Firewall to 1514/1515, wrong manager IP. | tail /var/ossec/logs/ossec.log on the agent; open ports; check <address> in the agent ossec.conf. |
Agent version must be lower or equal to manager version | The agent is newer than the manager. | Upgrade the manager first, or install the matching agent version. |
| Dashboard: "Wazuh dashboard server is not ready yet" | The indexer is down or out of memory. | systemctl status wazuh-indexer; check RAM and its log. |
| Disk full on the indexer | No retention. | Add an ISM policy to delete old wazuh-alerts-* indices; more disk. |
| A rule never fires | The decoder does not match your log format. | Test with wazuh-logtest; write a decoder. |
| Too many low-level alerts | Default rules for your environment. | Tune in local_rules.xml (lower levels, exceptions); alert on level 10+. |
Next steps
- Quick how-tos: Watch file changes with auditd, Check file integrity with AIDE, Collect security events.
- Reading attack logs: Lab: investigate an SSH brute-force attack from the logs.
- The building blocks: Elasticsearch / indexer ideas, Kibana / dashboard ideas.
- Block on one host: Fail2ban. Runtime detection in containers: Falco.
- Least privilege on servers: Lab: least privilege on a Linux server.
1Which tool shows which decoder and rule match a log line?
/var/ossec/bin/wazuh-logtest.
2Where do you configure all Linux agents at once?
In the group file /var/ossec/etc/shared/<group>/agent.conf on the manager.