HASS.IO addons: Node-Red configuration

I created an account for the whole purpose of describing the steps on how to properly set the Node-RED using SSL on your Home Assistant, after wasting a couple of hours researching for the right documentation. Like other post was mentioning already, the steps make sense for an experienced user who knows where to look, however, for a person who has just started playing with Linux, Home Assistant, Docker etc it’s been quite challenging to figure it out.

Using Home Assistant Supervised on a stand-alone Debian 11 linux machine:

  1. In Home Assistant “Settings” click on “Addons”

  2. Search for the “Node-RED” addon

  3. Install the “Node-RED” addon. - Do not start it yet!

  4. SSH into your Linux machine

  5. Navigate to location (in my case was) /usr/share/hassio/homeassistant ( run cli command ls -lrt to display a list of files and folders in the homeassistant directory). There should be a folder named node-red . cd to the node-red directory

  6. Within the node-red directory, create the SSL cert and key: Run the below command:

    openssl req -sha256 -newkey rsa:4096 -nodes -keyout privkey.pem -x509 -days 730 -out certificate.pem

    Once the command has run, and followed the on-screen prompts, you should have the certificate.pem and privkey.pem in the Node-RED directory

  7. Return to Home Assistant WebUI, go to Configuration tab and fill in the blanks (certfile with certificate.pem, credential_secret, keyfile with privkey.pem

  8. Enable the ssl option

  9. Click Save

  10. Go to Info tab and click Start followed by Open Web UI

  11. Now you should have Node-RED working!

2 Likes