# Node Red Daemon example

**URL:** <https://discourse.nodered.org/t/node-red-daemon-example/52178>\
**Category:** General\
**Created:** [13 October 2021 17:51 UTC](https://discourse.nodered.org/t/node-red-daemon-example/52178 "2021-10-13T17:51:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chasmccoy](https://avatars.discourse-cdn.com/v4/letter/c/e47774/32.png) [@chasmccoy](https://discourse.nodered.org/u/chasmccoy)\
**Post date:** [13 October 2021 17:51 UTC](https://discourse.nodered.org/t/node-red-daemon-example/52178/1 "2021-10-13T17:51:55Z")

</div>

Hello all...trying to find an example of a configured node red Daemon. I'm currently using an Exec Node in Node Red 2.06 and it works like a charm, except for I want ability to read stdin while running. So I tried out Daemon and all I get is "command is not running". Since lots of people use Daemon, I assume I have it configured incorrectly and went hunting to import an example. However, I could not find one. In other forums I've also seen the same error of "command is not running" but only on Pi hardware. This is on Pi hardware, but not convinced that I'm just doing it wrong. Thanks for your help.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [13 October 2021 18:53 UTC](https://discourse.nodered.org/t/node-red-daemon-example/52178/2 "2021-10-13T18:53:20Z")

</div>

Welcome to the forum.

What OS are you using? If you are using some kind of modern Linux, the most common daemon approach is to use systemd. I think that Dave's Pi script sets that up. I also have an example in my alternate installer that you'll find on my GitHub.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [13 October 2021 19:03 UTC](https://discourse.nodered.org/t/node-red-daemon-example/52178/3 "2021-10-13T19:03:34Z")

</div>

Hello chasmccoy 😃

I'm not convinced that Totallyinformation's answer is related to the node-red-node-daemon node.

How is your daemon node configured? You could post an export of your flow or a screen snapshot.  
Is your Python script executable - what does ls -l scriptname show?  
Does the script have #! /usr/bin/python3 as the first line?

I find that the Daemon node will not start the script unless you have the "Relaunch command on exit or error" option checked. (Except I think it did the very first time I deployed) Instead it says "command not running".

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [13 October 2021 20:01 UTC](https://discourse.nodered.org/t/node-red-daemon-example/52178/4 "2021-10-13T20:01:39Z")

</div>

> [@jbudd](#):
>
> I'm not convinced that Totallyinformation's answer is related to the node-red-node-daemon node

No need to be unconvinced - it certainly isn't 😀

Questions need to be clear if people want a good answer - there are thousands of nodes and the question sounded like something to do with starting node-red.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [13 October 2021 20:39 UTC](https://discourse.nodered.org/t/node-red-daemon-example/52178/5 "2021-10-13T20:39:43Z")

</div>

> [@chasmccoy](#):
>
> I want ability to read stdin while running

Where do you want stdin to be read from?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [12 December 2021 20:39 UTC](https://discourse.nodered.org/t/node-red-daemon-example/52178/6 "2021-12-12T20:39:56Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
