---
title: Install Apache Cassandra on Ubuntu 20.04
url: https://docs.vultr.com/install-apache-cassandra-on-ubuntu-20-04
description: Learn how to install Apache Cassandra on Ubuntu 20.04 with step-by-step instructions. Set up this powerful NoSQL database for your high-performance applications.
publish_date: 2021-10-05T00:00:00Z
last_updated: 2026-09-11T16:41:03.915348Z
header_image: https://docs.vultr.com/public/doc-assets/1022/b0ff0fe756aa0bac.png
---

> Index of every Vultr Docs page in markdown: https://docs.vultr.com/llms.txt

## Introduction

Apache Cassandra is an open-source NoSQL database engine used to store large amounts of data in a distributed architecture with dynamic replication. It delivers high performance, linear scalability, high availability, and fault tolerance. This article explains how to how to install Apache Cassandra on Ubuntu 20.04 server.

## Prerequisites

* Deploy a [fully updated](https://docs.vultr.com/how-to-update-a-vultr-cloud-server#how-to-update-debian--ubuntu) Vultr Ubuntu 20.04 Server.
* Create a non-root user with sudo access.

## Install Apache Cassandra

1. Install Java.

        $ sudo apt install openjdk-8-jdk -y

1. Verify the installation.

        $ java -version

1. Install the required dependencies.

        $ sudo apt install apt-transport-https gnupg2 -y

1. Download and add the Apache Cassandra GPG key.

        $ sudo wget -q -O - https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add -

1. Add the downloaded repository.

        $ sudo sh -c 'echo "deb http://www.apache.org/dist/cassandra/debian 311x main" > /etc/apt/sources.list.d/cassandra.list'

1. Update the system.

        $ sudo apt update

1. Install Apache Cassandra.

        $ sudo apt install cassandra -y

1. Verify the status of the Apache Cassandra.

        $ sudo systemctl status cassandra

1. Verify the stats of your node.

        $ sudo nodetool status

## Configure Apache Cassandra

By default, Apache Cassandra listens for a cluster named **Test Cluster** on localhost.

1. Log in with the `cqlsh` command-line tool to interact with Cassandra.

        $ cqlsh

1. Change the Cluster name.

        UPDATE system.local SET cluster_name = 'My Cluster' WHERE KEY = 'local';

1. Exit the prompt.

        EXIT;

1. Edit the Cassandra configuration file `cassandra.yaml`.

        $ sudo nano /etc/cassandra/cassandra.yaml

1. Find the `cluster_name` directive and edit it to your preference. Save and exit the file.

        cluster_name: 'My Cluster'

1. Clear the system cache.

        $ nodetool flush system

1. Restart the Cassandra service.

        $ sudo systemctl restart cassandra

1. Verify the changes.

        $ cqlsh

## More Information

For more information on Apache Cassandra, please visit the [official documentation](http://cassandra.apache.org/doc/latest/).
