How to include separate config file in NodeRED

489 Views Asked by At

How would I include a a separate settings.js file for my Node-RED configuration?

I am running node-red within a freebsd jail, and like to host all my config files in a mounted location for snapshot/backup/samba purposes.

Ideally, I'm hoping to have the main settings.js file include a single line, similar to include /usr/home/nodered/mnt/config/settings.js - and have all of the main settings contained within the custom included file.

The include argument works as expected for applications such as nginx/mosquitto/etc, however I'm not able to find the correct syntax for node-red

Thanks in advance :)

1

There are 1 best solutions below

2
hardillb On

Your approach is wrong, don't link the settings.js to some other file, put the whole userDir on the mounted volume (this is the way the official Node-RED docker containers work...)

This way you back up the settings.js, flow.json, creds_flow.json and .config.json files as well as any extra nodes installed.