Auto start node-red in ubuntu

I found another support :

Autostart Node-RED on Boot

To make Node-RED autostart when you boot or restart your Virtual Machine, you need to create a new systemd file for the nodered.service:

sudo nano /etc/systemd/system/nodered.service

Then, add the following (if you’re using root, you can leave the file as it is – otherwise comment the root and configure the non-root user option):

[Unit]
Description=Node-RED
After=syslog.target network.target

[Service]
ExecStart=/usr/local/bin/node-red --max-old-space-size=128 -v
Restart=on-failure
KillSignal=SIGINT

# log output to syslog as 'node-red'
SyslogIdentifier=node-red
StandardOutput=syslog

# non-root user to run as
#WorkingDirectory=/home/rui/
#User=rui
#Group=rui

# if using a root user
WorkingDirectory=/root/
User=root
Group=root

[Install]
WantedBy=multi-user.target

Your file should look like this, save it and exit (Ctrl+X, Y, Enter key).

To enable the Node-RED service and run this file on boot, enter the command:

sudo systemctl enable nodered.service

Restart your Virtual Machine to test if Node-RED is automatically starting on boot:

sudo reboot

Wait approximately 2 to 3 minutes for your server to fully restart, when you open your server IP address Node-RED software should load automatically:

http://YOUR-Digital-Ocean-IP-Address:1880

Digital Ocean Node-RED Installed testing

That’s it! Your Node-RED software is prepared.

I succeeded, your instructions are sketchy ( Running on Raspberry Pi : Node-RED (nodered.org)

1 Like