email iconemail phone iconcall

Getting Started with Apache Cassandra on Windows the Easy Way

By Robin Schumacher, SVP and Chief Product Officer -  January 31, 2012 | 27 Comments

The legacy methods of developing with DataStax Enterprise on Windows as discussed in this blog post have evolved to using our new and improved Docker containers, which provide a much better development experience on Windows.

read now   DataStax Enterprise


By Robin Schumacher | January 31, 2012

Many architects and developers today are targeting Apache Cassandra as the underlying database because of its ability to easily scale and perform fast under extreme workloads. Developers like the fact that no modifications are required on their part if the application is initially written to just use one Cassandra node, but grows into hundreds in the future.

According to industry analysts such as Evans Data, Microsoft Windows remains the number one platform used by developers to write code and test their work (although Mac has recently been challenging that ranking). Many times developers need a complete environment to do their work, and this translates into having a full functioning copy of the database their application will target running on their Windows workstation or laptop.

For those wanting to develop against Apache Cassandra on Windows, this article will show you how to easily install, setup, and manage/monitor Apache Cassandra on a Windows machine.

Download the Software

The first step is to download the software you’ll need for your Windows machine. In the past, getting Apache Cassandra and all its utilities and management software on Windows wasn’t that easy, but that’s now a thing of the past since DataStax introduced its free Windows installer.

DataStax makes available the DataStax Community Edition, which contains the latest community version of Apache Cassandra, along with the Cassandra Query Language (CQL) utility, and a free edition of DataStax OpsCenter, which is the tool you’ll want to use for managing and monitoring your Cassandra cluster on Windows. To get Datastax Community Edition, go to the downloads page and select the Windows installation package for your version of Microsoft Windows. Note that 32 and 64-bit installers are offered.

Validate Prerequisites

The only prerequisites you’ll need for your Windows machine are:

  • Windows 7 or Windows 2008 server
  • Java
  • Either the Firefox or Chrome Web browser for DataStax OpsCenter (which doesn’t support Internet Explorer yet)
  • There is a dependency on the Visual C++ 2008 runtime (32bit), but Windows 7 and Windows 2008 Server R2 has it already installed. If you need it, see:

Using the Windows Installer

The Windows installer is an MSI package that is run like any other on Windows. When you execute the setup program, you are first presented with an initial welcome panel that identifies your installation package:

dsc windows

Clicking next takes you to the end user license agreement (don’t worry, the software is free):

dsc windows

The next panel allows you to specify where the software is to be installed:

dsc windows

Once the installation directory has been set, the installer will ask how you want to handle the services that will be installed. Installed services include:

  • The Apache Cassandra server, labeled DataStax Cassandra Community Service
  • The DataStax OpsCenter management tool, which includes both the OpsCenter service used to manage and monitor Cassandra, and the OpsCenter agent, which is used to gather metrics and carry out various tasks on every Cassandra node. Note that the primary OpsCenter service and agent are actually broken out into two distinct services on Windows

dsc windows

The next panel initiates the installation process:

dsc windows

dsc windows

The final panel asks if you would like to launch DataStax OpsCenter in your browser and also register to be updated when new versions of the software become available:

dsc windows

If you choose to execute DataStax OpsCenter (and you have either Google Chrome or Firefox as your default web browser), you’ll be presented with the OpsCenter dashboard:

dsc windows

dsc windows

Finding and Using Installed Software

You can find a number of the most used interfaces you’ll need in a Windows program group that the installer creates for you:

dsc windows

The primary interface into Cassandra is the CQL (Cassandra Query Language) shell utility, which can be used to create a new keyspace (analogous to a database in the RDBMS world) for the new Cassandra server:

create keyspace hr with replication={'class':'SimpleStrategy', 'replication_factor':1};

Once a keyspace is created, you can create column families (the primary data object in Cassandra), insert data, query data, and more:

use hr;
create table emp
         ... (empid int primary key,
         ... emp_first varchar,
         ... emp_last varchar,
         ... emp_dept varchar);
insert into emp (empid, emp_first, emp_last, emp_dept)
         ... values (1, 'Fred', 'Smith', 'HR');
insert into emp (empid, emp_first, emp_last, emp_dept)
         ... values (2, 'Mary', 'Taylor', 'HR');
insert into emp (empid, emp_first, emp_last, emp_dept)
         ... values (3, 'Bob', 'Jackson', 'Eng');
select * from emp;

 empid | emp_dept | emp_first | emp_last
     1 |       HR |      Fred |    Smith
     2 |       HR |      Mary |   Taylor
     3 |      Eng |       Bob |  Jackson

Typing, “Help;” at the CQL prompt will bring up the supported list of commands.

You can also use the Cassandra Command Line Interface (CLI) utility, which until the arrival of CQL was the primary interface used to create, manage, and query objects:

dsc windows

Another utility that’s used to perform various management tasks on Cassandra is the nodetool shell program. It’s not installed as a Windows program group item, and most of what it does can be visually performed through DataStax OpsCenter, but you can access it in the bin subdirectory that’s under the main installation directory:

dsc windows

Lastly, you can start, stop, and manage the various services installed via the standard Windows services control panel interface:

dsc windows


That’s all there is to it to get Apache Cassandra and the DataStax OpsCenter visual management and monitoring tool installed on your Windows machine. For other software such as application drivers, client libraries, and more visit the downloads page.

DataStax has many ways for you to advance in your career and knowledge.

You can take free classes, get certified, or read one of our many white papers.

register for classes

get certified

DBA's Guide to NoSQL


  1. animesh says:

    The below commend on CQL shell is throwing error :
    cqlsh> create keyspace hr
    … with strategy_class=’SimpleStrategy’ and
    … strategy_options:replication_factor=1;
    Bad Request: line 3:16 mismatched input ‘:’ expecting ‘=’

  2. These commands work on CQL shell:

    Connected to Test Cluster at localhost:9160.
    [cqlsh 3.0.2 | Cassandra 1.2.5 | CQL spec 3.0.0 | Thrift protocol 19.36.0]
    Use HELP for help.
    cqlsh> create keyspace hr
    ... with replication={'class':'SimpleStrategy', 'replication_factor':1};
    cqlsh> use hr;
    cqlsh:hr> create table emp
    ... (empid int primary key,
    ... emp_first varchar,
    ... emp_last varchar,
    ... emp_dept varchar);
    cqlsh:hr> insert into emp (empid, emp_first, emp_last, emp_dept)
    ... values (1, 'Fred', 'Smith', 'HR');
    cqlsh:hr> insert into emp (empid, emp_first, emp_last, emp_dept)
    ... values (2, 'Mary', 'Taylor', 'HR');
    cqlsh:hr> insert into emp (empid, emp_first, emp_last, emp_dept)
    ... values (3, 'Bob', 'Jackson', 'Eng');
    cqlsh:hr> select * from emp;

    empid | emp_dept | emp_first | emp_last
    1 | HR | Fred | Smith
    2 | HR | Mary | Taylor
    3 | Eng | Bob | Jackson


  3. Sumod Pawgi says:

    I have two questions
    1. The command “nodetool -h localhost ring”, gives a scrolling output essentially of the same data except the token keeps changing. In your example you get only one line of output. E.g. my output looks like –
    Datacenter: datacenter1
    Replicas: 0

    Address Rack Status State Load Owns Token rack1 Up Normal 55.66 KB 100.00% -92028
    08575681848283 rack1 Up Normal 55.66 KB 100.00% -91865
    89383384670650 rack1 Up Normal 55.66 KB 100.00% -90331
    87480047628915 rack1 Up Normal 55.66 KB 100.00% -89768
    71628370795793 rack1 Up Normal 55.66 KB 100.00% -89293
    77877052537319 rack1 Up Normal 55.66 KB 100.00% -89068
    31965697341820 rack1 Up Normal 55.66 KB 100.00% -88749

    2. When I make a query using the CLI interface, I do not get plain text responses, I get hexadecimal responses e.g.
    [default@unknown] connect localhost/9160;
    Connected to: “Test Cluster” on localhost/9160
    [default@unknown] use hr;
    Authenticated to keyspace: hr
    [default@hr] get emp[1];
    => (name=, value=, timestamp=1382954646348000)
    => (name=emp_dept, value=4852, timestamp=1382954646348000)
    => (name=emp_first, value=46726564, timestamp=1382954646348000)
    => (name=emp_last, value=536d697468, timestamp=1382954646348000)
    Returned 4 results.
    Elapsed time: 66 msec(s).

    I am using Ops Center 3.2.2, API version 19.37.0 and Cassandra version 2.x

  4. Robin Schumacher, SVP and Chief Product Officer Robin Schumacher says:

    Please use Stackoverflow for tech questions on Cassandra, DataStax Enterprise, or OpsCenter.

    1. Meenakshi says:


      try this will definetly run as you are running cql commands in windows platform

      CREATE KEYSPACE hr WITH replication={‘class’:’SimpleStrategy’ , ‘replication_factor’:1};

  5. Is there a fully managed version of Cassandra (i.e., C#) available or in development? C++/CLI, in my opinion, is far from optimal.

  6. Robin Schumacher, SVP and Chief Product Officer Robin Schumacher says:

    If by C# you mean a driver, yes, we do have a certified C# driver for Cassandra on our downloads page. If you mean a fully WIN-optimized version of Cassandra that is certified for WIN, that is in development now and hopefully will be available soon.

  7. kriti sharma says:

    how can i use ‘nodetool’ command in windows7 using cql3? i m a beginner with cassandra so pls help,

  8. Robin Schumacher, SVP and Chief Product Officer Robin Schumacher says:

    The nodetool utility is different from CQL and the CQL utility. The commands you use with nodetool are for administration purposes whereas CQL is a query language much like SQL is for RDBMS’s.

    Hope this helps.

  9. Shijo says:

    How do i connect to cassandra database from netbeans? Please answer me.

  10. Robin Schumacher, SVP and Chief Product Officer Robin Schumacher says:

    Assuming you are developing your app in Netbeans, you can use the DataStax Java driver to connect to Cassandra. More details about how to use it are available in the docs.

    In case your question is about being able to connect to Cassandra from an IDE like environment, you could try out DevCenter which is an IDE for CQL.

  11. GillMOz says:

    I have installed Cassandra/Ops Centre a few months ago.

    I am now playing with MAPR. Trying to open HUE from console ( opens up the OpCenter.

    Is there some redirection going on here. How do I fix this

  12. Vikas Kamath says:

    Can I do a 2 node setup using the community edition on windows . If yes how to do it?

    1. MILO says:

      Yes . For Simple Installation . Install Cassandra on 2 Windows machine . Make sure that 2 machine can talk to each other via ping .

      Just change below properties in cassandra.yaml.
      on both machine. Normally located in — C:\Program Files\DataStax Community\apache-cassandra\conf directory

      MACHINE A Configuration

      listen_address: IP ADDRESS of MACHINE A
      rpc_address: IP ADDRESS of MACHINE A

      ———- MACHINE B Configuration——-

      listen_address: IP ADDRESS of MACHINE B
      rpc_address: IP ADDRESS of MACHINE B

      Restart cassandra on both node and then run nodetool to verify

  13. Reza says:

    That was awesome. i want to install Cassandra multi node on Windows server 2012, Is there any step by step handbook like what is here?

    Thanks in advance,

    1. Vikrant Kumbhar says:

      Hi Reza,

      Do you got any way to install Cassandra multi node on Windows Server 2012 using DataStax ?

      Thank you,

  14. Sarfaraz Reddy says:

    Do you have something that works on Azure Windows VM?

  15. Tad Wimmer says:

    It appears that the Datastax-DDC distribution no longer installs the Cassandra-cli.

  16. Vipul Jain says:

    I had installed Cassandra 3.9.0 on my machine using Datastax websit. I am able to open Datastax Dev Center, but I am not able to open Cassandra CQL Shell. My system is 64 bit and I have JAVA 8 version already installed.

    When I click on Cassandra CQL Shell, the window automatically closes after 1 second.

    Please suggest what can I do.

  17. Jonathan Coffey says:

    For anybody having the same issue as me:

    The DataStax DDC Server 3.9.0 failed to start.

    Go to:

    Where I answered the question and hopefully will fix any issues you have with installation :)

  18. Logu says:

    The server did not start. Found cdc_raw_directory missing error in the logs. Worked fine after adding cdc_raw_directory option in the cassandra.yaml file.

    It will be nice if you can add this step to the installation procedure.

  19. Rageeth says:

    did u guys try it in a 64 bit machine… i tried all options and it doesnt work.. any help would be appreciated

  20. Robin Schumacher, SVP and Chief Product Officer Robin Schumacher says:

    Apologies for the trouble you’re having. We’ve discontinued Windows support due to low demand.

  21. Gopi says:

    Hi Robin,
    Thanks for all the excellent work you and your team has done with the Windows. I always found windows Cassandra very useful in our product tests and is impressed with the huge efforts you and your team has put in. Of course I also continue to use Cassandra on Unix environment. I respect windows and Unix world equally as long things get done properly.Thanks for the wonderful job. Hope the support for windows will start some day again when you are all inspired again. Thanks again
    Best Regards

  22. Ramesh says:

    Hi Team,
    I am new to Cassandra. I am not able to find Windows MSI to install DataStax Cassandra on Windows Server 2008.
    Any help and suggestions are highly appreciated.

  23. Robin Schumacher, SVP and Chief Product Officer Robin Schumacher, SVP and Chief Product Officer says:

    Please see the top of this article and this link which directs you to the best way to run Cassandra and DSE on Windows:


Your email address will not be published. Required fields are marked *

Subscribe for newsletter: