# Can we setup TLS encryption on an existing cluster without losing index data

**URL:** <https://discuss.elastic.co/t/can-we-setup-tls-encryption-on-an-existing-cluster-without-losing-index-data/264848>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [February 19, 2021, 12:04pm UTC](https://discuss.elastic.co/t/can-we-setup-tls-encryption-on-an-existing-cluster-without-losing-index-data/264848 "2021-02-19T12:04:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arvind\_Ks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arvind_ks/32/77463_2.png) [@Arvind\_Ks](https://discuss.elastic.co/u/Arvind_Ks)\
**Post date:** [February 19, 2021, 12:04pm UTC](https://discuss.elastic.co/t/can-we-setup-tls-encryption-on-an-existing-cluster-without-losing-index-data/264848/1 "2021-02-19T12:04:00Z")

</div>

Hi Team,  
Can we setup TLS encryption on existing cluster with data, without losing it?  
I have a 40 node cluster with lots of indices.  
I see that to setup TLS we need to disable " **cluster.initial\_master\_nodes**" in elasticsearch.yml and start with " **discovery.type: single-node**" . Will this cause the cluster to lose the data.

I am trying to follow this link.

> **[Setting up TLS on a cluster | Elasticsearch Reference \[master\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/master/ssl-tls.html)**

Thanks  
Arvind

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [February 20, 2021, 5:28am UTC](https://discuss.elastic.co/t/can-we-setup-tls-encryption-on-an-existing-cluster-without-losing-index-data/264848/2 "2021-02-20T05:28:39Z")

</div>

You should be able to enable TLS without any data loss.

I believe you will need to do a full cluster shutdown, create and configure all the certs.

Then do a full cluster start.

However I think perhaps you are mixing docs / concepts a bit confused.

If you are looking at [this](https://www.elastic.co/guide/en/elasticsearch/reference/7.11/get-started-enable-security.html) that is a tutorial for a single node test cluster not for a "real" multi-node cluster like you have. You will not set your nodes to `single-node` etc

The normal sections of the docs like your link above just provides the process to enable TLS.

---

<div class="post-metadata">

**Author:** ![Arvind\_Ks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arvind_ks/32/77463_2.png) [@Arvind\_Ks](https://discuss.elastic.co/u/Arvind_Ks)\
**Post date:** [February 20, 2021, 11:43am UTC](https://discuss.elastic.co/t/can-we-setup-tls-encryption-on-an-existing-cluster-without-losing-index-data/264848/3 "2021-02-20T11:43:52Z")

</div>

Thank you . I will try this.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 20, 2021, 11:44am UTC](https://discuss.elastic.co/t/can-we-setup-tls-encryption-on-an-existing-cluster-without-losing-index-data/264848/4 "2021-03-20T11:44:45Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
