Set up local encryption keys for production environments

After installing HCD, create a local encryption key file, distribute it to the same location on all nodes in the cluster, and update the system_key_directory property in the cassandra.yaml file.

  1. To ensure support for all encryption algorithms, make sure the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy is enabled. In JDK 8u161 and later, this is enabled by default.

  2. If the encryption key directory does not exist, create the /conf directory for your HCD installation type:

    • Package installations: /etc/hcd/conf

    • Tarball installations: INSTALL_DIRECTORY/resources/hcd/conf

  3. Generate the encryption key file:

    echo -n "$(openssl rand -hex 32)" > /etc/hcd/conf/system_key
  4. Ensure that the system user that runs HCD has read and write access on the file. If necessary, change the ownership of the file to the HCD user.

    chown cassandra /etc/hcd/conf/system_key
  5. Make sure the encryption key file is stored in the same location on all nodes in the cluster, and the HCD user has appropriate permissions on the file.

  6. Update the system_key_directory property in the cassandra.yaml file.

    The location of the cassandra.yaml file depends on your installation type:

    • Package installations: /etc/hcd/cassandra/cassandra.yaml

    • Tarball installations: INSTALL_DIRECTORY/resources/cassandra/conf/cassandra.yaml

Was this helpful?

Give Feedback

How can we improve the documentation?

© Copyright IBM Corporation 2026 | Privacy policy | Terms of use Manage Privacy Choices

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: Contact IBM