Important! Cassandra is not supported on Windows!

We do not provide support for Cassandra installations on Windows as those installations are not natively supported by Apache. We strongly recommend using Linux deployments. The information below is provided as a courtesy only.

Warning: Docker on Windows (including Docker Desktop and WSL) is intended for development purposes only. Due to architectural limitations, it should not be used for production deployments. For more information, please refer to the official Microsoft WSL documentation (Who is WSL for?).

One option for running Cassandra 5.0 on Windows is Docker. See Install Docker Desktop on Windows for official installation instructions.

Additional resources:

Docker Cassandra basics

This section provides the basics for starting a Docker Cassandra 5.0 container, for testing purposes only. For production deployment, we recommend generating a custom Docker image as described in the section Custom Docker Cassandra image.

Start an instance of the official Cassandra 5.0.5 Docker image by executing this command:

docker run --name cassandra5_test –p 9042:9042 –v e:\cassandra\data:/var/lib/cassandra -d cassandra:5.0.5
BASH


Parameter

Value

Description

--name

cassandra5_test

User-defined container instance name. This is an optional parameter. The name must be unique and cannot be the same as the official Docker image name.

-v

e:/cassandra/data/:/var/lib/cassandra

Mount an external drive to a path in the Docker container instance. /var/lib/cassandra is the default Cassandra path for data and commit log storage. An external drive must be mounted for permanent data storage.

-d


Detach and run in the background.

-p

9042:9042

Publish port 9042 to Windows host. 9042 is the native client port.

[image name]:version

cassandra:5.0.5

Pull the official Apache Cassandra 5 Docker image for this running instance.


If this is a new Docker installation, the first docker run execution downloads the Cassandra image to the local system.

To access logs:

docker logs <container name or ID>
BASH

To access nodetool (or other tools):

docker exec -it <container name or ID> nodetool status
BASH

Newer Java versions require the -Dcom.sun.jndi.rmiURLParsing=legacy option. If the “Malformed IPv6 address” error occurs, use:

docker exec -it <container name or ID> nodetool -Dcom.sun.jndi.rmiURLParsing=legacy status
BASH


Docker instances are ephemeral by design. If an instance terminates or is deleted, all data, logs, and configuration files modified inside the instance are lost.

Custom Docker Cassandra image

Production deployment of Cassandra 5.0 on Windows requires modifying system configurations. Therefore, a custom Docker image must be created with the configuration changes. This section covers setting up and running a custom Docker image. Details of the configuration changes are discussed in section Cassandra configuration.

  1. Download and extract the CustomTWC_Cassandra5_DockerImg.zip package into an empty working directory.
  2. Execute the following command to build the custom Docker image named cassandra5_twc:

    docker build –t cassandra5_twc:latest .
    BASH
  3. Start an instance of the custom Docker Cassandra 5.0 image you just built:

    docker run –p 9042:9042 –v d:\data:/data –v e:\log\commitlog:/logs/commitlog -d cassandra5_twc:latest
    BASH


    The data and commit log directories are mounted separately, to different paths.

With the custom Docker Cassandra instance running and mounted to permanent storage, the database is ready to connect to your Teamwork Cloud installation.

If more configuration changes are needed, the running instance has to be terminated and a new Docker image needs to be built. Edit the configuration file from the working directory in Step 1. Proceed with steps 2-3 to redeploy the Cassandra node on Windows.

Cassandra configuration

This section is a summary of the configuration changes to optimize Docker Cassandra deployment for Teamwork Cloud. If additional configuration changes are needed, the Docker Cassandra image has to be rebuilt.

Synchronize the CPU clocks on all Cassandra cluster nodes. Otherwise, you may encounter issues when creating an empty Cassandra cluster.

Please see the settings to optimize Cassandra for better performance.