OSSEC Updates

Prefer package upgrades (RPM/DEB from Atomicorp) when they are available for your platform. Packages update binaries through the normal package manager and restart OSSEC via the systemd (or SysV) service unit, which is cleaner than a hand-rolled source tree swap.

Before any major upgrade, back up at least:

  • /var/ossec/etc/ossec.conf

  • /var/ossec/etc/client.keys (managers)

  • /var/ossec/rules/local_rules.xml

  • /var/ossec/etc/local_decoder.xml (or etc/decoders/local_decoder.xml)

  • Any other local customizations under /var/ossec

For breaking changes between major versions (for example 3.x → 4.x crypto and FIM defaults), see Upgrading to OSSEC 4.x.

Source upgrades

If you installed from source, download the latest release and run the usual installer. It detects an existing install and asks:

- You already have OSSEC installed. Do you want to update it? (y/n): y

Answer yes to update the OSSEC binaries. local_rules.xml and local_decoder.xml are not modified during this upgrade.

The script also prompts:

- Do you want to update the rules? (y/n): y

Answering yes updates the <rules> section of the system’s ossec.conf.

After a source upgrade, restart OSSEC explicitly (for example /var/ossec/bin/ossec-control restart or systemctl restart ossec-hids) so all daemons load the new binaries.

Checklist

  1. Read the release notes / Change Log and Upgrading to OSSEC 4.x for your target version.

  2. Back up configuration and keys.

  3. Upgrade the manager first (package preferred).

  4. Confirm agents reconnect and alerts look normal.

  5. Upgrade agents in batches.

  6. Re-check custom syslog CEF, database_output, or other integrations after major version jumps.