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?
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?
I think it’s the format of your files, not the Common name you’ve chosen for the certificate, that could be the problem.
That “No start line” error looks like something from an underlying SSL library.
Are the line endings in the file correct for the system you’re running Node RED on (eg Unix doesn’t like Windows’ ^M - carriage return - characters),
Are the key and certificate definitely in a PEM format?