# Install elastic agent : fail to enroll: fail to execute request to fleet-server: x509: certificate signed by unknown authority

**URL:** <https://discuss.elastic.co/t/install-elastic-agent-fail-to-enroll-fail-to-execute-request-to-fleet-server-x509-certificate-signed-by-unknown-authority/378621>\
**Category:** Elastic Agent\
**Created:** [May 28, 2025, 2:19am UTC](https://discuss.elastic.co/t/install-elastic-agent-fail-to-enroll-fail-to-execute-request-to-fleet-server-x509-certificate-signed-by-unknown-authority/378621 "2025-05-28T02:19:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![felixwong](https://avatars.discourse-cdn.com/v4/letter/f/ed8c4c/32.png) [@felixwong](https://discuss.elastic.co/u/felixwong)\
**Post date:** [May 28, 2025, 2:19am UTC](https://discuss.elastic.co/t/install-elastic-agent-fail-to-enroll-fail-to-execute-request-to-fleet-server-x509-certificate-signed-by-unknown-authority/378621/1 "2025-05-28T02:19:07Z")

</div>

I tried to install and enroll agent into elastic

sudo ./elastic-agent install --url=[https://202.40.192.161:8220](https://202.40.192.161:8220) --enrollment-token= bjBib0VKY0J…  
1st enrollment attempt failed, retrying enrolling to URL: [https://202.40.192.161:8220/](https://202.40.192.161:8220/) with exponential backoff (init 5s, max 10m0s)","ecs.version":"1.6.0"}  
Error: fail to enroll: fail to execute request to fleet-server: x509: certificate signed by unknown authority

Do I need to setup ssl cert in elasticsearch server ? how to place the ssl cert in agent server ?  
My agent is 9.0.1 (elastic-agent-9.0.1-linux-x86\_64)

---

<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:** [May 28, 2025, 2:36am UTC](https://discuss.elastic.co/t/install-elastic-agent-fail-to-enroll-fail-to-execute-request-to-fleet-server-x509-certificate-signed-by-unknown-authority/378621/2 "2025-05-28T02:36:36Z")

</div>

Perhaps

> **[Common problems | Elastic Docs](https://www.elastic.co/docs/troubleshoot/ingest/fleet/common-problems#agent-enrollment-certs)**
>
> We have collected the most common known problems and listed them here. If your problem is not described here, review the open issues in the following...

How did you install elasticsearch?

---

<div class="post-metadata">

**Author:** ![felixwong](https://avatars.discourse-cdn.com/v4/letter/f/ed8c4c/32.png) [@felixwong](https://discuss.elastic.co/u/felixwong)\
**Post date:** [May 28, 2025, 3:07am UTC](https://discuss.elastic.co/t/install-elastic-agent-fail-to-enroll-fail-to-execute-request-to-fleet-server-x509-certificate-signed-by-unknown-authority/378621/3 "2025-05-28T03:07:58Z")

</div>

I added "--insecure" , it works now .
