Start a GridGain 9 Cluster
Set up and run a three-node GridGain 9 cluster using Docker containers, then initialize and verify it.
This guide walks you through the process of setting up and running a GridGain 9 cluster using Docker containers. Follow these steps to get a three-node cluster up and running quickly.
Prerequisites
Up-to-date Docker and Docker Compose installed on your system
Basic familiarity with command-line operations
The code editor of your choice (VS Code, IntelliJ IDEA, etc.)
Step 1: Create a Docker-Compose Configuration
Download
docker-compose.ymlfile or create a file in your project directory:
name: gridgain9
x-gridgain-def: &gridgain-def
image: gridgain/gridgain9:latest
environment:
JVM_MAX_MEM: "4g"
JVM_MIN_MEM: "4g"
BOOTSTRAP_NODE_CONFIG: /opt/gridgain/etc/gridgain-config.conf
configs:
- source: node_config
target: /opt/gridgain/etc/gridgain-config.conf
mode: 0644
services:
node1:
<<: *gridgain-def
command: --node-name node1
ports:
- "10300:10300"
- "10800:10800"
node2:
<<: *gridgain-def
command: --node-name node2
ports:
- "10301:10300"
- "10801:10800"
node3:
<<: *gridgain-def
command: --node-name node3
ports:
- "10302:10300"
- "10802:10800"
configs:
node_config:
content: |
ignite {
network {
port: 3344
nodeFinder.netClusterNodes = ["node1:3344", "node2:3344", "node3:3344"]
}
}Then download the Docker image:
Step 2: Start the Ignite Cluster
Open a terminal in the directory containing your docker-compose.yml file
Run the following command to start the cluster:
Verify that all containers are running:
Here is how the command output may look:
Your nodes are now running, but the cluster is not initialized.
Step 3: Initialize the Cluster
Copy your license file into your project directory.
Start the Ignite CLI in Docker:
Inside the CLI, connect to one of the nodes:
Confirm the connection to the default node in the CLI tool.
Initialize the cluster with a name and license:
The output from this step should be similar to this:
Step 4: Verify Your Cluster
Use the cluster status CLI command to verify your cluster is running correctly.
The output should look similar to this:
This means that all 3 nodes found each other and formed an active cluster.
Exit the CLI by typing exit or pressing Ctrl+D. This will also stop the CLI container.
Congratulations! You have a local GridGain 9 cluster running that you can use for development.
Understanding Port Configuration
The docker-compose file exposes two types of ports for each node:
10300-10302: REST API ports for administrative operations;
10800-10802: Client connection ports for your applications.
Configuring Logs
Default Setup
By default, GridGain logs are written to the Docker container's runtime output, meaning they are tied to the container's lifecycle. These logs are not persistent as they are managed by the Docker and will be lost if the container is removed.
Use the docker logs command to access the logs:
Custom Setup
To make logs persistent and redirect them to a file on the host system, follow these steps:
Use the preconfigured file or create a new one and place it on the host system. Set a file path for the log output inside the container:
Make sure that java.util.logging.FileHandler.pattern specifies the full file path for the log file inside the container. It should match the mounted volume path (/gridgain/log) defined in step 2.
Run the container with volume mounts to bind the log output directory and the config file to the host system:
After the container starts, verify that the log file is created on the host:
Stopping the Cluster
If you want to pause your cluster:
This will stop the containers and retain your data.
Removing the Cluster
When you are done working with the cluster, you can remove it using:
This will stop and remove all the containers. Your data will be lost unless you have configured persistent storage.
See Also
This page is: Copyright © 2026 MariaDB. All rights reserved.
Last updated
Was this helpful?

