# Node-red Install Error- Self\_Signed\_cert\_in\_chain

**URL:** <https://discourse.nodered.org/t/node-red-install-error-self-signed-cert-in-chain/93699>\
**Category:** General\
**Tags:** node-red-install\
**Created:** [5 December 2024 07:45 UTC](https://discourse.nodered.org/t/node-red-install-error-self-signed-cert-in-chain/93699 "2024-12-05T07:45:21Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [5 December 2024 07:45 UTC](https://discourse.nodered.org/t/node-red-install-error-self-signed-cert-in-chain/93699/1 "2024-12-05T07:45:21Z")

</div>

Hi,  
feeling a little ackward to post this. i have been working with node-red since at least 2 years and have installed many instances on few PC but never faced this issue, so i am stuck. searched forum and net for this issue but nowhere i could find exact issue. there are some issues similar reported for few nodes but not for node-red itself.

I am getting following error on a freshly formatted windows pc.  
OS -Windows 11 Pro

```auto
C:\Users\oee.ldh\NR-ADMIN>node --version && npm --version
v20.18.1
10.8.2

```

```auto
PS C:\Users\oee.ldh> npm install -g --unsafe-perm node-red
npm error code SELF_SIGNED_CERT_IN_CHAIN
npm error errno SELF_SIGNED_CERT_IN_CHAIN
npm error request to https://registry.npmjs.org/node-red failed, reason: self-signed certificate in certificate chain
npm error A complete log of this run can be found in: C:\Users\oee.ldh\AppData\Local\npm-cache\_logs\2024-12-05T07_27_36_708Z-debug-0.log

```

the error log.

```auto
0 verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
1 info using npm@10.8.2
2 info using node@v20.18.1
3 silly config load:file:C:\Program Files\nodejs\node_modules\npm\npmrc
4 silly config load:file:C:\Users\oee.ldh\NR-ADMIN\.npmrc
5 silly config load:file:C:\Users\oee.ldh\.npmrc
6 silly config load:file:C:\Users\oee.ldh\AppData\Roaming\npm\etc\npmrc
7 verbose title npm install node-red
8 verbose argv "install" "node-red"
9 verbose logfile logs-max:10 dir:C:\Users\oee.ldh\AppData\Local\npm-cache\_logs\2024-12-05T07_38_02_267Z-
10 verbose logfile C:\Users\oee.ldh\AppData\Local\npm-cache\_logs\2024-12-05T07_38_02_267Z-debug-0.log
11 silly packumentCache heap:2197815296 maxSize:549453824 maxEntrySize:274726912
12 silly logfile start cleaning logs, removing 1 files
13 silly logfile done cleaning log files
14 silly idealTree buildDeps
15 silly fetch manifest node-red@*
16 silly packumentCache full:http://registry.npmjs.org/node-red cache-miss
17 http fetch GET https://registry.npmjs.org/node-red attempt 1 failed with SELF_SIGNED_CERT_IN_CHAIN
18 http fetch GET https://registry.npmjs.org/node-red attempt 2 failed with SELF_SIGNED_CERT_IN_CHAIN
19 http fetch GET https://registry.npmjs.org/node-red attempt 3 failed with SELF_SIGNED_CERT_IN_CHAIN
20 silly placeDep ROOT node-red@ OK for: want: *
21 verbose type system
22 verbose stack FetchError: request to https://registry.npmjs.org/node-red failed, reason: self-signed certificate in certificate chain
22 verbose stack at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14)
22 verbose stack at ClientRequest.emit (node:events:518:28)
22 verbose stack at emitErrorEvent (node:_http_client:101:11)
22 verbose stack at _destroy (node:_http_client:884:9)
22 verbose stack at onSocketNT (node:_http_client:904:5)
22 verbose stack at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
23 error code SELF_SIGNED_CERT_IN_CHAIN
24 error errno SELF_SIGNED_CERT_IN_CHAIN
25 error request to https://registry.npmjs.org/node-red failed, reason: self-signed certificate in certificate chain
26 silly unfinished npm timer reify 1733384282827
27 silly unfinished npm timer reify:loadTrees 1733384282832
28 verbose cwd C:\Users\oee.ldh\NR-ADMIN
29 verbose os Windows_NT 10.0.22631
30 verbose node v20.18.1
31 verbose npm v10.8.2
32 verbose exit 1
33 verbose code 1
34 error A complete log of this run can be found in: C:\Users\oee.ldh\AppData\Local\npm-cache\_logs\2024-12-05T07_38_02_267Z-debug-0.log

```

---

<div class="post-metadata">

**Author:** ![kitori](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kitori](https://discourse.nodered.org/u/kitori)\
**Post date:** [5 December 2024 08:10 UTC](https://discourse.nodered.org/t/node-red-install-error-self-signed-cert-in-chain/93699/2 "2024-12-05T08:10:32Z")

</div>

Interesting 😃

i can conncect to [registry.npmjs.org](http://registry.npmjs.org) . openssl show no error.

Maybe you Windows PC musst update the certificate store / get the root certs?

```auto
~$ openssl s_client -connect registry.npmjs.org:443
CONNECTED(00000003)
depth=2 C = US, O = Google Trust Services LLC, CN = GTS Root R4
verify return:1
depth=1 C = US, O = Google Trust Services, CN = WE1
verify return:1
depth=0 CN = npmjs.org
verify return:1
---
Certificate chain
 0 s:CN = npmjs.org
   i:C = US, O = Google Trust Services, CN = WE1
   a:PKEY: id-ecPublicKey, 256 (bit); sigalg: ecdsa-with-SHA256
   v:NotBefore: Nov 11 08:09:05 2024 GMT; NotAfter: Feb 9 08:09:04 2025 GMT
 1 s:C = US, O = Google Trust Services, CN = WE1
   i:C = US, O = Google Trust Services LLC, CN = GTS Root R4
   a:PKEY: id-ecPublicKey, 256 (bit); sigalg: ecdsa-with-SHA384
   v:NotBefore: Dec 13 09:00:00 2023 GMT; NotAfter: Feb 20 14:00:00 2029 GMT
 2 s:C = US, O = Google Trust Services LLC, CN = GTS Root R4
   i:C = BE, O = GlobalSign nv-sa, OU = Root CA, CN = GlobalSign Root CA
   a:PKEY: id-ecPublicKey, 384 (bit); sigalg: RSA-SHA256
   v:NotBefore: Nov 15 03:43:21 2023 GMT; NotAfter: Jan 28 00:00:42 2028 GMT
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIDnTC....
-----END CERTIFICATE-----
subject=CN = npmjs.org
issuer=C = US, O = Google Trust Services, CN = WE1
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: ECDSA
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 2970 bytes and written 405 bytes
Verification: OK
---
New, TLSv1.2, Cipher is ECDHE-ECDSA-CHACHA20-POLY1305
Server public key is 256 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol : TLSv1.2
    Cipher : ECDHE-ECDSA-CHACHA20-POLY1305
    Session-ID: FA147....
    Session-ID-ctx:
    Master-Key: 4C565D....
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    TLS session ticket lifetime hint: 64800 (seconds)
    TLS session ticket:
    0000 - b4 7c db 40 6a 9a 6f fb-bc 20 9e a7 15 b1 33 ce .|.@j.o.. ....3.
    .....

    Start Time: 1733385908
    Timeout : 7200 (sec)
    Verify return code: 0 (ok)
    Extended master secret: yes

```

---

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [5 December 2024 09:36 UTC](https://discourse.nodered.org/t/node-red-install-error-self-signed-cert-in-chain/93699/3 "2024-12-05T09:36:09Z")

</div>

> [@kitori](#):
>
> Maybe you Windows PC musst update the certificate store / get the root certs?

can you suggest how do i do this ?

---

<div class="post-metadata">

**Author:** ![kitori](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kitori](https://discourse.nodered.org/u/kitori)\
**Post date:** [5 December 2024 09:58 UTC](https://discourse.nodered.org/t/node-red-install-error-self-signed-cert-in-chain/93699/4 "2024-12-05T09:58:13Z")

</div>

I don't know how to to that on Windows 🙈

With Linux, it is easy 😉

---

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [5 December 2024 10:09 UTC](https://discourse.nodered.org/t/node-red-install-error-self-signed-cert-in-chain/93699/5 "2024-12-05T10:09:23Z")

</div>

one of the 'suggestion' found on internet said to set

`npm config set strict-ssl false`

i smelled something wrong and have not ventured into,.

is it safe ?

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [5 December 2024 12:51 UTC](https://discourse.nodered.org/t/node-red-install-error-self-signed-cert-in-chain/93699/6 "2024-12-05T12:51:00Z")

</div>

In edge - do you get any warnings when visiting [https://registry.npmjs.org](https://registry.npmjs.org) ?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [5 December 2024 13:46 UTC](https://discourse.nodered.org/t/node-red-install-error-self-signed-cert-in-chain/93699/7 "2024-12-05T13:46:43Z")

</div>

> [@kitori](#):
>
> I don't know how to to that on Windows

Happens automatically on Windows. Check for any outstanding Windows Updates.

> [@smanjunath211](#):
>
> `npm config set strict-ssl false`
> 
> i smelled something wrong and have not ventured into,.
> 
> is it safe ?

ABSOLUTELY NOT! DO NOT DO THAT.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [5 December 2024 13:52 UTC](https://discourse.nodered.org/t/node-red-install-error-self-signed-cert-in-chain/93699/8 "2024-12-05T13:52:00Z")

</div>

> [@smanjunath211](#):
>
> `self-signed certificate in certificate chain`

Can you do:

```powershell
> npm config get cafile
null

```

I get `null`, do you get something different?

Also suggested was running `wget https://registry.npmjs.org/express` though you need to install a compatible wget app for that.

---

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [5 December 2024 14:59 UTC](https://discourse.nodered.org/t/node-red-install-error-self-signed-cert-in-chain/93699/9 "2024-12-05T14:59:03Z")

</div>

> [@TotallyInformation](#):
>
> do you get something different?

I get `null` as well

```auto

C:\Users\oee.ldh>npm config get cafile
null

C:\Users\oee.ldh>

```

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [5 December 2024 16:40 UTC](https://discourse.nodered.org/t/node-red-install-error-self-signed-cert-in-chain/93699/10 "2024-12-05T16:40:52Z")

</div>

> [@smanjunath211](#):
>
> I get `null` as well

I _think_ (not totally sure) that you only need something in there if you need npm to go via a secured non-transparent proxy (typical in some enterprise environments).

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [5 December 2024 17:13 UTC](https://discourse.nodered.org/t/node-red-install-error-self-signed-cert-in-chain/93699/11 "2024-12-05T17:13:55Z")

</div>

As a temporary solution, you can just override the protocol.

```auto
npm config set registry http://registry.npmjs.org/

```

and to put it back

```auto
npm config set registry https://registry.npmjs.org/

```

As a quick workaround, its nothing to be concerned about (Ok, Julian 😉 )

http[s]

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [5 December 2024 17:58 UTC](https://discourse.nodered.org/t/node-red-install-error-self-signed-cert-in-chain/93699/12 "2024-12-05T17:58:52Z")

</div>

> [@marcus-j-davies](#):
>
> As a quick workaround, its nothing to be concerned about (Ok, Julian 😉 )

As long as you don't leave it.

My worry with work arounds like that is someone managing to insert a rogue proxy. Without proper https, you are then very vulnerable. The risk is relatively low though for a short while.

But it doesn't fix the issue of course which really does need fixing.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [5 March 2025 17:59 UTC](https://discourse.nodered.org/t/node-red-install-error-self-signed-cert-in-chain/93699/13 "2025-03-05T17:59:35Z")

</div>

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