Setting Node Red SSL on Docker


#1

Hi guys, I am trying to set https secure connection with node red , I have generated the certificates following this tutorial NODE_RED SSL, on settings.js uncomented the follwing:

var fs = require("fs");
https: {
        //key: fs.readFileSync('privatekey.pem'),
        //cert: fs.readFileSync('certificate.pem')
		key: fs.readFileSync('/data/node-cert.pem'),
        cert: fs.readFileSync('/data/node-key.pem')
    },
    // The following property can be used to cause insecure HTTP connections to
    // be redirected to HTTPS.
requireHttps: true,

But node-red wont start , the log show the following error, Any hint?


#2

I think that may mean that your certificate file is not valid


#3

Thanks @colin , If my node-red is running in docker container , what would be the common name field when generating the certificate? the IP of my synology or the IP of the docker container?


#4

Sorry, I don't know.