This guide explains how to build the Wazuh Dashboard Plugins from source code into distributable packages.
Build Types
There are two primary build workflows:
Plugin-only builds - Build individual plugins as ZIP files for development
System packages - Build complete DEB/RPM packages including the full dashboard distribution
Building Plugins from Source
This workflow builds only the plugins in this repository into distributable ZIP packages.
Prerequisites
Development environment configured (see Setup )
jq installed for reading plugin versions
Compatible Git reference from wazuh-indexer-plugins
Installing Dependencies
If dependencies are not already installed:
The main plugin requires the GIT_REF environment variable during installation to download resources from the wazuh-indexer-plugins repository. Ensure the referenced branch or tag exists and is compatible with your plugin version.
External Resources
The main plugin downloads external resources during the yarn installation:
Indexer resources from wazuh-indexer-plugins repository
API specification files for endpoint generation
The postinstall script automatically executes:
Building Individual Plugins
Each plugin must be built with the OpenSearch Dashboards version declared in its package.json.
Build Artifacts
Build artifacts are written to each plugin’s build/ directory:
plugins/main/build/wazuh-<version>.zip
plugins/wazuh-core/build/wazuhCore-<version>.zip
plugins/wazuh-check-updates/build/wazuhCheckUpdates-<version>.zip
Building Inside Docker
The recommended workflow is to build inside the Docker development environment. This ensures:
Required OpenSearch Dashboards build helpers are available
Build matches the target platform
Consistent build environment across different machines
Start the development environment and execute build commands from within the container:
Attach to the container:
From inside the container, run the build commands as described above.
Running from Sources
The recommended method for running plugins during development is using the Docker-based development environments.
Starting the Development Environment
Navigate to the OpenSearch Dashboards development environment:
The script automatically detects versions from plugins/wazuh-core/package.json and internal plugins from plugins/.
Specify Versions
To use specific OpenSearch and OpenSearch Dashboards versions:
Development with Agents
Include Wazuh agents in the environment:
SAML Environment
Enable SAML authentication:
External Plugin Repositories
Mount external plugin repositories using the -r flag:
Environment Components
The Docker environment includes:
OpenSearch single-node cluster - Indexer for Wazuh data
Wazuh manager - Real or local build depending on flags
OpenSearch Dashboards dev environment - Bootstrapped with pre-compiled node modules
Wazuh agents (optional) - Deployed based on -a flag
Imposter - Mock server for testing
Elasticsearch-exporter - Metrics adapter for Prometheus
Starting the Development Server
Attach a shell to the development container:
From inside the container:
The dashboard becomes available at:
Hot Reloading
The development server supports hot module reloading. Changes to plugin code are automatically detected and reloaded without restarting the server.
Package Scripts
The main plugin package.json includes several useful scripts:
Linting
Testing
See Testing for detailed testing information.
Building
API Data Generation
This script downloads the Wazuh API specification and generates:
common/api-info/endpoints.json - API endpoint definitions
common/api-info/security-actions.json - Security action definitions
Building System Packages
To build complete DEB or RPM system packages, see the detailed guide in the source repository at docs/dev/build-packages.md. This process:
Builds the base Wazuh Dashboard
Builds all plugin dependencies
Packages everything into distributable system packages
Key steps:
Clone and build wazuh-dashboard
Clone and build wazuh-security-dashboards-plugin
Clone and build wazuh-dashboard-plugins
Clone and build wazuh-dashboard-reporting
Clone and build wazuh-dashboard-security-analytics
Create ZIP packages
Run build-packages.sh script
Refer to ~/workspace/source/docs/dev/build-packages.md for the complete workflow.
Troubleshooting
Missing Dependencies
If build fails with missing dependencies:
OpenSearch Dashboards Version Mismatch
Ensure the OPENSEARCH_DASHBOARDS_VERSION environment variable matches the version in package.json:
Indexer Resources Download Failure
If the main plugin fails to download indexer resources, verify:
GIT_REF environment variable is set
The referenced branch/tag exists in wazuh-indexer-plugins
Network connectivity to GitHub
Docker Build Issues
If building inside Docker fails:
Ensure sufficient resources allocated to Docker Desktop
Check Docker daemon is running
Verify networks exist: docker network ls
Next Steps