Can't get Node Red to run on startup

July 8, 2017 5k views
Ubuntu 16.04 Node.js

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?

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.

Have another answer? Share your knowledge.