Node-red-start - nodered.service: ...empty string: NODE_RED_OPTIONS

Hi,

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?

TIA,
Colin J

What does this show?
systemctl cat nodered.service

Thanks Colin,

systemctl cat nodered.service
# /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
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

[Install]
WantedBy=multi-user.target

xxxxx = User

HTH,
Colin J

There is a line missing, it should be

#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.