Editing settings.js before starting node-RED first time

I'm writing up a recipe for colleagues to follow. One of the things that our environment needs is for the users to create their own passwords ... we can't allow non-password protected environments. To achieve this, we need to edit settings.js. However, we appear to have a bootstrap puzzle. When a user installs node-RED using npm install node-red, the settings.js file isn't created before first run and we want to avoid even a first run just to create a settings.js file. Is there a recipe to create a settings.js (or otherwise set a password) before initially starting node-RED?

On first run the default one from the project gets copied into the users directory (typically ~/.node-red ) .
You can always do this manually first or send them one preset to use, as we check before copying and leave it if it already exists.

Just like to say Welcome, and I'm sure many of us (including myself) have enjoyed your books. Thanks.

2 Likes

Thank you sir. Very kind ... you made my evening. I wear a new hat now but never lost my admiration for Node-RED. I'm trying to push it and provide some custom nodes with my new employer.

1 Like