# No matching certificate files to satisfy Node-Red https setup

**URL:** <https://discourse.nodered.org/t/no-matching-certificate-files-to-satisfy-node-red-https-setup/66202>\
**Category:** General\
**Tags:** security\
**Created:** [9 August 2022 06:32 UTC](https://discourse.nodered.org/t/no-matching-certificate-files-to-satisfy-node-red-https-setup/66202 "2022-08-09T06:32:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pcborges](https://avatars.discourse-cdn.com/v4/letter/p/8edcca/32.png) [@pcborges](https://discourse.nodered.org/u/pcborges)\
**Post date:** [9 August 2022 06:32 UTC](https://discourse.nodered.org/t/no-matching-certificate-files-to-satisfy-node-red-https-setup/66202/1 "2022-08-09T06:32:43Z")

</div>

Currently I have a registered domain and Apache on Debian running SSL.  
My domain is accessible with https and works perfectly.  
Node-Red still runs http and need to run https for security and compatibility as some php scripts (on https) need to interact with Node-Red (currently on http) and I am having problems with that.

I got 4 files from when I acquired SSL:  
server.key, server.csr, certificate.crt and intermediate.crt

But settings.js requires:

```auto
    /** Option 1: static object */
    //https: {
    // key: require("fs").readFileSync('privkey.pem'),
    // cert: require("fs").readFileSync('cert.pem')
    //},

```

I have no privkey.pem and no cert.pem

What is the part Am I missing?  
Thanks

---

<div class="post-metadata">

**Author:** ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)\
**Post date:** [9 August 2022 07:20 UTC](https://discourse.nodered.org/t/no-matching-certificate-files-to-satisfy-node-red-https-setup/66202/2 "2022-08-09T07:20:29Z")

</div>

Hello .. this stackoverflow article may better clarify the differences between the files and their extensions.

[Difference between pem, crt, key files](https://stackoverflow.com/questions/63195304/difference-between-pem-crt-key-files)

I must admit im new to this security stuff but reading the above .. you can try the following

```auto
/** Option 1: static object */
    https: {
      key: require("fs").readFileSync('server.key'),
      cert: require("fs").readFileSync('certificate.crt')
    },

```

ps. you may need to use the absolute path to the files

---

<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:** [23 August 2022 07:20 UTC](https://discourse.nodered.org/t/no-matching-certificate-files-to-satisfy-node-red-https-setup/66202/3 "2022-08-23T07:20:50Z")

</div>

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