# New Install - error setting certificate location

**URL:** https://discuss.elastic.co/t/new-install-error-setting-certificate-location/313373
**Category:** Elasticsearch
**Tags:** elastic-stack-security
**Created:** [August 31, 2022, 3:19pm UTC](https://discuss.elastic.co/t/new-install-error-setting-certificate-location/313373 "2022-08-31T15:19:26Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dci-sigh](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@dci-sigh](https://discuss.elastic.co/u/dci-sigh)
#### Post date: [August 31, 2022, 3:19pm UTC](https://discuss.elastic.co/t/new-install-error-setting-certificate-location/313373/1 "2022-08-31T15:19:26Z")

</div>

> [@New install - error setting certificate verify locations](https://discuss.elastic.co/t/new-install-error-setting-certificate-verify-locations/307455):
>
> Following the instructions here: [Install Elasticsearch with Debian Package | Elasticsearch Guide [8.2] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.2/deb.html) Installing from apt on Ubuntu server 20.04 wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg sudo apt-get install apt-transport-https echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic…

the issue in the link is marked as closed due to inactivity, but I am still having this issue - curl error 77 when doing a fresh elasticsearch 8.4 install (see link above). Below is a workaround.

Any updates on this issue? Below is what I was able to achieve with copying the `http_ca.crt` into /usr/local/share/ca-certificates/certs/ then `ln -s` to `/etc/ssl/certs`

when I copy and link cert :

`cp /etc/elasticsearch/certs/http_ca.crt /usr/local/share/ca-certificates/certs/http_ca.crt`  
`chmod 640 /usr/local/share/ca-certificates/certs/http_ca.crt`  
`c_rehash /usr/local/share/ca-certificates/certs/`

`cd /etc/ssl/certs`  
`ln -s /usr/local/share/ca-certificates/http_ca.crt http_ca.crt`  
`chmod 640 /etc/ssl/certs/http_ca.crt`  
`c_rehash`

NOTE: ownership is already set to root:root on /etc/ssl/certs/http\_ca.crt

then run curl cmd:

`curl --cacert /etc/ssl/certs/http_ca.crt -u elastic https://localhost:9200/`

I get the desired results; ES summary data.

`curl --cacert /etc/elasticsearch/certs/http_ca.crt -u elastic https://localhost:9200/`  
continues to generate the curl 77 error mentioned in the original post. Even after this change.

I am guessing/hoping that I can update the `elasticsearch.yml` to point to the cert in `/etc/ssl/certs` and everything will work without issue. Until there is an update that could break that connection.

I am using ubuntu server 20.04 LTS // ES 8.4

---

<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: [September 28, 2022, 3:19pm UTC](https://discuss.elastic.co/t/new-install-error-setting-certificate-location/313373/2 "2022-09-28T15:19:44Z")

</div>

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