# SELF\_SIGNED\_CERT\_IN\_CHAIN error in balena login

**URL:** <https://forums.balena.io/t/self-signed-cert-in-chain-error-in-balena-login/156709>\
**Category:** openBalena\
**Created:** [July 18, 2020, 4:11pm UTC](https://forums.balena.io/t/self-signed-cert-in-chain-error-in-balena-login/156709 "2020-07-18T16:11:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hucqym](https://avatars.discourse-cdn.com/v4/letter/h/5daacb/32.png) [@hucqym](https://forums.balena.io/u/hucqym)\
**Post date:** [July 18, 2020, 4:11pm UTC](https://forums.balena.io/t/self-signed-cert-in-chain-error-in-balena-login/156709/1 "2020-07-18T16:11:13Z")

</div>

I know there a few similar topics on the forum already and all seemed to be referring to the export NODE\_EXTRA\_CA\_CERTS var on the development machine. It seems that I have it set correctly but still for some reason I see this error on balena login:

SELF\_SIGNED\_CERT\_IN\_CHAIN: request to [https://api.mydomain.com/login\_](https://api.mydomain.com/login_) failed, reason: self signed certificate in certificate chain

Here are some details:  
development machine: OSX with balena-cli 12.9.1  
openbalena server: GCE instance w/ openbalena v2.0.3

(on the dev machine)  
cat $NODE\_EXTRA\_CA\_CERTS  
-----BEGIN CERTIFICATE-----MIIFUTCCAzmgAwIBAgIUcgeS5S7kkcFz0PLL08o7AOkXbJYwDQYJKoZIhvcNAQEL…(truncated)

On the first install attempt I forgot to set the custom domain and then reinstalled after a complete cleanup on both server/dev machine (ca.crt & balena-cli) to be sure.

For sanity check, if I browse to [https://api.mydomain.com/login\_](https://api.mydomain.com/login_) on safari it does pick up the installed certificate from the keychain correctly and shows that it is trusted  
with html response cannot GET / (understandably)

What am I still missing?

---

<div class="post-metadata">

**Author:** ![hucqym](https://avatars.discourse-cdn.com/v4/letter/h/5daacb/32.png) [@hucqym](https://forums.balena.io/u/hucqym)\
**Post date:** [July 19, 2020, 11:31am UTC](https://forums.balena.io/t/self-signed-cert-in-chain-error-in-balena-login/156709/4 "2020-07-19T11:31:33Z")

</div>

resolved it by using -c option for the quickstart script.  
Surprising that this has not merited a mention in the docs!?
