# Connect Apm-server to Elasticsearch via HTTPS

**URL:** <https://discuss.elastic.co/t/connect-apm-server-to-elasticsearch-via-https/347250>\
**Category:** Elasticsearch\
**Created:** [November 15, 2023, 7:10pm UTC](https://discuss.elastic.co/t/connect-apm-server-to-elasticsearch-via-https/347250 "2023-11-15T19:10:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlugo](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@jlugo](https://discuss.elastic.co/u/jlugo)\
**Post date:** [November 15, 2023, 7:10pm UTC](https://discuss.elastic.co/t/connect-apm-server-to-elasticsearch-via-https/347250/1 "2023-11-15T19:10:55Z")

</div>

So I've been struggling to get this working. I installed Kibana with Elasticsearch via auto configuration on Linux. Kibana connects to Elasticsearch no problem via https.

However, I can't get apm-server to connect to elasticsearch via https. I have the following in apm-server.yml ...

output.elasticsearch:hosts: ["https://:9200"]

I also have username and password set.

My services show up in the apm-server logs. However, they don't show up in Kibana under APM/Services. apm-server shows an error saying ...

**"precondition failed: x509: certificate signed by unknown authority"**

How do I fix this? Based on reading Elastic docs, I need to point apm-server.yml to the Elastic certificate and cert authority. I don't know the exact steps for that.

Can someone help?

---

<div class="post-metadata">

**Author:** ![jlugo](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@jlugo](https://discuss.elastic.co/u/jlugo)\
**Post date:** [November 15, 2023, 10:35pm UTC](https://discuss.elastic.co/t/connect-apm-server-to-elasticsearch-via-https/347250/2 "2023-11-15T22:35:10Z")

</div>

By the way, this is a dev server installation.

---

<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:** [December 13, 2023, 10:35pm UTC](https://discuss.elastic.co/t/connect-apm-server-to-elasticsearch-via-https/347250/3 "2023-12-13T22:35:43Z")

</div>

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