Can't find correct settings.js - the one I found is not used


I have problems unsing node-red.
I installed it on a raspberry pi with the "automatic" installer and all worked.
The backend and the "ui" is accessable on port 1880.

I wanted to set a username and password and also change the port (and doing some other modifications) in the settings.js. I searched the file and i found it in usr/lib/node_modules/node-red/ ... but changing settings in there do have no effect on my installation.

Nor using node-red-start -s usr/lib/node_modules/node-red/settings.js

There must be another settings file what i don't find.

Welcome to Node-RED
24 Feb 13:26:15 - [info] Node-RED version: v1.2.9
24 Feb 13:26:15 - [info] Node.js  version: v12.21.0
24 Feb 13:26:15 - [info] Linux 4.14.98-v7+ arm LE
24 Feb 13:26:17 - [info] Loading palette nodes
24 Feb 13:26:24 - [info] Dashboard version 2.28.1 started at /ui
24 Feb 13:26:24 - [info] Settings file  : /root/.node-red/settings.js
24 Feb 13:26:24 - [info] Context store  : 'default' [module=memory]
24 Feb 13:26:24 - [info] User directory : /root/.node-red
24 Feb 13:26:24 - [warn] Projects disabled : editorTheme.projects.enabled=false
24 Feb 13:26:24 - [info] Flows file     : /root/.node-red/flows_loxberry.json
24 Feb 13:26:25 - [warn]

Thank you very much.


Do you mean the pi install script as in node-red documentation?

For setting.js path, Look at the line marked Settings file

Ps, it looks like you are running as root - that is not usually recommended unless you have a specific need.

Node-RED logs the path to the settings file it's using:


As mentioned, i can't find the folder ".node-red" in "root"...

root@loxberry:~# ls
dead.letter  node_modules  package.json  package-lock.json

It was the only way to get node-red installed.

How come? What was the problem installing it via the script as a user.

As Steve-Mcl has already said, it's not recommend to run node-RED as root.

I uninstalled node-red again now and tried to install as "standard user" via SSH/console login, not root superuser.

After starting script (bash <(curl -sL
) the following appears:

Running Node-RED install for user loxberry at /opt/loxberry on raspbian

[sudo] password for loxberry:
Sorry, user loxberry is not allowed to execute '/usr/bin/tee -a /var/log/nodered-install.log' as root on loxberry.
[sudo] password for loxberry:

AFAIK: This is a restriction of my loxberry image - can't be changed.

I don't know much about Loxberry, but yes you are probably correct.
I believe the Openelec media server also comes with it's own OS, and suffers the same difficulty.

1 Like

You might be better asking about this on a loxberry forum.

I thought it is a node-red problem... i try to install it on another pi without loxberry.
Thanks you!

That is because ls doesn't show you hidden files/directories by default.

Use ls -la to see all of the hidden files - including .node-red

Does the user ‘loxberry’ have sudo authority?
In a terminal run groups loxberry wHich will show what groups it is in. In a raspiness install, the ‘pi’ user is in the groups ‘adm dial out cdrom sudo audio video plugged games users input nerdev spi i2c gpio’

Try adding the loxberry user to the sudo group. The try the install again

Thank you all, but the hint from @knolleary was perfect.
Now i found the correct file, edited it and ... it works!


@zenofmud: Nope, loxberry does not have sudo authority.

And that’s why the script didn’t work