I seem to have done something to my Development Node-RED installation and I have checked a few things, but it is now beyond my knowledge...
node-red-start
Start Node-RED Once Node-RED has started, point a browser at ``http://172.27.123.15:1880 On Pi Node-RED works better with the Firefox or Chrome browser Use node-red-stop to stop Node-RED Use node-red-start to start Node-RED again Use node-red-log to view the recent log output Use sudo systemctl enable nodered.service to autostart Node-RED at every boot Use sudo systemctl disable nodered.service to disable autostart on boot To find more nodes and example flows - go to ``http://flows.nodered.org Starting as a systemd service. nodered.service: Referenced but unset environment variable evaluates to an empty string: NODE_RED_OPTIONS
I checked
sudo systemctl status nodered.service ● nodered.service - Node-RED graphical event wiring tool Loaded: loaded (/usr/lib/systemd/system/nodered.service; enabled; preset: enabled) Active: active (running) since Fri 2026-06-05 10:21:37 BST; 17min ago Docs:Redirecting… Main PID: 19478 (node-red) Tasks: 11 (limit: 18369) Memory: 159.5M (peak: 283.7M) CPU: 4.290s CGroup: /system.slice/nodered.service └─19478 node-red
Things are seemingly working OK. I have tried re-installing NR to no avail. Any suggestions for a fix, and some idea of what is being affected?
[Service] Type=simple # Run as normal pi user - change to the user name you wish to run Node-RED as User=xxxxx Group=xxxxx WorkingDirectory=/home/xxxxx
Environment="NODE_OPTIONS=--max_old_space_size=2048" # define an optional environment file in Node-RED's user directory to set custom variables externally EnvironmentFile=-/home/xxxxx/.node-red/environment # uncomment and edit next line if you need an http proxy #Environment="HTTP_PROXY=my.httpproxy.server.address" # uncomment the next line for a more verbose log output #Environment="NODE_RED_OPTIONS=-v" # uncomment next line if you need to wait for time sync before starting #ExecStartPre=/bin/bash -c '/bin/journalctl -b -u systemd-timesyncd | /bin/grep -q "systemd-timesyncd.* Synchroniz>
ExecStart=/usr/bin/env node-red-pi $NODE_OPTIONS $NODE_RED_OPTIONS #ExecStart=/usr/bin/env node $NODE_OPTIONS red.js $NODE_RED_OPTIONS # Use SIGINT to stop KillSignal=SIGINT # Auto restart on crash Restart=on-failure RestartSec=20 # Tag things in the log SyslogIdentifier=Node-RED #StandardOutput=syslog
#Environment="HTTP_PROXY=my.httpproxy.server.address"
Environment="NODE_RED_OPTIONS="
# uncomment the next line for a more verbose log output
#Environment="NODE_RED_OPTIONS=-v"
Have you edited the file? Or perhaps @dceejay accidentally removed it from the file during his
refactoring of the install script.
No, I haven't edited, ever, however, the 'Producton' system has all the same updates applied, albeit a short while (varies) after the 'Development' one.
I know @dceejay has worked on the install script recently.,,
BUT, that line is missing from the 'Production' system as well which starts OK...
Isn't Environment="NODE_RED_OPTIONS=" overwritten by #Environment="NODE_RED_OPTIONS=-v" ? (Asking for a friend... )
How would I get that line inserted in the correct place? (I think I need to add it 'above the line'.)
Are you sure the production system does not show the warning? It is only a warning, it shouldn't stop it running.
No that is commented out (the #) so does nothing.
sudo nano /usr/lib/systemd/system/nodered.service
Nano is a simple keyboard based editor. Using the keyboard move the curser to the correct place and insert it. Then Ctrl+S to save and Ctrl+X to exit. Then sudo systemctl daemon-reload
to get the system to read it (or reboot).
Anything between here and the comment below will become the contents of the drop-in file
Edits below this comment will be discarded
and then it continues (Hashes are causing format changes in the Forum!)
### /usr/lib/systemd/system/nodered.service # # systemd service file to start Node-RED # # [Unit] # Description=Node-RED graphical event wiring tool # Wants=network.target # Documentation=http://nodered.org/docs/hardware/raspberrypi.html # # [Service] # Type=simple # # Run as normal pi user - change to the user name you wish to run Node-RED as (cont'd)
Doesn't that mean that all lines are commented out? I thought that a single # was used in some configuration files as a sort of new line/command type structure (iirc Grafana??).
Both of the files look virtually identical except for Users and Paths.
Correct. It creates an override file so that you can modify the settings without changing the original file. That is a useful technique as it allow the original file to be updated by updating a package without destroying any mods that you have done. The node-red script does not modify an existing script though so does not require you to use that technique.
PS: If your Pi has plenty of RAM, you probably would be better off removing the Environment="NODE_OPTIONS=--max_old_space_size=2048" line (put a #at the front of it to comment it out).
Also, I always leave the -v option on for my live system.
And (then I'll shut up!) - if you are exposing that instance to the Internet, there are quite a few more things you should add/remove for safety and security.
None of my computers are exposed to the Internet except the one on a 'DMZ', it has ISPConfig3 on it and runs a few small websites. I put 'DMZ' like that as I have an ISP grade Router with a completely Isolated Network on it (and IP address), FireBrick FB2900, it is a beast!!
BTW, this started with a problem of UIBUILDER putting it's new folder for a new Project in ~/.node-red/uibuilder instead of ~/.node-red/projects/project/uibuilder>. Despite projects being set up and all being OK in the past. Since I have added that line, all is back to normal, I can add a new server OK.
The production machine is working and I am not going to change that until I have had some Dutch Courage, which is probably the time I shouldn't do it! All this is just beyond the edge of my 'awareness' knowledge and definitely outside of my comfort zone!!
As a further thought, the Production server has been set up for quite a while (years).
I actually have the fix ready to go and can release now if you like?
I was hoping that Colin would be able to have another go with Markweb as he found an odd issue which I may have fixed but as I couldn't reproduce his error, I can't be sure. Anyway, the project location error is certainly fixed along with a few other edge-cases. A couple of sneaky improvements also included.
Happy to release though. I can always do another if Colin's issue isn't fixed.
Here is the summary of the changes/fixes that are ready to go - just in case any of them are impacting you:
New features
A new --syntax-highlight-height CSS variable has been added to allow the maximum height of syntax-highlighted blocks to be set. If the content exceeds this height, it becomes scrollable. This is useful for preventing very large blocks of content from taking up too much space on the page. The default value is 22em, but you can set it to whatever you like in your CSS. You can check out its use on the Variables page in the Markweb demo where the height is reduced to 9em.
For Markweb, there is a new uibuilder.markwebEvent variable. Currently, this is only set/updated on page-navigation. It shows the old and new URL's. The Variables page in the Markweb demo has been updated to show how to use this.
Bug fixes & tweaks
When the runtime plugin is loaded by Node-RED, the uibRoot folder should be in 1 of 3 possible places. An overridden location (uibuilder.uibRoot in settings.js if provided), <userDir>/<uib.moduleName> (e.g. commonly ~/.node-red/uibuilder), or <userDir>/projects/<currProject>/<uib.moduleName> if Node-RED projects are being used. The last of these was not working correctly. This is now fixed. In addition, the logic for determining the uibRoot location has been tidied up and made more robust. Reference.
Markweb:
Various demo page content clarified and tidied up.
The navigation menu shows a left-hand border for the current page. This was appearing outside a folder twisty icon which looked odd. Now improved, the border is inside the icon.
Navigation and index lists were showing folders that had no index.md file and so clicking on the folder would result in a 404 not found page. Now fixed, folders with no index page are hidden as per the design requirements.
Navigating with the back button to a URL containing an anchor hash link was not working consistently. Now fixed.
For some users, the Markweb was reporting 0 files to be indexed. This appears to be due to the ignore parameter passed to fgSync (which uses fast-glob). Ref.