Step-by-Step Guide to Wazuh Agent Auto-Enrollment

Deploying a handful of Wazuh agents manually is manageable, but enrolling hundreds or thousands of endpoints quickly becomes time-consuming and error-prone.

Every new server, workstation, or virtual machine must be registered with the Wazuh manager before it can begin sending security events. In modern environments where infrastructure is constantly changing, manual enrollment simply doesn’t scale.

Wazuh Agent Auto-Enrollment automates the registration process by allowing new agents to securely authenticate with the Wazuh manager and obtain their unique agent credentials without administrator intervention.

This enables organizations to rapidly onboard new endpoints while maintaining centralized visibility and strong security controls.

Automatic enrollment is especially valuable in enterprise environments that rely on cloud infrastructure, virtual machines, Kubernetes clusters, auto-scaling groups, and automated provisioning tools.

Whether you’re deploying systems with Ansible, SCCM, Terraform, or cloud-init, auto-enrollment ensures that every newly created endpoint becomes an active participant in your security monitoring platform almost immediately.

Advantages of Auto Enrollment

Compared to manually registering every endpoint, auto-enrollment offers several advantages:

  • Faster deployments across thousands of systems
  • Consistent enrollment procedures
  • Reduced administrative overhead
  • Fewer configuration mistakes
  • Better integration with DevOps and Infrastructure-as-Code workflows
  • Improved scalability for growing environments

By automating enrollment, security teams can focus on monitoring threats rather than repeatedly performing routine onboarding tasks.

In this guide, you’ll learn:

  • What Wazuh Agent Auto-Enrollment is and how it works
  • How the enrollment process differs from agent installation
  • How agents authenticate securely with the Wazuh manager
  • The benefits of auto-enrollment for enterprise deployments
  • Best practices for secure, reliable, and scalable agent onboarding

If you’re planning to deploy Wazuh across dozens, or even thousands, of endpoints, understanding auto-enrollment is an essential first step.

Related Guide: How to Automate Bulk Wazuh Agent Deployment with Ansible and SCCM


What Is Wazuh Agent Auto-Enrollment?

Auto-enrollment is the process that allows a newly installed Wazuh agent to automatically register with a Wazuh manager and receive its unique authentication credentials without requiring manual administrator approval for every device.

Instead of creating each agent manually and copying authentication keys by hand, the enrollment service securely handles identity verification and key generation during the agent’s first connection.

This significantly streamlines endpoint onboarding while maintaining secure communications between agents and the manager.

Understanding the Enrollment Process

Before an endpoint begins sending logs, file integrity events, or security alerts, it must become a trusted member of the Wazuh deployment.

The enrollment process establishes that trust.

At a high level, the process consists of:

  1. Installing the Wazuh agent.
  2. Contacting the Wazuh manager.
  3. Authenticating with the enrollment service.
  4. Receiving a unique agent key.
  5. Beginning encrypted communication.

Once complete, the endpoint becomes a fully managed Wazuh agent capable of sending telemetry and receiving centralized configuration updates.

How Wazuh Agents Authenticate with the Manager

Authentication is handled through the Wazuh registration service (commonly wazuh-authd).

During enrollment, the agent presents its identity to the manager.

Depending on the deployment, authentication may use:

  • Enrollment passwords
  • Agent groups
  • IP restrictions
  • TLS certificates
  • Manager-side enrollment policies

Once authentication succeeds, the manager generates credentials that uniquely identify the agent.

This prevents unauthorized systems from joining the monitoring infrastructure.

Enrollment vs. Agent Installation

A common misconception is that installing the Wazuh agent automatically adds it to the manager.

These are actually two separate processes.

Agent installation places the Wazuh software on the endpoint.

Enrollment establishes trust between that endpoint and the Wazuh manager.

Without successful enrollment:

  • No security events are sent.
  • No policies are received.
  • The endpoint does not appear in the Wazuh dashboard.
  • Active Response cannot be used.

Think of installation as installing the software, while enrollment is registering the endpoint with the security platform.

Related Guide: How to Install a Wazuh Agent on Windows Server

Agent Keys and Identity

Every enrolled Wazuh agent receives a unique authentication key.

This key functions as the agent’s identity within the Wazuh environment.

The manager uses the key to:

  • Identify the endpoint
  • Authenticate future communications
  • Associate events with the correct asset
  • Prevent impersonation by unauthorized devices

Each enrolled endpoint has its own unique identifier, allowing administrators to monitor thousands of systems simultaneously while maintaining accurate asset inventories.

Secure Communication Between Agents and the Manager

After enrollment, all communications between the agent and manager are encrypted.

Security is critical because agents continuously transmit information such as:

  • Security events
  • File integrity changes
  • Vulnerability data
  • System inventory
  • Configuration assessment results

Encryption helps protect this telemetry from interception or tampering while in transit.

The Wazuh documentation recommends using secure enrollment methods and encrypted communications whenever possible.

How Auto-Enrollment Works

Although administrators often think of enrollment as a single step, it actually consists of several coordinated stages that establish trust between the endpoint and the Wazuh manager.

Initial Connection

Once installed, the Wazuh agent connects to the configured manager using the enrollment service.

At this stage, the agent provides identifying information such as:

  • Hostname
  • IP address
  • Operating system
  • Agent name
  • Enrollment credentials

The manager evaluates whether the endpoint is permitted to join the deployment.

Authentication

The manager validates the enrollment request according to its configured security policies.

This may involve verifying:

  • Enrollment password
  • Source IP address
  • Allowed networks
  • Certificates
  • Enrollment configuration

Only authorized systems are permitted to continue.

Organizations with strict security requirements often combine enrollment passwords with network restrictions or certificate-based authentication for additional protection.

Agent Key Generation

After successful authentication, the manager generates a unique cryptographic key for the new agent.

This key becomes the permanent identity of the endpoint.

Future communications rely on this identity rather than repeating the initial enrollment procedure.

Configuration Download

Once registered, the agent receives its operational configuration.

Depending on the environment, this may include:

  • Assigned agent groups
  • Centralized configuration
  • Active Response settings
  • File Integrity Monitoring policies
  • Vulnerability Detection configuration
  • Log collection rules

This allows new endpoints to begin monitoring immediately after enrollment.

Related Guide: How to Configure File Integrity Monitoring (FIM) in Wazuh

Continuous Communication

After enrollment is complete, the agent maintains secure communication with the manager throughout its lifecycle.

The agent continuously:

  • Sends security events
  • Receives configuration updates
  • Downloads policy changes
  • Reports inventory information
  • Responds to Active Response commands when applicable

If connectivity is interrupted, the agent automatically attempts to reconnect according to its configured communication settings.


Benefits of Wazuh Agent Auto-Enrollment

Auto-enrollment isn’t simply a convenience feature, it fundamentally changes how organizations deploy and manage endpoint security at scale.

By removing repetitive manual tasks, organizations can onboard new systems faster while maintaining consistent security standards.

Faster Large-Scale Deployments

Enterprise environments often manage hundreds or thousands of endpoints.

Auto-enrollment allows newly deployed systems to join Wazuh automatically as soon as they come online.

This dramatically reduces deployment time for:

  • Virtual machines
  • Cloud instances
  • Containers
  • Remote offices
  • Branch locations

When combined with automated deployment tools, large-scale rollouts can occur with little or no manual intervention.

Related Guide: How to Automate Bulk Wazuh Agent Deployment with Ansible and SCCM

Eliminates Manual Agent Registration

Without auto-enrollment, administrators must repeatedly:

  • Create agent records
  • Generate authentication keys
  • Copy keys to endpoints
  • Verify successful registration

Automating these repetitive steps reduces operational overhead while allowing administrators to focus on higher-value security work.

Reduces Human Error

Manual enrollment introduces opportunities for mistakes such as:

  • Incorrect agent names
  • Duplicate identities
  • Misconfigured manager addresses
  • Lost authentication keys
  • Incorrect group assignments

Auto-enrollment standardizes the onboarding process, making deployments more predictable and repeatable.

According to the 2024 Verizon Data Breach Investigations Report, human error continues to play a significant role in security incidents, highlighting the importance of automation wherever possible.

Supports Cloud and Hybrid Infrastructure

Modern organizations frequently provision infrastructure dynamically.

Examples include:

  • AWS EC2 Auto Scaling
  • Azure Virtual Machine Scale Sets
  • Google Compute Engine
  • VMware environments
  • Hybrid cloud deployments

Auto-enrollment ensures newly created systems immediately become visible within Wazuh without requiring manual administrator involvement.

Simplifies Automated Provisioning

Organizations commonly deploy infrastructure using automation platforms such as:

  • Ansible
  • SCCM
  • Terraform
  • Puppet
  • Chef
  • cloud-init

Auto-enrollment integrates naturally into these workflows, allowing endpoints to be provisioned, configured, enrolled, and monitored as part of a single automated deployment pipeline.

This approach supports Infrastructure as Code (IaC) principles by making security onboarding a standard component of system provisioning rather than a separate administrative task.

Improves Security During Enrollment

Auto-enrollment provides a more secure onboarding process by ensuring:

  • Only authorized endpoints can register.
  • Each agent receives a unique identity.
  • Communications are encrypted.
  • Authentication policies are enforced consistently.
  • Manual credential handling is minimized.

Security frameworks published by organizations such as the Center for Internet Security (CIS) emphasize automating secure system deployment and configuration to reduce operational risk and configuration drift.


Prerequisites Before Configuring Auto-Enrollment

Before enabling auto-enrollment, it’s important to ensure that both the Wazuh manager and the endpoints meet the necessary requirements.

Proper preparation helps avoid enrollment failures, authentication problems, and communication issues later in the deployment.

Supported Wazuh Versions

Auto-enrollment is supported in modern Wazuh releases, but both the manager and agents should be running compatible versions.

As a best practice:

  • Keep the manager updated before deploying new agents.
  • Avoid mixing significantly different major versions.
  • Upgrade older agents whenever possible.
  • Review release notes before upgrading production environments.

Running supported versions helps prevent protocol incompatibilities during enrollment.

Manager Requirements

The Wazuh manager must be properly configured before accepting enrollment requests.

Typical requirements include:

  • Running Wazuh Manager service
  • Authentication daemon enabled (when applicable)
  • Enrollment service configured
  • Valid enrollment password or authentication policy
  • Proper SSL/TLS configuration
  • Sufficient system resources

Before enrolling agents, verify that the manager is healthy and accepting network connections.

Agent Requirements

Each endpoint should have:

  • The correct Wazuh agent installed
  • Proper manager address configured
  • Network connectivity to the manager
  • Supported operating system
  • Administrator or root privileges during installation

Incomplete agent installations are one of the most common causes of enrollment failures.

Network Connectivity

Agents must be able to reach the manager over the network before enrollment can begin.

Verify:

  • IP connectivity
  • Routing
  • VPN connectivity (if applicable)
  • DNS resolution
  • Network latency
  • Proxy configuration (if used)

Simple connectivity tests before deployment can prevent many enrollment issues.

Required Firewall Ports

Firewalls between agents and the manager must allow the appropriate Wazuh ports.

Common examples include:

  • Enrollment service port
  • Agent communication port
  • API port (when required)
  • Dashboard access port (administrative use)

Rather than opening unnecessary ports, organizations should follow the principle of least privilege and expose only the services required for enrollment and ongoing communication.

DNS and Hostname Resolution

Reliable DNS resolution helps ensure agents consistently locate the correct manager.

Best practices include:

  • Use fully qualified domain names (FQDNs).
  • Avoid relying on changing IP addresses.
  • Verify forward and reverse DNS records.
  • Ensure cloud instances resolve internal hostnames correctly.

Using DNS instead of hardcoded IP addresses makes future infrastructure changes easier to manage.

Administrative Permissions

Installing and configuring the Wazuh agent generally requires elevated privileges.

Depending on the operating system, this typically means:

  • Administrator privileges on Windows
  • Root or sudo privileges on Linux
  • Administrative permissions on macOS

Without sufficient permissions, installation or enrollment configuration may fail.

Time Synchronization (NTP)

Accurate system time is often overlooked but is critical for reliable security operations.

Proper time synchronization helps ensure:

  • Accurate event timestamps
  • Correct certificate validation
  • Consistent authentication
  • Reliable log correlation
  • Easier incident investigation

Organizations should synchronize both the Wazuh manager and enrolled agents using Network Time Protocol (NTP) or another trusted time source.


Methods of Wazuh Agent Auto-Enrollment

Wazuh supports several enrollment methods to accommodate different deployment models.

The most appropriate option depends on your organization’s size, security requirements, automation strategy, and infrastructure.

Enrollment Using Password Authentication

Password-based enrollment is one of the simplest methods for automatically registering new agents.

During enrollment, the administrator configures a shared enrollment password on both the manager and the agent.

The manager validates this password before generating a unique agent key.

This method works well for small to medium-sized environments and is easy to integrate into deployment scripts.

How Enrollment Passwords Work

The general process is:

  1. Configure an enrollment password on the manager.
  2. Provide the same password during agent installation.
  3. The agent contacts the manager.
  4. The manager validates the password.
  5. A unique agent key is generated.
  6. Secure communication begins.

The enrollment password itself is only used during the registration process and is not the long-term authentication credential.

Advantages

Password-based enrollment offers several benefits:

  • Simple to configure
  • Easy to automate
  • Minimal infrastructure requirements
  • Suitable for unattended installations
  • Works well with deployment scripts

Limitations

Despite its simplicity, password authentication has some drawbacks:

  • Shared secrets require careful protection.
  • Password rotation requires updating deployment automation.
  • Less granular than certificate-based authentication.
  • May not satisfy strict enterprise security requirements.

Enrollment Using Authentication Daemon

The Wazuh Authentication Daemon (wazuh-authd) manages agent registration requests and automates the generation of unique authentication keys.

It provides centralized enrollment management while enforcing configured authentication policies.

When to Use It

The authentication daemon is recommended when:

  • Deploying many new endpoints regularly
  • Managing multiple offices
  • Using automated provisioning
  • Building scalable Wazuh environments
  • Supporting continuous infrastructure growth

It significantly reduces the operational effort required to onboard new systems.

Typical Enterprise Deployments

Large organizations commonly combine the authentication daemon with:

  • Configuration management platforms
  • Cloud provisioning workflows
  • Auto-scaling infrastructure
  • Golden VM images
  • Continuous deployment pipelines

This enables systems to register automatically as they are provisioned.

Enrollment Using Agent Groups

Agent groups allow administrators to automatically apply configurations immediately after enrollment.

Instead of configuring each endpoint individually, policies can be assigned based on the group to which an agent belongs.

Automatically Assigning Policies

Group assignments can automatically configure:

  • File Integrity Monitoring
  • Log collection
  • Active Response
  • Vulnerability Detection
  • Security Configuration Assessment (SCA)
  • Custom rules and decoders

This ensures newly enrolled systems receive consistent security policies without additional administrative work.

Related Guide: How to Configure File Integrity Monitoring (FIM) in Wazuh

Managing Large Environments

Agent groups simplify administration by organizing endpoints according to factors such as:

  • Operating system
  • Department
  • Geographic location
  • Business unit
  • Server role
  • Compliance requirements

Rather than managing thousands of individual agents, administrators can update policies once at the group level.

Enrollment During Silent Installation

Many organizations combine auto-enrollment with unattended or silent installations to fully automate endpoint onboarding.

This approach is especially common in enterprise software deployment systems.

Windows

On Windows, silent installations are frequently integrated with:

  • Microsoft SCCM
  • Microsoft Intune
  • Group Policy
  • PowerShell deployment scripts
  • Enterprise software management platforms

These deployments can install the agent, configure enrollment settings, and register the endpoint without user interaction.

Related Guide: Troubleshooting Wazuh Silent Install Failures

Linux

Linux environments often automate enrollment using:

  • Ansible
  • cloud-init
  • Bash scripts
  • Puppet
  • Chef
  • Terraform provisioning

This approach is particularly effective for cloud instances and virtual machine templates that are created dynamically.

macOS

On macOS, organizations commonly deploy Wazuh agents through:

  • Mobile Device Management (MDM) platforms
  • Jamf Pro
  • Shell scripts
  • Apple Remote Desktop
  • Enterprise software deployment tools

When combined with auto-enrollment, newly managed macOS devices can begin reporting security events immediately after deployment while minimizing manual configuration.


Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *