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.
httpAdminMiddleware: function(req,res,next) {
// Perform any processing on the request.
// Be sure to call next() if the request should be passed on
}
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 /
.
This property can also be set as an Array to support multiple static directories, each with its own set of options. The options include the path to the local directory to serve content from, the root url to serve them from, an optional custom middleware function and an optional CORS configuration.
For example:
httpStatic: [
{
path: '/opt/static/',
root: '/private/',
middleware: myCustomHttpMiddleware,
cors: {
}
}
]
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”.
The allow/denyList options can be used to limit what modules the runtime
will install/load. It can use *
as a wildcard that matches anything.
externalModules: {
autoInstall: false,
autoInstallRetry: 30,
palette: {
allowInstall: true,
allowUpload: true,
allowList: [],
denyList: []
},
modules: {
allowInstall: true,
allowList: [],
denyList: []
}
}
['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"
}
},
tours: false, // disable the Welcome Tour for new users
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, // *Deprecated* - use externalModules.palette.allowInstall instead
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
},
theme: "", // Select a color theme for the editor. See https://github.com/node-red-contrib-themes/theme-collection for a collection of themes to choose from
codeEditor: {
lib: "ace", // Select the text editor component used by the editor. Defaults to "ace", but can be set to "ace" or "monaco"
options: {
// The following only apply if the editor is set to "monaco"
theme: "vs", // Select a color theme for the text editor component. Must match the file name of a theme in packages/node_modules/@node-red/editor-client/src/vendor/monaco/dist/theme
}
},
mermaid: {
theme: "default" // Select a color theme for the Mermaid diagramming and charting tool. Must match the name of a theme in https://mermaid.js.org/config/theming.html#available-themes
}
},
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. Any data stored using this method will not be persisted across restarts and will not be visible in the sidebar context viewer.
true
, the Function node’s Setup tab will allow adding additional modules that will become available to the function. See Writing Functions for more information. Default: false
.Node-RED: Low-code programming for event-driven applications.
Copyright OpenJS Foundation and Node-RED contributors. All rights reserved. The OpenJS Foundation has registered trademarks and uses trademarks. For a list of trademarks of the OpenJS Foundation, please see our Trademark Policy and Trademark List. Trademarks and logos not indicated on the list of OpenJS Foundation trademarks are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
The OpenJS Foundation | Terms of Use | Privacy Policy | OpenJS Foundation Bylaws | Trademark Policy | Trademark List | Cookie Policy