# How to use Elastic Search with a Self Made SSL certificate not made by using Elastic search.bat

**URL:** <https://discuss.elastic.co/t/how-to-use-elastic-search-with-a-self-made-ssl-certificate-not-made-by-using-elastic-search-bat/364101>\
**Category:** Elasticsearch\
**Created:** [July 31, 2024, 5:49am UTC](https://discuss.elastic.co/t/how-to-use-elastic-search-with-a-self-made-ssl-certificate-not-made-by-using-elastic-search-bat/364101 "2024-07-31T05:49:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Likhit](https://avatars.discourse-cdn.com/v4/letter/l/43a26b/32.png) [@Likhit](https://discuss.elastic.co/u/Likhit)\
**Post date:** [July 31, 2024, 5:49am UTC](https://discuss.elastic.co/t/how-to-use-elastic-search-with-a-self-made-ssl-certificate-not-made-by-using-elastic-search-bat/364101/1 "2024-07-31T05:49:51Z")

</div>

I am unable to use my certificate which i made using New-SelfSignedCertificate command and i tried replacing it with http.pfx in cert folder along with its configuration on elasticsearch.yml but it ain't working

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [July 31, 2024, 6:16am UTC](https://discuss.elastic.co/t/how-to-use-elastic-search-with-a-self-made-ssl-certificate-not-made-by-using-elastic-search-bat/364101/2 "2024-07-31T06:16:06Z")

</div>

More details required. We can't guess what you did, what outcome you expected, or why it didn't work.

> [@Likhit](#):
>
> my certificate which i made using New-SelfSignedCertificate command

I don't know what `New-SelfSignedCertificate command` is. I assume you mean the powershell cmdlet.

Is there a reason you chose to use that rather than the [tools the Elasticsearch provides](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-basic-setup-https.html)?

> [@Likhit](#):
>
> i tried replacing it with http.pfx in cert folder along with its configuration on elasticsearch.yml

What exactly did you put in your `elasticsearch.yml`?

> [@Likhit](#):
>
> it ain't working

What's not working? Is Elasticsearch starting up OK? Is there an error message?

---

<div class="post-metadata">

**Author:** ![Likhit](https://avatars.discourse-cdn.com/v4/letter/l/43a26b/32.png) [@Likhit](https://discuss.elastic.co/u/Likhit)\
**Post date:** [July 31, 2024, 9:35am UTC](https://discuss.elastic.co/t/how-to-use-elastic-search-with-a-self-made-ssl-certificate-not-made-by-using-elastic-search-bat/364101/3 "2024-07-31T09:35:04Z")

</div>

Yes, my friend I made cert from powershell using "New-SelfSignedCertificate -DnsName \*.localserver.com -NotAfter (Get-Date).AddYears(10) -CertStoreLocation cert:\LocalMachine\My"

2nd :  
yes it want to use my own ssl cert instaed of it because i am assigned this task i have to give it to my client

3rd :  
xpack.security.enabled: true  
xpack.security.enrollment.enabled: true  
xpack.security.http.ssl:  
enabled: true  
keystore.path: certs/http.p12  
xpack.security.transport.ssl:  
enabled: true  
verification\_mode: certificate  
keystore.path: certs/transport.p12  
truststore.path: certs/transport.p12  
and also i have tried by exporting it as well
