Launch Node-Red On Startup With a Batch File

I want Node-Red to start up (and other command line programs) when Windows 10 starts. Batch files are a simple way to achieve this.

One feature, bad or good, is the batch file will open a command prompt window that essentially acts like a live log viewer for node-red. This is fine for my application because I have a PC dedicated running 24-7 for a camera video server, MQTT server, and now Node-Red. I like being able to see what Node-Red is doing, if you want Node-Red to run in the background as a service you will want to use a different method.

Here are the step by step instructions to create your batch file:

 

  1. Create a new text file.New Text Document

 

 

 

 

 

 

 

2. Rename the file .txt extension to .batRename File

 

 

 

 

 

 

3. Don’t run the file by double-clicking it, right click and select edit.  Node Red Batch File Text

 

 

 

 

 
4. Copy and paste this code.

:: Batch file to start node-red.  
ECHO ON
ECHO Starting Node Red...
node-red

 

5. Double click the batch file to launch Node-Red!Node Red command prompt

 

 

 

 

 

 

 

 

 

6. If you want the batch file to run every time windows 10 boots copy the batch file or a shortcut to it into  C:\Users\(your user name here)\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup.Location for auto start

Leave a Comment