I've run some local tests successfully, and I was able to add the new node without any issues.
I'll share the steps I took so you can check your configuration:
Node 1: All in One:
```
vagrant@cbordon-4330:~$ sudo bash wazuh-install.sh -a
21/04/2025 13:11:31 INFO: Starting Wazuh installation assistant. Wazuh version: 4.11.2 (x86_64/AMD64)
21/04/2025 13:11:31 INFO: Verbose logging redirected to /var/log/wazuh-install.log
21/04/2025 13:11:48 INFO: Verifying that your system meets the recommended minimum hardware requirements.
21/04/2025 13:11:48 INFO: Wazuh web interface port will be 443.
21/04/2025 13:11:53 INFO: --- Dependencies ----
21/04/2025 13:11:53 INFO: Installing apt-transport-https.
21/04/2025 13:11:57 INFO: Installing debhelper.
21/04/2025 13:12:20 INFO: Wazuh repository added.
21/04/2025 13:12:20 INFO: --- Configuration files ---
21/04/2025 13:12:20 INFO: Generating configuration files.
21/04/2025 13:12:20 INFO: Generating the root certificate.
21/04/2025 13:12:20 INFO: Generating Admin certificates.
21/04/2025 13:12:21 INFO: Generating Wazuh indexer certificates.
21/04/2025 13:12:21 INFO: Generating Filebeat certificates.
21/04/2025 13:12:21 INFO: Generating Wazuh dashboard certificates.
21/04/2025 13:12:21 INFO: Created wazuh-install-files.tar. It contains the Wazuh cluster key, certificates, and passwords necessary for installation.
21/04/2025 13:12:21 INFO: --- Wazuh indexer ---
21/04/2025 13:12:21 INFO: Starting Wazuh indexer installation.
21/04/2025 13:13:56 INFO: Wazuh indexer installation finished.
21/04/2025 13:13:56 INFO: Wazuh indexer post-install configuration finished.
21/04/2025 13:13:56 INFO: Starting service wazuh-indexer.
21/04/2025 13:14:07 INFO: wazuh-indexer service started.
21/04/2025 13:14:07 INFO: Initializing Wazuh indexer cluster security settings.
21/04/2025 13:14:10 INFO: Wazuh indexer cluster security configuration initialized.
21/04/2025 13:14:10 INFO: Wazuh indexer cluster initialized.
21/04/2025 13:14:10 INFO: --- Wazuh server ---
21/04/2025 13:14:10 INFO: Starting the Wazuh manager installation.
21/04/2025 13:15:31 INFO: Wazuh manager installation finished.
21/04/2025 13:15:31 INFO: Wazuh manager vulnerability detection configuration finished.
21/04/2025 13:15:31 INFO: Starting service wazuh-manager.
21/04/2025 13:15:47 INFO: wazuh-manager service started.
21/04/2025 13:15:47 INFO: Starting Filebeat installation.
21/04/2025 13:16:07 INFO: Filebeat installation finished.
21/04/2025 13:16:10 INFO: Filebeat post-install configuration finished.
21/04/2025 13:16:10 INFO: Starting service filebeat.
21/04/2025 13:16:11 INFO: filebeat service started.
21/04/2025 13:16:11 INFO: --- Wazuh dashboard ---
21/04/2025 13:16:11 INFO: Starting Wazuh dashboard installation.
21/04/2025 13:17:17 INFO: Wazuh dashboard installation finished.
21/04/2025 13:17:17 INFO: Wazuh dashboard post-install configuration finished.
21/04/2025 13:17:17 INFO: Starting service wazuh-dashboard.
21/04/2025 13:17:17 INFO: wazuh-dashboard service started.
21/04/2025 13:17:18 INFO: Updating the internal users.
21/04/2025 13:17:23 INFO: A backup of the internal users has been saved in the /etc/wazuh-indexer/internalusers-backup folder.
21/04/2025 13:17:34 INFO: The filebeat.yml file has been updated to use the Filebeat Keystore username and password.
21/04/2025 13:18:03 INFO: Initializing Wazuh dashboard web application.
21/04/2025 13:18:04 INFO: Wazuh dashboard web application initialized.
21/04/2025 13:18:04 INFO: --- Summary ---
21/04/2025 13:18:04 INFO: You can access the web interface https://<wazuh-dashboard-ip>:443
User: admin
Password: .w+6q7iJuZ4qv+ARaPiSZrt5Qn3IMZ94
21/04/2025 13:18:04 INFO: Installation finished.
```
After this, move forward with this documentation:
https://documentation.wazuh.com/current/user-manual/wazuh-indexer-cluster/add-wazuh-indexer-nodes.html#all-in-one-deploymentThis is how my new config.yml looks like.
```
config.yml
nodes:
# Wazuh indexer nodes
indexer:
- name: wazuh-indexer
ip: 192.168.57.242
- name: wazuh-indexer-2
ip: 192.168.57.178
# Wazuh server nodes
server:
- name: wazuh-server
ip: 192.168.57.242
# Wazuh dashboard nodes
dashboard:
- name: wazuh-dashboard
ip: 192.168.57.242
```
After this, I could create the new certificates and copy these new certificates to the new node:
Once this is done, follow the steps indicated here:
https://documentation.wazuh.com/current/user-manual/wazuh-indexer-cluster/add-wazuh-indexer-nodes.html#configuring-existing-components-to-connect-with-the-new-node```
env_variables.sh
export NODE_NAME1=wazuh-indexer
export NODE_NAME2=wazuh-server
export NODE_NAME3=wazuh-dashboard
```
```
deploy-certificates.sh
#!/bin/bash
# Source the environmental variables from the external file
source ~/env_variables.sh
rm -rf /etc/wazuh-indexer/certs
mkdir /etc/wazuh-indexer/certs
tar -xf ./wazuh-certificates.tar -C /etc/wazuh-indexer/certs/ ./$NODE_NAME1.pem ./$NODE_NAME1-key.pem ./admin.pem ./admin-key.pem ./root-ca.pem
mv -n /etc/wazuh-indexer/certs/$NODE_NAME1.pem /etc/wazuh-indexer/certs/wazuh-indexer.pem
mv -n /etc/wazuh-indexer/certs/$NODE_NAME1-key.pem /etc/wazuh-indexer/certs/wazuh-indexer-key.pem
chmod 500 /etc/wazuh-indexer/certs
chmod 400 /etc/wazuh-indexer/certs/*
chown -R wazuh-indexer:wazuh-indexer /etc/wazuh-indexer/certs
rm -rf /etc/filebeat/certs
mkdir /etc/filebeat/certs
tar -xf ./wazuh-certificates.tar -C /etc/filebeat/certs/ ./$NODE_NAME2.pem ./$NODE_NAME2-key.pem ./root-ca.pem
mv -n /etc/filebeat/certs/$NODE_NAME2.pem /etc/filebeat/certs/wazuh-server.pem
mv -n /etc/filebeat/certs/$NODE_NAME2-key.pem /etc/filebeat/certs/wazuh-server-key.pem
chmod 500 /etc/filebeat/certs
chmod 400 /etc/filebeat/certs/*
chown -R root:root /etc/filebeat/certs
rm -rf /etc/wazuh-dashboard/certs
mkdir /etc/wazuh-dashboard/certs
tar -xf ./wazuh-certificates.tar -C /etc/wazuh-dashboard/certs/ ./$NODE_NAME3.pem ./$NODE_NAME3-key.pem ./root-ca.pem
mv -n /etc/wazuh-dashboard/certs/$NODE_NAME3.pem /etc/wazuh-dashboard/certs/wazuh-dashboard.pem
mv -n /etc/wazuh-dashboard/certs/$NODE_NAME3-key.pem /etc/wazuh-dashboard/certs/wazuh-dashboard-key.pem
chmod 500 /etc/wazuh-dashboard/certs
chmod 400 /etc/wazuh-dashboard/certs/*
chown -R wazuh-dashboard:wazuh-dashboard /etc/wazuh-dashboard/certs
```
Edit the opensearch.yml and filebeat.yml files as follows:
```
/etc/wazuh-indexer/opensearch.yml
network.host: "192.168.57.242"
node.name: "wazuh-indexer"
cluster.initial_master_nodes:
- "wazuh-indexer"
- "wazuh-indexer-2"
cluster.name: "wazuh-cluster"
discovery.seed_hosts:
- "192.168.57.242"
- "192.168.57.178"
node.max_local_storage_nodes: "3"
path.data: /var/lib/wazuh-indexer
path.logs: /var/log/wazuh-indexer
plugins.security.ssl.http.pemcert_filepath: /etc/wazuh-indexer/certs/wazuh-indexer.pem
plugins.security.ssl.http.pemkey_filepath: /etc/wazuh-indexer/certs/wazuh-indexer-key.pem
plugins.security.ssl.http.pemtrustedcas_filepath: /etc/wazuh-indexer/certs/root-ca.pem
plugins.security.ssl.transport.pemcert_filepath: /etc/wazuh-indexer/certs/wazuh-indexer.pem
plugins.security.ssl.transport.pemkey_filepath: /etc/wazuh-indexer/certs/wazuh-indexer-key.pem
plugins.security.ssl.transport.pemtrustedcas_filepath: /etc/wazuh-indexer/certs/root-ca.pem
plugins.security.ssl.http.enabled: true
plugins.security.ssl.transport.enforce_hostname_verification: false
plugins.security.ssl.transport.resolve_hostname: false
plugins.security.ssl.http.enabled_ciphers:
- "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
- "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
- "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"
- "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"
plugins.security.ssl.http.enabled_protocols:
- "TLSv1.2"
plugins.security.authcz.admin_dn:
- "CN=admin,OU=Wazuh,O=Wazuh,L=California,C=US"
plugins.security.check_snapshot_restore_write_privileges: true
plugins.security.enable_snapshot_restore_privilege: true
plugins.security.nodes_dn:
- "CN=wazuh-indexer,OU=Wazuh,O=Wazuh,L=California,C=US"
- "CN=wazuh-indexer-2,OU=Wazuh,O=Wazuh,L=California,C=US"
plugins.security.restapi.roles_enabled:
- "all_access"
- "security_rest_api_access"
plugins.security.system_indices.enabled: true
plugins.security.system_indices.indices: [".opendistro-alerting-config", ".opendistro-alerting-alert*", ".opendistro-anomaly-results*", ".opendistro-anomaly-detector*", ".opendistro-anomaly-checkpoints", ".opendistro-anomaly-detection-state", ".opendistro-reports-*", ".opendistro-notifications-*", ".opendistro-notebooks", ".opensearch-observability", ".opendistro-asynchronous-search-response*", ".replication-metadata-store"]
### Option to allow Filebeat-oss 7.10.2 to work ###
compatibility.override_main_response_version: true
```
```
root@cbordon-4330:~# cat /etc/filebeat/filebeat.yml
# Wazuh - Filebeat configuration file
output.elasticsearch.hosts:
-
192.168.57.242:9200 -
192.168.57.178:9200# - <elasticsearch_ip_node_3>:9200
output.elasticsearch:
protocol: https
username: ${username}
password: ${password}
ssl.certificate_authorities:
- /etc/filebeat/certs/root-ca.pem
ssl.certificate: "/etc/filebeat/certs/wazuh-server.pem"
ssl.key: "/etc/filebeat/certs/wazuh-server-key.pem"
setup.template.json.enabled: true
setup.template.json.path: '/etc/filebeat/wazuh-template.json'
setup.template.json.name: 'wazuh'
setup.ilm.overwrite: true
setup.ilm.enabled: false
filebeat.modules:
- module: wazuh
alerts:
enabled: true
archives:
enabled: false
logging.level: info
logging.to_files: true
logging.files:
path: /var/log/filebeat
name: filebeat
keepfiles: 7
permissions: 0644
logging.metrics.enabled: false
seccomp:
default_action: allow
syscalls:
- action: allow
names:
- rseq
```
After restarting all services as instructed in the documentation, proceed with this step:
https://documentation.wazuh.com/current/user-manual/wazuh-indexer-cluster/add-wazuh-indexer-nodes.html#wazuh-indexer-node-s-installationThis is how the new node is configured:
```
cat /etc/wazuh-indexer/opensearch
cat: /etc/wazuh-indexer/opensearch: No such file or directory
root@cbordon-59:~# cat /etc/wazuh-indexer/opensearch.yml
network.host: "192.168.57.178"
node.name: "wazuh-indexer-2"
cluster.initial_master_nodes:
- "wazuh-indexer-2"
- "wazuh-indexer"
#- "node-3"
cluster.name: "wazuh-cluster"
discovery.seed_hosts:
- "192.168.57.178"
- "192.168.57.242"
# - "node-3-ip"
node.max_local_storage_nodes: "3"
path.data: /var/lib/wazuh-indexer
path.logs: /var/log/wazuh-indexer
plugins.security.ssl.http.pemcert_filepath: /etc/wazuh-indexer/certs/indexer.pem
plugins.security.ssl.http.pemkey_filepath: /etc/wazuh-indexer/certs/indexer-key.pem
plugins.security.ssl.http.pemtrustedcas_filepath: /etc/wazuh-indexer/certs/root-ca.pem
plugins.security.ssl.transport.pemcert_filepath: /etc/wazuh-indexer/certs/indexer.pem
plugins.security.ssl.transport.pemkey_filepath: /etc/wazuh-indexer/certs/indexer-key.pem
plugins.security.ssl.transport.pemtrustedcas_filepath: /etc/wazuh-indexer/certs/root-ca.pem
plugins.security.ssl.http.enabled: true
plugins.security.ssl.transport.enforce_hostname_verification: false
plugins.security.ssl.transport.resolve_hostname: false
plugins.security.authcz.admin_dn:
- "CN=admin,OU=Wazuh,O=Wazuh,L=California,C=US"
plugins.security.check_snapshot_restore_write_privileges: true
plugins.security.enable_snapshot_restore_privilege: true
plugins.security.nodes_dn:
- "CN=wazuh-indexer-2,OU=Wazuh,O=Wazuh,L=California,C=US"
- "CN=wazuh-indexer,OU=Wazuh,O=Wazuh,L=California,C=US"
#- "CN=node-3,OU=Wazuh,O=Wazuh,L=California,C=US"
plugins.security.restapi.roles_enabled:
- "all_access"
- "security_rest_api_access"
plugins.security.system_indices.enabled: true
plugins.security.system_indices.indices: [".plugins-ml-model", ".plugins-ml-task", ".opendistro-alerting-config", ".opendistro-alerting-alert*", ".opendistro-anomaly-results*", ".opendistro-anomaly-detector*", ".opendistro-anomaly-checkpoints", ".opendistro-anomaly-detection-state", ".opendistro-reports-*", ".opensearch-notifications-*", ".opensearch-notebooks", ".opensearch-observability", ".opendistro-asynchronous-search-response*", ".replication-metadata-store"]
### Option to allow Filebeat-oss 7.10.2 to work ###
compatibility.override_main_response_version: true
```
Once the certificates have been deployed to the new node, start the security admin without problems:
Node 1
```
root@cbordon-4330:~# /usr/share/wazuh-indexer/bin/indexer-security-init.sh
**************************************************************************
** This tool will be deprecated in the next major release of OpenSearch **
**
https://github.com/opensearch-project/security/issues/1755 **
**************************************************************************
Security Admin v7
Will connect to
192.168.57.242:9200 ... done
Connected as "CN=admin,OU=Wazuh,O=Wazuh,L=California,C=US"
OpenSearch Version: 2.16.0
Contacting opensearch cluster 'opensearch' and wait for YELLOW clusterstate ...
Clustername: wazuh-cluster
Clusterstate: GREEN
Number of nodes: 1
Number of data nodes: 1
.opendistro_security index already exists, so we do not need to create one.
Populate config from /etc/wazuh-indexer/opensearch-security/
Will update '/config' with /etc/wazuh-indexer/opensearch-security/config.yml
SUCC: Configuration for 'config' created or updated
Will update '/roles' with /etc/wazuh-indexer/opensearch-security/roles.yml
SUCC: Configuration for 'roles' created or updated
Will update '/rolesmapping' with /etc/wazuh-indexer/opensearch-security/roles_mapping.yml
SUCC: Configuration for 'rolesmapping' created or updated
Will update '/internalusers' with /etc/wazuh-indexer/opensearch-security/internal_users.yml
SUCC: Configuration for 'internalusers' created or updated
Will update '/actiongroups' with /etc/wazuh-indexer/opensearch-security/action_groups.yml
SUCC: Configuration for 'actiongroups' created or updated
Will update '/tenants' with /etc/wazuh-indexer/opensearch-security/tenants.yml
SUCC: Configuration for 'tenants' created or updated
Will update '/nodesdn' with /etc/wazuh-indexer/opensearch-security/nodes_dn.yml
SUCC: Configuration for 'nodesdn' created or updated
Will update '/whitelist' with /etc/wazuh-indexer/opensearch-security/whitelist.yml
SUCC: Configuration for 'whitelist' created or updated
Will update '/audit' with /etc/wazuh-indexer/opensearch-security/audit.yml
SUCC: Configuration for 'audit' created or updated
Will update '/allowlist' with /etc/wazuh-indexer/opensearch-security/allowlist.yml
SUCC: Configuration for 'allowlist' created or updated
SUCC: Expected 10 config types for node {"updated_config_types":["allowlist","tenants","rolesmapping","nodesdn","audit","roles","whitelist","actiongroups","config","internalusers"],"updated_config_size":10,"message":null} is 10 (["allowlist","tenants","rolesmapping","nodesdn","audit","roles","whitelist","actiongroups","config","internalusers"]) due to: null
Done with success
```
Node 2
```
root@cbordon-59:~# /usr/share/wazuh-indexer/bin/indexer-security-init.sh
**************************************************************************
** This tool will be deprecated in the next major release of OpenSearch **
**
https://github.com/opensearch-project/security/issues/1755 **
**************************************************************************
Security Admin v7
Will connect to
192.168.57.178:9200 ... done
Connected as "CN=admin,OU=Wazuh,O=Wazuh,L=California,C=US"
OpenSearch Version: 2.16.0
Contacting opensearch cluster 'opensearch' and wait for YELLOW clusterstate ...
Clustername: wazuh-cluster
Clusterstate: GREEN
Number of nodes: 2
Number of data nodes: 2
.opendistro_security index already exists, so we do not need to create one.
Populate config from /etc/wazuh-indexer/opensearch-security/
Will update '/config' with /etc/wazuh-indexer/opensearch-security/config.yml
SUCC: Configuration for 'config' created or updated
Will update '/roles' with /etc/wazuh-indexer/opensearch-security/roles.yml
SUCC: Configuration for 'roles' created or updated
Will update '/rolesmapping' with /etc/wazuh-indexer/opensearch-security/roles_mapping.yml
SUCC: Configuration for 'rolesmapping' created or updated
Will update '/internalusers' with /etc/wazuh-indexer/opensearch-security/internal_users.yml
SUCC: Configuration for 'internalusers' created or updated
Will update '/actiongroups' with /etc/wazuh-indexer/opensearch-security/action_groups.yml
SUCC: Configuration for 'actiongroups' created or updated
Will update '/tenants' with /etc/wazuh-indexer/opensearch-security/tenants.yml
SUCC: Configuration for 'tenants' created or updated
Will update '/nodesdn' with /etc/wazuh-indexer/opensearch-security/nodes_dn.yml
SUCC: Configuration for 'nodesdn' created or updated
Will update '/whitelist' with /etc/wazuh-indexer/opensearch-security/whitelist.yml
SUCC: Configuration for 'whitelist' created or updated
Will update '/audit' with /etc/wazuh-indexer/opensearch-security/audit.yml
SUCC: Configuration for 'audit' created or updated
Will update '/allowlist' with /etc/wazuh-indexer/opensearch-security/allowlist.yml
SUCC: Configuration for 'allowlist' created or updated
SUCC: Expected 10 config types for node {"updated_config_types":["allowlist","tenants","rolesmapping","nodesdn","audit","roles","whitelist","actiongroups","config","internalusers"],"updated_config_size":10,"message":null} is 10 (["allowlist","tenants","rolesmapping","nodesdn","audit","roles","whitelist","actiongroups","config","internalusers"]) due to: null
SUCC: Expected 10 config types for node {"updated_config_types":["allowlist","tenants","rolesmapping","nodesdn","audit","roles","whitelist","actiongroups","config","internalusers"],"updated_config_size":10,"message":null} is 10 (["allowlist","tenants","rolesmapping","nodesdn","audit","roles","whitelist","actiongroups","config","internalusers"]) due to: null
Done with success
```
Filebeat
```
filebeat test output
elasticsearch: https://192.168.57.242:9200...
parse url... OK
connection...
parse host... OK
dns lookup... OK
addresses: 192.168.57.242
dial up... OK
TLS...
security: server's certificate chain verification is enabled
handshake... OK
TLS version: TLSv1.2
dial up... OK
talk to server... OK
version: 7.10.2
elasticsearch: https://192.168.57.178:9200...
parse url... OK
connection...
parse host... OK
dns lookup... OK
addresses: 192.168.57.178
dial up... OK
TLS...
security: server's certificate chain verification is enabled
handshake... OK
TLS version: TLSv1.3
dial up... OK
talk to server... OK
version: 7.10.2
```
Test Wazuh indexer:
```
curl -XGET
https://192.168.57.242:9200/_cluster/health?pretty -u admin:admin -k
{
"cluster_name" : "wazuh-cluster",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 2,
"number_of_data_nodes" : 2,
"discovered_master" : true,
"discovered_cluster_manager" : true,
"active_primary_shards" : 11,
"active_shards" : 19,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}
```