Apache Cassandra is a highly scalable, distributed NoSQL database designed to handle large amounts of data across multiple servers without a single point of failure. Unlike traditional relational databases, Cassandra stores data in a decentralized architecture, making it ideal for applications that require high availability, fault tolerance, and fast read/write performance.
Although Cassandra is commonly deployed on Linux servers, you can also install and run it on Windows 11 for development, testing, or learning purposes. Since Cassandra requires Java, you’ll need to install a compatible Java Development Kit (JDK) before configuring the database. Once installed, you can use the Cassandra Query Language (CQL) shell to create keyspaces, tables, and manage your database.
In this guide, you’ll learn how to install Apache Cassandra DB on Windows 11, including downloading Java, configuring environment variables, installing Cassandra, starting the database server, and verifying that everything works correctly.
What Is Apache Cassandra?
Apache Cassandra is an open-source distributed NoSQL database developed to manage massive amounts of structured and semi-structured data. It is designed for high availability, horizontal scalability, and fault tolerance, allowing applications to continue operating even if one or more servers fail.
Instead of storing data in tables with complex relationships like traditional SQL databases, Cassandra uses a column-family data model optimized for high-speed operations. It is widely used by large organizations that require reliable database performance across multiple data centers.
Some key features of Apache Cassandra include:
- Distributed architecture with no single point of failure
- Automatic data replication
- High write and read performance
- Horizontal scalability by adding more nodes
- Fault tolerance and high availability
- Support for Cassandra Query Language (CQL)
System Requirements
Before installing Apache Cassandra on Windows 11, ensure your computer meets the following requirements:
- Windows 11 (64-bit)
- Administrator account
- Internet connection
- At least 4 GB RAM (8 GB recommended)
- Around 2 GB of free disk space
- Java Development Kit (JDK 11 or a version supported by your Cassandra release)
Method 1: Install Java Development Kit (JDK)
Apache Cassandra cannot run without Java. The first step is installing a supported JDK.
Step 1: Download Java
- Open your web browser.
- Visit the official Oracle JDK website or another supported OpenJDK distribution.
- Download the Windows x64 installer for a supported JDK version.
- Save the installer to your computer.
Step 2: Install Java
- Double-click the downloaded installer.
- Click Next.
- Choose the installation location.
- Complete the installation.
Step 3: Verify Java Installation
- Press Windows + X.
- Select Terminal or Command Prompt.
- Run:
java -version
You should see the installed Java version.
Also verify:
javac -version
If both commands return version information, Java has been installed successfully.
Method 2: Configure the JAVA_HOME Environment Variable
Although newer Java installations may configure environment variables automatically, it’s good practice to verify them.
Step 1: Find the Java Installation Folder
Typically located at:
C:\Program Files\Java\
Copy the JDK installation path.
Step 2: Open Environment Variables
- Press Windows + S.
- Search for Edit the system environment variables.
- Open it.
- Click Environment Variables.
Step 3: Create JAVA_HOME
- Under System variables, click New.
- Variable name:
JAVA_HOME
- Variable value:
C:\Program Files\Java\jdk-xx
Replace jdk-xx with your installed version.
Step 4: Update the PATH Variable
Edit the Path variable and add:
%JAVA_HOME%\bin
Click OK to save the changes.
Step 5: Verify
Open a new Command Prompt and run:
echo %JAVA_HOME%
The correct installation path should be displayed.
Method 3: Download Apache Cassandra
Next, download the latest stable Cassandra release.
Step 1: Download Cassandra
- Visit the official Apache Cassandra download page.
- Download the Windows binary (ZIP or TAR archive).
Step 2: Extract the Files
Extract the downloaded archive to a location such as:
C:\Apache\Cassandra
Avoid extracting it into protected system folders if possible.
Method 4: Configure Apache Cassandra
Most users can run Cassandra using the default configuration, but it’s helpful to know where the important files are located.
The main configuration directory is:
conf
Inside this folder, you’ll find:
- cassandra.yaml
- cassandra-env.ps1 (or batch equivalents)
- logback.xml
- JVM configuration files
The primary configuration file is:
cassandra.yaml
You can later edit this file to change cluster names, ports, data directories, or network settings.
Method 5: Start Apache Cassandra
Now you’re ready to start the database.
Step 1: Open Command Prompt
Navigate to the Cassandra installation directory.
Example:
cd C:\Apache\Cassandra\bin
Step 2: Start Cassandra
Run:
cassandra
The server will begin initializing.
The first startup may take several minutes.
Keep this Command Prompt window open because it runs the Cassandra server.
Method 6: Verify Cassandra Is Running
Open another Command Prompt window.
Navigate to the bin folder and run:
cqlsh
If Cassandra starts correctly, you’ll see something similar to:
Connected to Test Cluster
cqlsh>
This confirms the database is running successfully.
Method 7: Create Your First Keyspace
A keyspace is similar to a database in relational database systems.
Inside the CQL shell, run:
CREATE KEYSPACE testdb
WITH replication = {
'class':'SimpleStrategy',
'replication_factor':1
};
Switch to the new keyspace:
USE testdb;
Method 8: Create a Table
Create your first table:
CREATE TABLE employees (
id int PRIMARY KEY,
name text,
department text
);
Insert sample data:
INSERT INTO employees (id,name,department)
VALUES (1,'John','IT');
Retrieve the data:
SELECT * FROM employees;
You should see the inserted record displayed in the terminal.
Method 9: Stop Apache Cassandra
When you’re finished, return to the Command Prompt window where Cassandra is running.
Press:
Ctrl + C
Confirm if prompted.
The Cassandra server will shut down safely.
Common Installation Issues
Java Not Found
If you receive:
'java' is not recognized...
Verify:
- Java is installed.
- JAVA_HOME is configured correctly.
- The Java bin directory exists in the PATH variable.
Restart Command Prompt after updating environment variables.
cqlsh Does Not Start
Ensure:
- Cassandra is already running.
- Firewall isn’t blocking local connections.
- Port 9042 is available.
Port Already in Use
If another application uses Cassandra’s default ports, edit the configuration file and assign different ports before restarting the server.
Insufficient Memory
If Cassandra reports JVM memory errors:
- Close unnecessary applications.
- Increase available RAM.
- Adjust JVM memory settings if required for development.
Tips for Better Performance
Although a default installation works well for learning, these practices can improve performance:
- Install Cassandra on an SSD instead of an HDD.
- Keep Java updated to a supported version.
- Use sufficient RAM for larger datasets.
- Avoid running unnecessary background applications.
- Regularly back up important data.
- Monitor logs for warnings and errors.
Conclusion
Installing Apache Cassandra on Windows 11 is straightforward once Java is properly configured. After downloading the Cassandra binaries, setting the required environment variables, and starting the server, you can connect using the Cassandra Query Language shell and begin creating keyspaces, tables, and data for development or testing.
While Cassandra is most commonly deployed on Linux-based production servers, running it on Windows is an excellent way to learn its architecture, experiment with distributed databases, and develop applications locally. By following the steps in this guide, you’ll have a fully functional Cassandra environment ready for use on your Windows 11 PC.
Frequently Asked Questions
Can I install Apache Cassandra on Windows 11?
Yes. Apache Cassandra supports Windows for development and testing environments. Production deployments are more commonly hosted on Linux servers.
Does Cassandra require Java?
Yes. Apache Cassandra requires a compatible Java Development Kit (JDK) to run. Install a supported JDK version before installing Cassandra.
Which port does Cassandra use?
By default, the Cassandra Query Language (CQL) service listens on port 9042, while other internal services use additional ports for cluster communication.
Can I use Cassandra without Docker on Windows?
Yes. You can install Cassandra directly on Windows 11 using the official binaries and a supported Java installation, without needing Docker or Windows Subsystem for Linux (WSL).



