forked from wazuh/wazuh-docker
1.7 KiB
1.7 KiB
Change passwords
This section describes how to rotate the credentials used by the provided Docker Compose deployments.
Scope
The Compose files include the following password-controlled integrations:
- Wazuh Indexer access (Manager and Dashboard clients):
INDEXER_USERNAME,INDEXER_PASSWORD - Wazuh Dashboard login:
DASHBOARD_USERNAME,DASHBOARD_PASSWORD - Wazuh API access (Dashboard client):
API_USERNAME,API_PASSWORD
For variable descriptions, see Environment variables.
Rotate credentials
-
Navigate to your deployment directory:
single-node/(single-node stack)multi-node/(multi-node stack)
-
Edit the deployment
docker-compose.ymland update the required values underenvironment:- Single-node: update
wazuh.managerandwazuh.dashboard. - Multi-node: update
wazuh.master,wazuh.worker, andwazuh.dashboard.
Ensure
INDEXER_USERNAMEandINDEXER_PASSWORDare consistent anywhere they are defined. - Single-node: update
-
Recreate the containers to apply the new values:
docker compose down docker compose up -d -
Validate access:
- Log in to the Dashboard with the updated credentials.
- Confirm the Dashboard can query data (indirectly validating the Indexer and API credentials).
Notes
- The Manager applies
API_USERNAME/API_PASSWORDat startup by creating or updating the API user. - The Dashboard regenerates its OpenSearch Dashboards keystore on startup; changes take effect after the container is recreated.
- Rotating Indexer credentials requires updating both the Indexer user configuration and the Compose client variables (
INDEXER_*).