The following properties can be used to configure Node-RED.
When running as a normal application, it loads its configuration from a settings file. For more information about the settings file and where it is, read this guide.
When running as an embedded application, the configuration options
are passed in the call to RED.init()
. However, when run in this mode, certain
properties are ignored and are left to the embedding application to implement.
flows_<hostname>.json
$HOME/.node-red
nodes
directory under the userDir directory. This property allows an additional directory
to be searched, so that nodes can be installed outside of the Node-RED install
structure. Default: $HOME/.node-red/nodes
0.0.0.0
-
all IPv4 interfaces.
Standalone only.
1880
.
Standalone only.
false
, all admin endpoints are disabled. This includes both API endpoints and the editor UI. To disable just the editor UI, see the disableEditor
property below. Default: /
adminAuth
.
enables HTTP Basic Authentication on the editor UI:
httpAdminAuth: {user:"nol", pass:"5f4dcc3b5aa765d61d8327deb882cf99"}
The pass
property is the md5 hash of the actual password. The following
command can be used to generate the hash:
node -e "console.log(require('crypto').createHash('md5').update('YOUR PASSWORD HERE','utf8').digest('hex'))"
Standalone only.
false
, all node-based HTTP endpoints are disabled. Default: /
httpAdminAuth
for format.httpAdminRoot
and httpNodeRoot
.Standalone only.
true
, prevents the editor UI from being served by the runtime. The admin api endpoints remain active. Default: false
./
. When this property is used, httpAdminRoot
must
also be used to make editor UI available at a path other than /
.
Standalone only.
httpAdminAuth
for format.httpNodeMiddleware: function(req,res,next) {
// Perform any processing on the request.
// Be sure to call next() if the request should be passed
// to the relevant HTTP In node.
}
The default level is info
. For embedded devices with limited flash storage you may wish to set this to fatal
to minimise writes to “disk”.
['subflows', 'common', 'function', 'network', 'sequence', 'parser', 'storage'],
Note: Until the user creates a subflow the subflow category will be empty and will not be visible in the palette.
The theme of the editor can be changed by using the following settings object. All parts are optional.
editorTheme: {
page: {
title: "Node-RED",
favicon: "/absolute/path/to/theme/icon",
css: "/absolute/path/to/custom/css/file",
scripts: [ "/absolute/path/to/custom/script/file", "/another/script/file"]
},
header: {
title: "Node-RED",
image: "/absolute/path/to/header/image", // or null to remove image
url: "http://nodered.org" // optional url to make the header text/image a link to this url
},
deployButton: {
type:"simple",
label:"Save",
icon: "/absolute/path/to/deploy/button/image" // or null to remove image
},
menu: { // Hide unwanted menu items by id. see packages/node_modules/@node-red/editor-client/src/js/red.js:loadEditor for complete list
"menu-item-import-library": false,
"menu-item-export-library": false,
"menu-item-keyboard-shortcuts": false,
"menu-item-help": {
label: "Alternative Help Link Text",
url: "http://example.com"
}
},
userMenu: false, // Hide the user-menu even if adminAuth is enabled
login: {
image: "/absolute/path/to/login/page/big/image" // a 256x256 image
},
logout: {
redirect: "http://example.com"
},
palette: {
editable: true, // Enable/disable the Palette Manager
catalogues: [ // Alternative palette manager catalogues
'https://catalogue.nodered.org/catalogue.json'
],
theme: [ // Override node colours - rules test against category/type by RegExp.
{ category: ".*", type: ".*", color: "#f0f" }
]
},
projects: {
enabled: false // Enable the projects feature
}
},
ui : { path: “mydashboard” },
Any node type can define its own settings to be provided in the file.
functionGlobalContext: { osModule:require('os') }
can be accessed in a function node as:
var myos = global.get('osModule');
context
:
context.global.foo = "bar"; var osModule = context.global.osModule;This method is still supported, but deprecated in favour of the
global.get
/global.set
functions. This is in anticipation of being able to persist the context data in a future release.
Node-RED: Low-code programming for event-driven applications.
A project of the OpenJS Foundation.