Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
VGSources
Blog

How to Install and Set Up Cassandra on Ubuntu

A practical Ubuntu walkthrough for installing Cassandra from Apache's APT repository, verifying a healthy UN node, opening cqlsh, and deciding when cassandra.yaml needs changes.
Length11 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

On Ubuntu, the clearest supported route is the Apache Cassandra Debian package: install Java 11 or 17, add the versioned Apache APT repository and signing key, install the cassandra package, then verify readiness with nodetool status and cqlsh. A one-node test can use the shipped cassandra.yaml defaults; a real cluster needs deliberate network, storage, seed, and security settings.

What you need before installing Cassandra

Cassandra is a distributed database, so the installation is more than copying a binary. Confirm the runtime, choose the Cassandra major series, and decide whether this Ubuntu machine is only a local test node or part of a multi-node deployment.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Requirement What to prepare Why it matters
Java Java 11 or Java 17 Current Apache Cassandra documentation lists these supported Java majors.
Python for cqlsh Python 3.8 through 3.13 The CQL shell depends on a supported Python runtime and the release’s cqlsh dependencies.
Ubuntu administration sudo access and a working APT connection Adding a system repository, keyring, and package requires root privileges.
Cassandra repository A supported, versioned Debian repository series The series identifies the Cassandra major line; it is not a timeless value.
Deployment plan Local single node or multi-node cluster Single-node defaults are useful for exploration but are not a production cluster design.

Use the Apache documentation current at the time of installation to confirm which major series is supported. The example below uses the 50x series for Cassandra 5.0. If the supported series has changed, replace every occurrence of 50x with the series you selected rather than mixing repository lines from different releases.

Install and verify Java

Install OpenJDK 11 or OpenJDK 17 using Ubuntu’s supported packages or another supported distribution. Do not assume that an older Java already installed on the machine will work. Verify the major version from the same shell that will run the installation:

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
java -version

Read the output carefully. The first version number must identify Java 11 or Java 17. If Ubuntu has several Java installations, select the supported one as the system default before proceeding, then run java -version again. Cassandra can exit during startup when the Java major version is outside the documented range, so checking this before adding the repository is faster than diagnosing an immediate service failure later.

Install Python for cqlsh when you need the CQL shell

cqlsh is Cassandra’s command-line CQL client. Current Cassandra documentation supports Python 3.8–3.13 for it. Install one of those Python versions if the shell is not already available on the Ubuntu host, then verify the interpreter:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
python --version

The Cassandra release documentation specifies the cqlsh dependencies that accompany its distribution. If the command later reports a missing Python module, install the dependencies for the exact Cassandra release rather than substituting an unrelated Python environment. Cassandra itself can be installed without using cqlsh, but you will need another CQL client to run interactive queries.

Add the Apache Cassandra APT repository

1. Create a dedicated keyring directory

APT should use a repository-specific signing key instead of an unrestricted, globally trusted key. Create the standard keyring directory if it does not exist:

sudo mkdir -p /etc/apt/keyrings

2. Download Apache’s KEYS file

Save the Apache Cassandra signing-key file at the path used by the repository entry:

sudo curl -o /etc/apt/keyrings/apache-cassandra.asc https://downloads.apache.org/cassandra/KEYS

The filename and path must match the signed-by value in the next step. If curl cannot reach the download host, resolve DNS, proxy, firewall, or outbound HTTPS access before continuing. A key downloaded to a different location will cause APT signature verification to fail unless the source entry is changed to match.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Select the repository series

The repository is versioned by major series. The following command illustrates the 5.0 series:

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
echo "deb [signed-by=/etc/apt/keyrings/apache-cassandra.asc] https://debian.cassandra.apache.org 50x main" | sudo tee /etc/apt/sources.list.d/cassandra.sources.list

Before running it, replace 50x with the supported series you actually intend to deploy. Keep the series consistent with the Cassandra documentation, your application compatibility requirements, and the package you plan to maintain. Repository series are subject to change, so do not blindly reuse an old installation guide after a new major release is published.

4. Refresh APT and install Cassandra

sudo apt-get update
sudo apt-get install cassandra

The package installation places Cassandra’s executable files and configuration in the system package layout and runs the service as the cassandra operating-system user. APT may report unrelated repository warnings from other software sources; distinguish those from errors involving the Cassandra source before deciding that the Cassandra repository is at fault.

Choose the installation method deliberately

Method Best fit Trade-off
Debian package An Ubuntu host where you want an APT-managed installation and system service. Files follow the host’s package layout, so paths differ from tarball documentation.
Docker An environment already organized around containers. You must handle container networking, persistent storage, configuration injection, and lifecycle operations.
Tarball A self-contained installation or a machine where you cannot add an APT source. You manage placement, ownership, startup, upgrades, and service integration yourself.

For most Ubuntu readers following this procedure, the Debian package is the least surprising choice. Do not combine instructions from methods: a tarball’s conf directory and log locations are not necessarily the same as those supplied by the package, and container commands do not manage a host package service.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Start Cassandra and watch for readiness

On a normal Ubuntu package installation, the service is commonly started as part of installation. If it is not running, start the package-managed service with Ubuntu’s service manager, for example:

sudo systemctl start cassandra

If your host uses a different service-management arrangement, use that system’s equivalent command. Do not move on to client testing until the process has completed startup.

Follow the system log used by the package installation:

tail -f logs/system.log

The documented readiness event says that the node is listening for CQL clients on localhost port 9042. The exact location of system.log depends on how Cassandra was installed and packaged; if that relative path does not exist, identify the package’s configured log directory and follow the corresponding system log there. Stop following the file with Ctrl+C after the readiness message appears.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)

Verify that the node is healthy

Check the status with nodetool

nodetool status

Inspect the status column. A healthy node should report UN, which means “Up/Normal.” If the command cannot connect, startup may still be in progress, the service may have stopped, or the management endpoint may not be reachable from the shell where you ran the command.

Open the CQL shell

cqlsh

When Cassandra is ready and the supported Python environment is available, cqlsh opens a CQL prompt. The default local connection uses the node’s localhost CQL listener on port 9042. If the shell is not found, install or expose the cqlsh program supplied by the Cassandra release and verify Python 3.8–3.13 plus its documented dependencies.

Decide whether the default cassandra.yaml is appropriate

cassandra.yaml is Cassandra’s main configuration file. Its location depends on the installation method: Debian packages use the system package layout, while a tarball keeps configuration under the extracted installation’s conf directory. Confirm the active path for your installation before editing anything.

Single-node development or learning

For a simple, isolated single-node test, the official configuration guidance says the default values are sufficient to explore a single-node cluster. This is the safest starting point: leave the file unchanged until the service is running and the verification commands succeed. Keep this node private and local while learning. A default test configuration is not a template for a production cluster, and changing unrelated settings before establishing a working baseline makes failures harder to diagnose.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Install and verify the supported Java runtime first.
  • Confirm readiness in the log before running health checks.
  • Use nodetool status to establish that the node is UN.
  • Use cqlsh for CQL work only after the listener is ready.
  • Do not expose a default exploratory node to untrusted networks.

Multi-node or production deployment

A multi-node deployment requires a configuration review before nodes communicate with one another or accept traffic beyond the local machine. The important areas are:

Configuration area Decision you must make Failure if left accidental
Cluster name Choose the intended cluster identity and apply it consistently to participating nodes. Nodes can be placed in the wrong logical cluster or fail to join as intended.
Listen address Select the interface or address used for node-to-node communication. Peers cannot establish gossip or streaming connections.
Broadcast address Set the address other nodes should use when the host has NAT, multiple interfaces, or a non-obvious routable address. Peers may learn an address they cannot reach.
Seeds Define an intentional seed list for cluster discovery. New nodes may not discover the existing cluster reliably.
Storage directories Choose filesystem locations with appropriate capacity, ownership, and durability. Data can fill an unsuitable volume or survive without the intended backup and failure characteristics.
Client/RPC bind settings Decide which interfaces accept client connections and administrative traffic. Clients may be unable to connect, or services may be exposed on unintended interfaces.
Endpoint snitch Match the snitch to the topology you are actually operating. Replica placement and failure-domain awareness can be wrong.
Authentication Choose how clients and operators authenticate. Unauthenticated access can be exposed when the node is reachable from a wider network.
Encryption Plan encryption for client and internode traffic where required. Credentials or data can traverse the network without the protection your threat model requires.

Change one logical group of settings at a time, preserve a copy of the working configuration, and restart or reload only according to the behavior supported by the Cassandra release. Validate network reachability from every intended node, not only from the host being configured. Keep single-node development values separate from cluster values so a test file cannot be copied into a production rollout by mistake.

A practical validation sequence

Use the checks in order. First, verify Java; otherwise a failed process may be blamed on APT or networking. Second, confirm that the package was installed from the intended repository series. Third, wait for the readiness message rather than treating the end of the apt-get command as proof that Cassandra is ready. Finally, require both an UN status and a working CQL prompt.

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
  1. java -version identifies Java 11 or 17.
  2. The startup log reports that the node is listening for CQL clients on localhost port 9042.
  3. nodetool status reports UN.
  4. cqlsh opens an interactive prompt.

This sequence separates installation, process startup, node health, and client access. If one step fails, investigate that layer before changing configuration elsewhere.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Common installation and startup problems

APT update fails

  • Check that the repository series is valid for the Cassandra major version you selected.
  • Confirm the source entry points to /etc/apt/keyrings/apache-cassandra.asc, exactly matching the downloaded key path.
  • Open the key URL directly from the host to verify network access: https://downloads.apache.org/cassandra/KEYS.
  • Review proxy, DNS, firewall, and certificate errors separately from APT’s signature error.
  • Inspect the generated source file for accidental quotation marks, spelling errors, or a missing main component.

Cassandra exits immediately

Run java -version again and verify that the active Java major is 11 or 17. Then inspect the Cassandra system log for the first startup error rather than relying only on the final service status. Permission problems in package-owned directories, an invalid configuration edit, and an occupied network port require different fixes; avoid changing several unrelated settings at once.

nodetool status does not show UN

Wait for the startup sequence to finish and check the log for the readiness event. If the node is still joining, restarting, or reporting an error, nodetool will not provide a healthy result. Once the log is clean, confirm that you are invoking the tools from the same installation and that the service is reachable locally. Do not edit cluster networking settings merely because a node needs more time to initialize.

cqlsh is unavailable

Verify python --version and use a supported Python version between 3.8 and 3.13. Install the cqlsh dependencies documented for the Cassandra release you installed. If Cassandra is ready but the shell still cannot connect, verify that the CQL listener is active on the expected local port and that you did not change the client bind settings.

The log path in the example does not exist

Packaged and tarball installations organize files differently. A missing relative logs/system.log does not by itself prove that Cassandra failed. Identify the active package configuration and its log directory, then follow the system log that records Cassandra startup. Use the readiness message, not the filename alone, as the completion check.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Alternative ways to run Cassandra on Ubuntu

Docker

The Apache guide also documents Docker. It is convenient when Docker is already your operating environment and you want Cassandra isolated from the host’s package database. Container networking, persistent volumes, configuration injection, and lifecycle commands become your responsibility. Choose this path when the rest of your deployment is containerized; otherwise the Debian package offers a more natural Ubuntu service integration.

Tarball installation

A tarball keeps Cassandra’s binaries and configuration together under the extracted installation and can be installed without root. It is useful when you need a self-contained directory or cannot add a system APT source. You must manage placement, ownership, startup, upgrades, and service integration yourself, and the configuration path differs from the Debian package layout.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.

Post-install checklist

  1. Confirm java -version reports Java 11 or Java 17.
  2. If using cqlsh, confirm python --version is between 3.8 and 3.13 and install the release’s required dependencies.
  3. Verify that the APT source uses the intended Cassandra series and the Apache keyring path.
  4. Run sudo apt-get update and sudo apt-get install cassandra.
  5. Start the package service if installation did not start it automatically.
  6. Follow the active system log until Cassandra reports that it is listening for CQL clients on localhost port 9042.
  7. Run nodetool status and require UN before treating the node as ready.
  8. Open cqlsh and confirm an interactive CQL prompt.
  9. For a single-node test, keep the default cassandra.yaml values and isolate the host.
  10. For a cluster, review cluster name, addresses, seeds, storage, client/RPC binds, snitch, authentication, and encryption before exposing the service.

Frequently Asked Questions

Which Java version does Cassandra need on Ubuntu?

Current Apache Cassandra documentation supports Java 11 and Java 17. Verify the active runtime with java -version before installing or troubleshooting the service.

Which Cassandra repository line should I add?

Use the versioned Debian repository series documented for the major release you intend to run. The example uses 50x for Cassandra 5.0; replace it if the currently supported series is different.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why does the APT command say the repository is unsigned?

Check that the Apache KEYS file was downloaded to /etc/apt/keyrings/apache-cassandra.asc and that the source entry’s signed-by path matches exactly. Also check network access to the key URL.

How do I know Cassandra has finished starting?

Follow the active system log until it reports that the node is listening for CQL clients on localhost port 9042. Then run nodetool status and look for UN, meaning Up/Normal.

What Python version is required for cqlsh?

Use Python 3.8 through 3.13 and install the cqlsh dependencies specified for the Cassandra release you installed.

Can I leave cassandra.yaml unchanged?

Yes, for a simple isolated single-node exploration. The defaults are not a production-cluster design and should not be exposed to untrusted networks.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What must I configure for multiple Cassandra nodes?

Review the cluster name, listen and broadcast addresses, seed list, storage directories, client/RPC binds, endpoint snitch, authentication, and encryption before nodes communicate or accept wider client traffic.

Should I use Docker or a tarball instead of APT?

Docker suits an already containerized environment. A tarball provides a self-contained, rootless installation. The Debian package is the clearest choice when you want an APT-managed Ubuntu service.

The Bottom Line

Install a supported Java runtime, select the correct versioned Apache repository, and install Cassandra through APT. Wait for the log’s CQL-listener readiness message, require UN from nodetool status, and use cqlsh only when its Python requirements are met. Leave cassandra.yaml at defaults for a private single-node test; plan networking, storage, seeds, topology, authentication, and encryption before building a cluster.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.