Node-RED Docker Container SSL

I have been struggling to get my node-red container secure as it doesn't seem to like the settings.js. I have installed the SSL's in /data/ but I get the following error below. I have tried specifying in the config /data/fullchain.pem and /data/privkey.pem but still not working.

Any assistance would be great! I am manually copying the let's encrypt from the host but would love to automate it as well if anyone has advice.

Error loading settings file: /data/settings.js
Error: ENOENT: no such file or directory, open 'privkey.pem'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at Object.<anonymous> (/data/settings.js:94:26)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/usr/src/node-red/node_modules/node-red/red.js:140:20) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: 'privkey.pem'
}

I was able to get this working after changing it to /data/privkey.pem and /data/fullchain.pem and set permissions.

1 Like

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