Prerequisites
Before beginning development, ensure the following dependencies are installed on your system:Required Tools
- Git - Version control system
- Node.js - Use the version specified in
.nvmrc(currently 22.22.0) - Yarn v1 (Yarn Classic) - Package manager
- Docker Desktop (optional) - Required for Docker-based development environments
Additional Utilities
For building packages and working with the full development workflow:jq- Command-line JSON processor (used to read plugin versions)zip,unzip- Archive utilitiesgzip- Compression utilitybrotli- Compression utilitycurl- Data transfer utility
Installing Node.js with nvm
The recommended approach is to use Node Version Manager (nvm) to install and manage Node.js versions.- Install nvm following the official installation guide
- Navigate to the repository root and install the required Node.js version:
.nvmrc file.
Installing Dependencies
The repository contains multiple plugins that require dependency installation. Install dependencies for each internal plugin:The
main plugin downloads indexer resources during installation. Ensure the referenced wazuh-indexer-plugins Git reference exists. See External Resources for details.Docker Desktop Setup
Docker Desktop provides a consistent development environment across Windows, macOS, and Linux.Installation
- Install Docker Desktop following the official instructions for your operating system
- Ensure Docker Compose version is 2.20.2 or higher
- Review the system requirements for your platform
Resource Allocation
Allocate sufficient resources to Docker Desktop:- Memory: 8 GB minimum (more is recommended)
- CPU Cores: 4 cores minimum
Network Configuration
Create the required Docker networks:Logging Driver
Install the Loki Docker logging driver for container log collection:User Permissions (Linux)
On Linux systems, configure Docker Desktop user permissions to avoid read-only volume issues:Editor Setup
Recommended Configuration
Visual Studio Code is the recommended editor with the following extensions:- ESLint - JavaScript/TypeScript linting
- Prettier - Code formatting
Debugging
For runtime debugging, use the OpenSearch Dashboards development server (see Running from Sources). This provides:- Hot module reloading
- Browser debugging for UI code
- Server-side debugging for plugin backend code
Repository Structure
The repository follows a hybrid model: Internal Plugins (in this repository):plugins/main- Main Wazuh dashboard pluginplugins/wazuh-core- Core utilities and shared componentsplugins/wazuh-check-updates- Update checking functionality
wazuh-dashboard-reporting- Reporting functionalitywazuh-security-dashboards-plugin- Security featureswazuh-dashboard-security-analytics- Security analytics features
Environment Variables
For convenience when working with multiple repositories, set environment variables:Verification
Verify your development environment is correctly configured:Next Steps
With your development environment configured:- Build the plugins from source
- Run the development server
- Execute tests
- Review the contributing guidelines