Can't get Node Red to run on startup

Posted July 8, 2017 8.3k views
Node.jsUbuntu 16.04

I have followed the instructions at:

Node Red runs OK when I start it manually but I can’t get it to run on startup like the instructions say it should. Any suggestions?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
4 answers

Hi @mgirdner

So you can run it by using /usr/local/bin/node-red-pi --max-old-space-size=128 -v but it doesn’t work when you create the systemd configuration file?
What error do you get? Have you tried to look at the log?

journalctl -u node-red.service

When I try the command /usr/local/bin/node-red-pi –max-old-space-size=128 -v I get the following error:

-bash: /usr/local/bin/node-red-pi: No such file or directory

I can run it with just the command: node-red

But node red then stops as soon as I close out the terminal window. I am fairly new to Linux so forgive any ignorance of something simple.

whereis node-red responded with:
node-red: /usr/bin/node-red

  • @mgirdner
    Interesting. Strange the paths has changed, but maybe the tutorial is using an older Node.js version.
    Try changing the line in the systemd script to this instead:

    ExecStart=/usr/bin/node-red-pi --max-old-space-size=128 -v


    ExecStart=/usr/bin/node-red --max-old-space-size=128 -v

Yes, removing the /local/ from the ExecStart command fixed the problem. Thanks so much for your help.