Upgrading the Wazuh Docker deployment

To upgrade your Wazuh deployment using Docker, update the image tags in the docker-compose.yml file to the target version (5.0.0) and redeploy the stack.

Follow these steps to upgrade your deployment using the default docker-compose.yml file:

Stop the current deployment

  1. Stop and remove the running containers:

    # docker compose down
    

Update the image tags

Edit the image tags of all the services in the docker-compose.yml file to your desired version tag:

Single-node deployment

  1. Navigate to the wazuh-docker/single-node/ directory:

    # cd wazuh-docker/single-node/
    
  2. Edit the docker-compose.yml file and update the image field for all Wazuh services to the desired version.

    services:
      wazuh.manager:
        image: wazuh/wazuh-manager:5.0.0-beta2-latest
        ...
      wazuh.indexer:
        image: wazuh/wazuh-indexer:5.0.0-beta2-latest
        ...
      wazuh.dashboard:
        image: wazuh/wazuh-dashboard:5.0.0-beta2-latest
        ...
    

Multi-node deployment

  1. Navigate to the wazuh-docker/multi-node/ directory:

    # cd wazuh-docker/multi-node/
    
  2. Edit the docker-compose.yml file and update the image field for all Wazuh services to the desired version.

    services:
      wazuh.master:
        image: wazuh/wazuh-manager:5.0.0-beta2-latest
        ...
      wazuh.worker:
        image: wazuh/wazuh-manager:5.0.0-beta2-latest
        ...
      wazuh1.indexer:
        image: wazuh/wazuh-indexer:5.0.0-beta2-latest
        ...
      wazuh2.indexer:
        image: wazuh/wazuh-indexer:5.0.0-beta2-latest
        ...
      wazuh3.indexer:
        image: wazuh/wazuh-indexer:5.0.0-beta2-latest
        ...
      wazuh.dashboard:
        image: wazuh/wazuh-dashboard:5.0.0-beta2-latest
        ...
    

Start the updated deployment

  1. Start the upgraded Wazuh Docker environment using the docker compose command:

    # docker compose up -d
    

Your data and certificates remain persistent because they are stored in mounted Docker volumes. This means upgrading the environment does not erase your existing configuration or indexed data.