Node-RED guide series
The Node-RED service has a configuration file.
In this file, you can set various configuration options and customize your Node-RED installation to better suit your needs.
At this point, you've got a fully functioning Node-RED installation on your Raspberry Pi. You can actually go ahead and start creating your flows.
But you should be aware that the Node-RED service is configurable via a settings text file. In this file, you can set various configuration options and customize your Node-RED installation to better suit your needs.
The Node-RED configuration file
You can find details about the Node-RED configuration file in the Node-RED documentation.
On the Raspberry Pi, the location of the configuration file is:
In the hidden ".node-red" directory, Node-RED stores your flows, nodes, and, of course, its configuration file.
The configuration file is named "settings.js".
Go in the node-red directory and open it using the nano editor:
Below you can see a section of this file:
Most of the configuration options are commented out. You can enable them by removing the two forward slashes at the start of the corresponding line.
Here's a couple of interesting configuration options:
- "flowFile": this is the file that contains your flows. You can customise its location and name with this setting.
- "uiPort": this setting controls the port number under which the web user interface is accessible. The default is "1880", but you can change it to something else.
- "userDir": this setting controls the location of the Node-RED directory, which is where this configuration file, and the user flows and nodes are stored.
- "nodesDir": you can set an additional location that contain nodes (apart from the default userDir). If you enable this setting, Node-RED will scan in nodeDir for additional nodes.
- "adminAuth": you can protect the administrator or editor functions of your Node-RED service by setting up one or more user names and passwords. Each user may have their own set of credentials. Learn more about this in the documentation.
- And many more.
You can find a full list of configuration options in the documentation page.
For the purposes of my Node-RED & ESP32 project, I have left my configuration with its default settings.
Let's continue this series with the next article in which I will discuss Node-RED nodes.
Learn Node-RED and how to use it with the ESP32
This course will guide you through the construction of an automated control system. The deliverable is a Terrarium controller.
Along the way, you will learn a great deal about useful technologies such as the Node Red programming environment and MQTT.
Jump to another article
1. Introduction to Node-RED
2. Install Node-RED on the Raspberry Pi
6. Messages and Variables
7. The "complete" node
8. The "catch" node
9. The "link out" and "link in" nodes
10. The "switch" node
11. The "range" node
12. The "delay" node
13. The "trigger" node
14. The "RBE" (Report by Exception) node