Change settings.js

my node needs the nodes context storage to be persistent, for that, I can set
contextStorage to localfilesystem in settings.js.

can I change that setting from my node? how?

in the docs it is mentioned that you can use multiple context storages:

contextStorage: {
   default: "memoryOnly",
   memoryOnly: { module: 'memory' },
   file: { module: 'localfilesystem' }

how do I use a contextStorage different to default for my nodes context?

If it is not possible to change these setting from code, is there a recommended way to tell users about the required settings?

you have to edit the settings.js file and restart node-red.

For an explaination of how it works, read A guide to understanding 'Persistent Context'

1 Like

great write up! thanks! should have searched the forum before asking :wink: