# Disable demo certificates autogeneration

**URL:** <https://forum.opensearch.org/t/disable-demo-certificates-autogeneration/1120>\
**Category:** Security\
**Created:** [July 12, 2019, 9:58am UTC](https://forum.opensearch.org/t/disable-demo-certificates-autogeneration/1120 "2019-07-12T09:58:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkalev](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@dkalev](https://forum.opensearch.org/u/dkalev)\
**Post date:** [July 12, 2019, 9:58am UTC](https://forum.opensearch.org/t/disable-demo-certificates-autogeneration/1120/1 "2019-07-12T09:58:42Z")

</div>

Is there a way to disable the autogeneration of demo certificates? When the service is installed (CentOS7) the demo certificates are added to /etc/elasticsearch. I am using different certificates and have set opendistro\_security.allow\_unsafe\_democertificates: false in elasticsearch.yml, This results in elasticsearch not being able to start with the error demo certificates found.  
Is there config option to disable the autogeneration?  
Is it a security risk when opendistro\_security.allow\_unsafe\_democertificates is left true?

---

<div class="post-metadata">

**Author:** ![aetter](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@aetter](https://forum.opensearch.org/u/aetter)\
**Post date:** [July 12, 2019, 9:34pm UTC](https://forum.opensearch.org/t/disable-demo-certificates-autogeneration/1120/2 "2019-07-12T21:34:09Z")

</div>

Hi @dkalev, unfortunately, the security demo configuration script runs during install (rather than first startup), but the side effect is that you get a template for how things should ultimately look on a “production” installation.

We don’t recommend going to production with the demo certificates, but you can substitute your own in place of the existing ones, change the names and DNs in `elasticsearch.yml`, delete the `opendistro_security.allow_unsafe_democertificates: true` line, etc. The demo configuration doesn’t do anything irreversible. You can see what it’s up to here: [security/install\_demo\_configuration.sh at main · opendistro-for-elasticsearch/security · GitHub](https://github.com/opendistro-for-elasticsearch/security/blob/master/tools/install_demo_configuration.sh)

---

<div class="post-metadata">

**Author:** ![dkalev](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@dkalev](https://forum.opensearch.org/u/dkalev)\
**Post date:** [July 15, 2019, 8:23am UTC](https://forum.opensearch.org/t/disable-demo-certificates-autogeneration/1120/3 "2019-07-15T08:23:18Z")

</div>

Hi @aetter, thanks for your reply. I am automating the deployment with Ansible and even though I am providing my own certificates and pointing to them in `elasticsearch.yml`, Elasticsearch was not able to start because it was founding the demo certificates besides the ones I have provided in `/etc/elasticsearch`. This is not a breaking issue as what I am doing now is just removing the demo ones, before providing mine, I just thought there might be a config option I have missed.
