Why I'm Writing this Post
In some previous posts, I've gone over a few topics that necessitate this post, including:
- Introduced the process of installing and configuring Wazuh
Covering the OwlH integration with Wazuh(Archived Page)- Covering the logall_json log archiving option in Wazuh
For anyone who may have followed any of my previous write-ups, I want to have a brief overview that will ensure your upgrades go as smoothly as possible.
Official Upgrade Documentation
My previous write-ups covering installation and integration are written using the Wazuh central components; that is — Wazuh Indexer, Wazuh Manager, and Wazuh Dashboard.

Upgrading with Customizations
I am going to refer you to the official documentation for all of the commands and procedures for upgrading the Wazuh server infrastructure. I will merely be adding context for certain parts in the sections below.
apt or yum commands according to the operating systems you're using on your Wazuh infrastructure.In general, the processes is detailed in four core steps:
- Preparing to upgrade
- Upgrading Wazuh Indexer
- Upgrading Wazuh Manager Server
- Upgrading Wazuh Dashboard
apt install <package-name> or yum install <package-name>, you will be prompted for Y/N input asking if you want to overwrite the existing configuration file. In most cases, choosing the default selection — N — is the best choice.Preparing to Upgrade
Log into the Wazuh Manager server and run the following command:
systemctl stop wazuh-managersystemctl stop filebeatThen, log into the Wazuh Dashboard server and run this command:
systemctl stop wazuh-dashboardWazuh Indexer
Some tips if you followed my Wazuh SIEM setup guide for Proxmox:
- If you're running a cluster of Wazuh Indexers, perform the Wazuh Indexer steps on each node one at a time.
- Do not try to complete them simultaneously
- We do this to maintain uptime of the cluster
- For the
curlcommands,username:passwordis the credential you use to log into Wazuh Dashboard.- I recommend only providing the
usernamein the command - Do NOT put the password on the command line
- I recommend only providing the
sudo apt-mark hold wazuh-indexerOnce finished, hold the package to prevent unplanned upgrades
Wazuh Manager
If you followed my SIEM setup guide, log into your Wazuh Manager server and run the commands shown in the documetnation.
Wazuh Manager Configuration
As noted in the upgrade guide, if /var/ossec/etc/ossec.conf has been modified, the original will not be overwritten. You will have to reconcile any differences between /var/ossec/etc/ossec.conf and /var/ossec/etc/ossec.conf.new.
diff command to compare the two files and merge the new settings as necessary. I'd recommend a manual review of the differences and then proceed to copy and paste the additions from ossec.conf.new into ossec.conf.In my environment — as documented in this guide — I am using the logall_json option and rotate_interval options in ossec.conf, therefore necessitating this step.
ossec.conf file is set to root:wazuh, as permissions issues on this file will cause the wazuh-manager service to fail to load.sudo apt-mark hold wazuh-managerOnce finished, hold the package to prevent unplanned upgrades
Filebeat Configuration
Installing a new version of Wazuh Manager requires the latest wazuh module for Filebeat. This will not overwrite /etc/filebeat/filebeat.conf, but it will overwrite the files in /usr/share/filebeat/modules/wazuh.
Wazuh Dashboards
sudo apt-mark hold wazuh-dashboardOnce finished, hold the package to prevent unplanned upgrades
When logging back into the Wazuh Dashboard server — https://wazuh-dashboard-ip — the wazuh-alerts-* index pattern will be set as the default index pattern.
In my environment:
- I am using the
logall_jsonoption - Filebeat is reading from
archive.jsonin Wazuh - Filebeat is writing to
wazuh-archives-*
I'd like to set wazuh-archives-* as the default index pattern after upgrade.




Wazuh Agents
Windows
Windows agents are installed via a MSI package and will not be automatically upgraded. Install the target MSI package and restart the service. If you need to install on a batch of hosts, consider using something like Ansible or a PowerShell script over WinRM.
Linux
Linux agents — when installed using your distributions package manager (eg. apt, yum) — need to be held back from unintended upgrades. For example, running apt update && apt upgrade -y would upgrade the Wazuh Agent on a Debian-based system if the package was not held.
For Debian-based distributions, you can use the apt-mark command to hold pacakges from being upgraded without specific overrides.
sudo apt-mark hold wazuh-agentHold the 'wazuh-agent' package
When ready to upgrade the package:
- Run the command below
- If prompted to overwrite any configuration files, typically answer,
N
# Install the latest version of the wazuh-agent package
sudo apt install wazuh-agent
# Put the package back on hold
sudo apt-mark hold wazuh-agentInstall the latest version of Wazuh Agent