Why Wazuh agent enrollment needs certificate identity checks
When you roll out Wazuh agents across endpoints, the risk at enrollment is that an unknown host registers as an agent, or that an agent is pointed at a rogue manager that accepts its data. Certificates give both sides a mutual identity check during enrollment: the agent verifies the manager against a trusted certificate authority (CA), and the manager verifies the agent with its own certificate and key. Without that check, a password or network path alone does not tell you which system is on the other end.
This topic covers the practical steps: setting up the CA, placing the agent certificate and key where the agent expects them, and recognizing the common certificate errors that appear when paths, names or trust chains do not match. In the Wazuh documentation, the registration variables WAZUH_REGISTRATION_CA, WAZUH_REGISTRATION_CERTIFICATE and WAZUH_REGISTRATION_KEY are documented for Windows deployments, so confirm the equivalent settings for Linux, macOS and other platforms in the agent enrollment documentation before you standardize a rollout. The indexer, server, dashboard and agents each play a different role, and the certificates you issue must match the names the agents connect to.
Treat certificate identity as one hardening task alongside enrollment passwords and network controls, not as a replacement for them. A certificate proves identity, a password limits who may attempt enrollment, and firewall rules limit which hosts can reach the manager at all. Plan who issues and renews the CA and agent certificates, where private keys are stored and how their permissions are set, and what happens when a certificate expires on thousands of endpoints. Ask your team to confirm these decisions in your own environment before the first production enrollment.
How the agent, manager and CA trust each other during enrollment
The flow starts with your internal certificate authority, which issues the manager certificate and the agent certificate and key. During enrollment the agent checks the manager certificate against the CA certificate it was given, and the manager checks the agent certificate against the same trust chain before it registers the agent. The trust boundary sits between the endpoint and the server network, so the CA private key stays off endpoints and CA file paths on each agent must match the CA that signed the manager. Check each hand-off before you enroll a fleet.
Certificate trust flows from the internal CA to the manager and agent across the endpoint boundary.
Which certificate and CA approach fits your environment
An internal certificate authority gives you one trust root that signs the manager, indexer, dashboard and agent certificates. Agents then validate the manager against a CA certificate you control, and the manager validates agents against the same root. This model fits organizations that already run a private PKI and want Wazuh to follow the same issuance, revocation and audit rules as other internal services.
- Effort drivers: The work includes designing the CA hierarchy, protecting the root key, defining certificate profiles for server and client use, and writing the signing procedure your team will repeat.
- Renewal burden: Every renewal runs through your PKI process, so renewal dates must be tracked in the same system that tracks other internal certificates.
- Distribution to endpoints: You must push the CA certificate to every agent through your configuration management or deployment tooling, and the CA file path must match what the agent expects.
- When it fits: Choose this when a PKI team exists, endpoints are managed centrally, and auditors expect certificates to come from a known authority.
- Ask your PKI owner: Confirm whether the CA can issue long-lived intermediate certificates to a service account and how revocation is published.
Before committing, check that your PKI team can support the renewal cycle for every Wazuh certificate, not only the first deployment.
The Wazuh installation process generates certificates for the components it installs, which lets a single-team deployment reach working TLS without a separate PKI project. The trust root is local to the deployment, so the CA material created at installation becomes the anchor that agents must trust. This option fits lab, pilot and small single-team deployments where speed matters more than integration with an enterprise PKI.
- Effort drivers: Effort stays low at first, but copying the generated CA and certificate files to each endpoint and keeping them in step with the manager is manual work that grows with fleet size.
- Renewal burden: Renewal is tied to the generated material. Confirm the validity period and the documented renewal steps for your release before you rely on this model.
- Distribution to endpoints: Agents need the generated CA file, and any change to the manager certificate can break enrollment on hosts that hold an older copy.
- When it fits: Choose this for proof-of-concept work or isolated environments with a small, known set of hosts and no external auditor expectation for a named CA.
- Ask your team: Confirm whether auditors accept a self-generated root for the evidence you must produce.
Plan a migration path early, because moving off installer material later means reissuing certificates to every component and every agent.
In a split model, the manager and dashboard present certificates from a trusted public or enterprise CA, while agents validate the manager against a separately managed chain used only for agent communication. The two chains are maintained by different owners, which can suit organizations where the web-facing trust path must follow corporate policy but endpoint enrollment is controlled by the security operations team. The design adds a second set of files to track, so the boundary between the chains must be documented.
- Effort drivers: Effort comes from mapping which certificate each component uses, testing that agents accept the manager certificate in the real network path, and handling intermediate chain files.
- Renewal burden: Two renewal calendars run in parallel, and a missed renewal on either chain can stop enrollment or dashboard access.
- Distribution to endpoints: Only the agent-facing CA must reach endpoints, which can reduce the file set on hosts, but the file must still match the chain the manager presents.
- When it fits: Choose this when corporate policy requires a trusted CA for browser-facing services but endpoint trust is managed by a separate team or tool.
- Ask your team: Confirm which chain the manager presents during agent registration, since a mismatch is a common source of verification errors.
Write down the owner, renewal date and file path for each chain before go-live.
Set up the CA, certificates and agent registration variables
This sequence gives the manager and every enrolling agent certificates from one trusted CA, so agents only register with a manager they can verify and the manager only accepts agents presenting a valid certificate. The result is a tested enrollment path you can repeat on each endpoint.
Select or create the certificate authority
Decide whether the CA is your existing internal authority or a dedicated CA created for Wazuh, and confirm with your PKI owner who signs, stores and renews it. Export the CA certificate as a PEM file without the private key, since that is the file agents will trust. Verify the result by reading the certificate with OpenSSL and confirming the subject, validity dates and the basic constraints that mark it as a CA. Keep the CA private key offline or in a protected store, because anyone holding it can issue certificates your manager will accept.
Issue the manager and agent certificates
Issue one certificate and private key for the manager, with its hostname or IP address in the subject alternative name, and one certificate and key for the agent enrollment identity. Sign both with the CA from the previous step. Confirm the chain by running an OpenSSL verify command against the CA file for each certificate, and confirm the manager name matches what agents will use to reach it. A mismatch here causes the verification errors covered later on this page.
Place the files with restrictive permissions on the manager
Copy the CA certificate, the manager certificate and the manager private key to the locations your Wazuh server installation expects, and set the private key so only the service account that runs the manager can read it. Confirm the manager configuration references these files, then restart the manager service in your change window. Check the service starts cleanly and that the logs show no certificate load errors. Confirm the exact file paths and configuration keys for your Wazuh version in the server documentation, since they can change between releases.
Stage the agent certificate files on each endpoint
Copy the CA certificate and the agent certificate and key to each endpoint, using a secure channel and a location that only administrators can read. On Linux and macOS, confirm the file paths and permissions in the agent documentation for your version. Verify each copied file against the source using a checksum, so a corrupted or swapped file is caught before enrollment. Do not place the CA private key on endpoints at any point.
Set the registration variables in the deployment
In your deployment tooling, set WAZUH_REGISTRATION_CA to the path of the CA certificate, WAZUH_REGISTRATION_CERTIFICATE to the agent certificate and WAZUH_REGISTRATION_KEY to the agent private key. The Windows deployment variables page lists these variables and what each controls. Confirm the Linux and macOS equivalents in the agent documentation for your version before you write those packages. Record the deployment value for each variable so a reviewer can trace which files each host was given.
Enroll a test agent and confirm it reports active
Install the agent on one non-production endpoint using the deployment variables and check the agent registers with the manager. Confirm in the Wazuh dashboard or agent list that the agent shows as active, and that the manager logs record a successful enrollment. Then test the negative case by pointing a second test host at a different CA file and confirm the enrollment is rejected. Only roll the sequence out to more endpoints after both checks behave as expected.
Common certificate errors and what usually causes them
Most agent enrollment failures during certificate-based identity verification trace back to a short list of causes: the wrong CA, the wrong file, a certificate that does not match the manager's hostname, expired material, or copies with loose permissions. Checking these in order usually isolates the problem faster than changing settings at random.
CA mismatch between manager and agent
The agent validates the manager against the CA file it was given through WAZUH_REGISTRATION_CA or the equivalent setting. If that file comes from a different CA than the one that signed the manager's certificate, the TLS handshake fails during enrollment even though the manager is running and reachable. The usual cause is an agent package built from an older CA bundle or a copy taken from a test environment. First check: confirm that the CA file on the agent is the exact file used to issue the manager certificate, and compare fingerprints rather than file names.
Wrong or unreadable key file path
The agent certificate and key are passed as file paths. A path that points to a file that was moved, renamed, or never copied to the endpoint causes enrollment to stop before any network exchange completes. Relative paths can also resolve differently depending on the service account or working directory that runs the installer. First check: confirm the absolute path exists on the endpoint and that the process running the agent service, not only your admin session, can open it.
Certificate not issued to the manager hostname
The manager certificate must carry the name that agents use to reach it, either in the subject or in the subject alternative names. If agents connect by a load balancer name, an IP address or a short hostname that the certificate does not list, the client rejects the server even when the chain is correct. This often appears after a manager is moved behind a new DNS record. First check: inspect the certificate's names and compare them with the address written in the agent configuration and deployment command.
Expired certificates
Certificates have fixed validity periods. When the manager certificate or the agent certificate expires, enrollment and reconnection fail in ways that can look like network problems, and agents that were already connected may stop reporting. Expiry is easy to miss because nothing warns until the date passes, and self-signed material generated at installation is often never renewed. First check: read the not-before and not-after dates on every certificate in the chain and set a renewal date in your change calendar before the earliest expiry.
Copies made with incorrect permissions
Keys copied from the manager or a secrets vault into endpoint directories often keep permissions that the agent service cannot read, or they become readable by any local user. Both outcomes are problems: the first blocks enrollment, and the second exposes the agent identity to local accounts that could impersonate the endpoint. Copies made by a tool that changes ownership during transfer are a common source. First check: list ownership and mode bits on the key file and confirm that only the service account and administrators can read it.
How the CA, key files and registration variables fit together
The certificate authority (CA) is the trust anchor for enrollment. When an agent registers, it uses the CA certificate to check that the manager presenting its certificate was issued by the CA the agent was configured to trust. That check is what protects the agent from a rogue or spoofed manager. On Windows, the deployment variables WAZUH_REGISTRATION_CA, WAZUH_REGISTRATION_CERTIFICATE and WAZUH_REGISTRATION_KEY point the installer at the CA file and at the agent's own certificate and key, which the agent then uses for SSL verification. The CA file is public material and can be distributed widely, but it must be the CA that signed the manager's certificate. Confirm the exact variable behavior and file locations for your agent version in the Windows deployment variables reference before you script the rollout.
The agent certificate and its private key prove the agent's identity to the manager. The certificate is the public part, signed by the CA and tied to a host identity. The private key is the proof of possession: anyone holding it can present the same identity, so it should exist only on the endpoint it was issued for, with file permissions limited to the service account. Do not copy a key between hosts to save effort, do not keep it in shared deployment shares or configuration repositories, and do not leave it in installer staging folders after enrollment. If a key is exposed, revoke or reissue that agent's certificate through your CA process rather than only changing its name in the manager.
Certificates and the enrollment password are complementary controls, not substitutes. The certificate pair stops an agent from trusting an impostor manager and gives the manager cryptographic evidence of who is enrolling. The enrollment password, covered in the agent enrollment password topic, limits who is allowed to enroll at all. Run both: the CA check confirms the server, and the password check helps keep unknown hosts from registering even when they hold a valid-looking package. Plan renewal and revocation for the CA and the agent certificates together, because an expired CA or key will stop enrollment and can look like a network fault during an incident.
Security and operational considerations for certificate identity
Certificates only prove identity if the private keys stay private, the CA is controlled, and the certificates are renewed before they expire. The cards below cover the decisions that keep manager and agent identity trustworthy after the first enrollment succeeds.
Private key protection and file permissions
The agent certificate key and the registration key are what an attacker would need to impersonate an endpoint. Restrict read access on the agent key and certificate files to the service account and root or Administrator, and confirm the ownership and mode of each file after installation. Check that keys are not left in deployment scripts, shared configuration management repositories or installer logs. Confirm the exact file paths and ownership expected by your installed agent version in the Wazuh documentation before you write any permission rule.
CA key custody
The certificate authority private key signs every manager and agent certificate, so whoever holds it can issue a trusted identity. Keep the CA key offline or in a hardware-backed store, limit signing to named operators, and record each signing event. Decide who can rotate the CA and where the CA certificate is distributed to agents. Your internal PKI team should own this decision, not the Wazuh administrators who run the daily platform.
Certificate lifetime and renewal
Each manager and agent certificate has an expiry date, and an expired certificate can stop enrollment or communication without a clear error on the endpoint. Record the validity period of every certificate you issue, set a renewal date before expiry, and test the renewal on a non-production agent first. Ask your PKI team whether renewal can be automated and who receives expiry alerts. Confirm the renewal steps for your installed version before you schedule them.
Revocation limits to confirm
Revoking a certificate does not automatically remove an agent's trust from every component, so a compromised endpoint may keep access until you act. Before you rely on revocation, confirm in the documentation for your installed version whether the manager checks revocation status and how a revoked agent is removed or blocked. Where that is not supported, the fallback is removing the agent from the manager, rotating the enrollment secret and reissuing identities. Document this fallback in your incident runbook.
Manager and agent version alignment
Certificate handling and enrollment behavior can change between releases, so manager and agent versions should stay on the same 4.14 line. The current release line is 4.14, and the 4.14.9 release was published on 14 October 2026. Before upgrading either side, check the release notes for changes to certificate or enrollment behavior and test an enrollment with the new version. Schedule agent upgrades after the manager upgrade, using the order in the upgrade documentation.
Wazuh release notesQuestions teams ask before certificate-based enrollment
How much effort does an internal CA setup for Wazuh take?
The effort depends less on the Wazuh side than on how your organization already issues and manages certificates. If you have an internal CA with a documented issuance process, the Wazuh work is mostly generating a certificate for the manager, creating agent certificates and keys, and placing the files where the agents expect them. If you have no CA, the first job is designing one: root and intermediate structure, key storage, validity periods, revocation handling and who approves requests. The main drivers are the number of certificates, how often they must be renewed, whether the CA is offline or online, and how much automation your endpoint tooling can apply. Ask your team to inventory these before you request a quote, because they change the work more than the number of hosts does.
Can our team set up certificate enrollment on its own?
A team with Linux administration skills and experience running an internal CA can usually handle the Wazuh side, provided it reads the official deployment and certificate documentation carefully. The harder parts tend to be the operational decisions: which CA signs the manager and agent certificates, how private keys are protected, and how renewals will reach every endpoint without an outage. Teams without a CA owner often find these decisions take longer than the configuration itself. A practical check is whether someone can explain, on paper, how a compromised agent key would be revoked and replaced. If the answer is unclear, that gap is the first thing to close, whether internally or with outside help.
What does the work need from our organization?
Certificate-based enrollment touches several groups, so the work needs named owners before it starts. The main requirements are:
- A CA owner who can approve the signing hierarchy, certificate lifetimes and revocation process
- Endpoint tooling owners who can push the CA file, certificate and key to Windows, Linux and macOS hosts through your existing management system
- Change windows on the manager and on pilot groups, since a wrong certificate can stop agents from connecting
- Access to the Wazuh server, dashboard and key storage for the engineers doing the configuration
Confirm these owners and windows before scheduling, because most delays come from waiting on approvals rather than from technical steps.
How long does a certificate enrollment pilot take?
The pilot length depends on fleet size, operating system mix, how many endpoint management paths you use and how many approvals sit between the design and the first host. A small, homogeneous group of Linux servers under one management tool can be piloted much faster than a mixed fleet of Windows, macOS and Linux systems across several networks. Plan the pilot in stages: one host per platform, then a single group, then the full fleet. Each stage should include a check that the agent connects, that the manager accepts it and that a renewal or replacement path has been tested. Ask any provider for a timeline built from your inventory rather than a generic duration, and confirm the pilot exit criteria in writing.
What goes wrong when certificates do not match during enrollment?
The most common failures are an agent that does not trust the CA that signed the manager certificate, a certificate or key path that points to the wrong file, and a certificate whose name or address does not match what the agent connects to. Each of these causes the enrollment to fail, often with messages that look similar in logs. Expect time to be spent on file permissions and on confirming which CA file each platform reads. Test one platform at a time and keep the previous working configuration available so you can roll back. Your engineers should be able to read agent and manager logs for certificate errors before the wide rollout begins.
Should a partner review our certificate design before rollout?
A design review is worth considering when the CA structure, key handling or renewal plan is new to your team or must satisfy an internal audit or a regulator. An outside reviewer can check the hierarchy, the key storage approach, the file paths on each endpoint platform and the rollback plan before any production host changes. Review does not replace your own decisions, and you remain responsible for the CA and its policies. If you engage DeployOpen, the work would be defined in a written scope with agreed deliverables and timelines before it starts. Ask any reviewer what they will examine, what they will not examine and what evidence they will hand back to you.
Piloting certificate enrollment before a fleet-wide rollout
Start with a small pilot group before changing certificate enrollment across the fleet. Pick a handful of agents that cover every operating system and deployment method you run, including at least one Linux host, one Windows host and any macOS endpoints. Enroll each pilot agent using the CA, certificate and key values you plan to use in production, then confirm that each agent appears as active on the manager and that the manager accepts its certificate. Record the exact values used for each platform, because a setting that works on Linux can fail silently on Windows if the paths or file permissions differ. Confirm the registration variables for each platform in the Wazuh documentation for that operating system, since the Windows deployment variables page is the reference for WAZUH_REGISTRATION_CA, WAZUH_REGISTRATION_CERTIFICATE and WAZUH_REGISTRATION_KEY.
Test the failure path as deliberately as the success path. Install an agent with a certificate from the wrong CA, or with a key that does not match the certificate, and confirm that enrollment is refused and that the error appears in the agent and manager logs. Then practice the rollback: keep the previous CA bundle and agent certificate material available, know which hosts you would touch first, and confirm that you can restore a working enrollment without reinstalling every endpoint. Write down the steps and who is authorized to run them before the fleet rollout starts. Your plan should also say what happens to agents that are already enrolled when the CA changes, because that depends on how your environment handles certificate trust, and you should verify this on your own version of the software rather than assume it.
Document the verified state as evidence for security reviews. Keep a dated record that lists the pilot hosts, operating systems, Wazuh version, CA identity, certificate subjects and expiry dates, the test cases you ran and their results, and the rollback test. This record shows what you checked and how, which is useful when a security reviewer asks how agent identity is established. It does not, by itself, demonstrate that any compliance requirement is met; an assessor will decide that based on your full control set. Store the record with your change tickets, restrict who can edit it, and update it when the CA, the manager version or the enrollment method changes.

