Wazuh Docker Docker Compose Containers SIEM Cybersecurity

How to Install Wazuh with Docker Compose

Step-by-step guide to install Wazuh using Docker Compose. Deploy the full SIEM in minutes with containers: Indexer, Server and Dashboard up and running.

AI Security
12 min read
Background

To install Wazuh with Docker Compose, clone the official repository, run docker-compose up -d and in minutes you'll have the three components up: Indexer, Server and Dashboard. You only need Docker and Docker Compose installed on the server.

How to install Wazuh with Docker Compose step by step?

In this guide I'll show you how to install Wazuh using Docker Compose, one of the fastest and simplest ways to deploy the full environment. With just 4 commands you'll have Wazuh running with all its components: Indexer, Server and Dashboard.

Video: Installing Wazuh with Docker

Video: Installing Wazuh with Docker

12 minutes - Step by step with Docker Compose

Why use Docker for Wazuh?

Docker offers several advantages for deploying Wazuh:

  • Speed: The full environment is ready in minutes
  • Portability: It works the same on any system with Docker installed
  • Isolation: The containers don't interfere with other system services
  • Easy upgrades: Changing version is as simple as editing the tag
  • Ideal for testing: Perfect for labs and development environments

Prerequisites

Before you start, you need to have installed:

  • Docker (version 20.10 or higher)
  • Docker Compose (version 2.0 or higher)
  • Git to clone the repository
Resource Minimum Recommended
CPU 2 cores 4 cores
RAM 4 GB 8 GB
Disk 20 GB 50 GB SSD

Installation commands

The installation is done in 4 simple steps:

1. Clone the official repository

git clone https://github.com/wazuh/wazuh-docker.git -b v4.14.3

This downloads the official Wazuh repository for Docker on version 4.14.3.

2. Enter the single-node directory

cd wazuh-docker/single-node/

The single-node directory contains the configuration to deploy all components on a single server. There's also multi-node for distributed deployments.

3. Generate SSL certificates

docker compose -f generate-indexer-certs.yml run --rm generator

This command generates the certificates needed for secure communication between components.

4. Bring up the containers

docker compose up -d

The -d flag runs the containers in the background (detached mode).

All the commands together:

git clone https://github.com/wazuh/wazuh-docker.git -b v4.14.3
cd wazuh-docker/single-node/
docker compose -f generate-indexer-certs.yml run --rm generator
docker compose up -d

Access the Dashboard

Once the containers are up, access the Dashboard at:

https://server-IP or https://localhost (if it's on your own machine)

The default credentials are:

  • Username: admin
  • Password: SecretPassword

Get container information

To see the configuration and environment variables of the server container:

docker inspect server-container-id

Important: Change the default password in production environments. You can do it by editing the docker-compose.yml file before bringing up the containers.

Useful commands

Some commands that will come in handy for managing the deployment:

# Check container status
docker compose ps

# View logs in real time
docker compose logs -f

# Stop the containers
docker compose down

# Restart the containers
docker compose restart

Additional resources


Related articles:


Get Wazuh deployed the right way

This article is just the beginning. We can configure agents, build custom rules, integrate with other tools and much more.

Background