# Node-Red need to restart manually

**URL:** <https://discourse.nodered.org/t/node-red-need-to-restart-manually/29662>\
**Category:** General\
**Created:** [7 July 2020 13:54 UTC](https://discourse.nodered.org/t/node-red-need-to-restart-manually/29662 "2020-07-07T13:54:21Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prizal](https://avatars.discourse-cdn.com/v4/letter/p/f475e1/32.png) [@Prizal](https://discourse.nodered.org/u/Prizal)\
**Post date:** [7 July 2020 13:54 UTC](https://discourse.nodered.org/t/node-red-need-to-restart-manually/29662/1 "2020-07-07T13:54:21Z")

</div>

Hello,  
I have installed nod red. The problem is everytime I log out the nodered seems to be offline. I need to restart each time I log in via node-red command.

~$ node-red  
7 Jul 13:22:17 - [info]

# Welcome to Node-RED

7 Jul 13:22:17 - [info] Node-RED version: v1.0.6  
7 Jul 13:22:17 - [info] Node.js version: v8.10.0  
7 Jul 13:22:17 - [info] Linux 5.3.0-1026-gcp x64 LE  
7 Jul 13:22:17 - [info] Loading palette nodes  
7 Jul 13:22:18 - [info] Settings file : /home/prizal\_gmail\_com/.node-red/settings.js  
7 Jul 13:22:18 - [info] Context store : 'default' [module=memory]  
7 Jul 13:22:18 - [info] User directory : /home/prizal\_gmail\_com/.node-red  
7 Jul 13:22:18 - [warn] Projects disabled : editorTheme.projects.enabled=false  
7 Jul 13:22:18 - [info] Flows file : /home/prizal\_gmail\_com/.node-red/flows\_nyamuk.json  
7 Jul 13:22:18 - [info] Server now running at [http://127.0.0.1:1880/](http://127.0.0.1:1880/)  
7 Jul 13:22:18 - [warn]

* * *

Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials  
file will not be recoverable, you will have to delete it and re-enter  
your credentials.

## You should set your own key using the 'credentialSecret' option in your settings file. Node-RED will then re-encrypt your credentials file using your chosen key the next time you deploy a change.

I run this and fails  
sudo systemctl enable node-red  
Failed to enable unit: Unit file node-red.service does not exist.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [7 July 2020 14:08 UTC](https://discourse.nodered.org/t/node-red-need-to-restart-manually/29662/2 "2020-07-07T14:08:04Z")

</div>

what does the command line say to start ?... I'll give you a clue...

```auto
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot

```

so not quite the same spelling...

---

<div class="post-metadata">

**Author:** ![Prizal](https://avatars.discourse-cdn.com/v4/letter/p/f475e1/32.png) [@Prizal](https://discourse.nodered.org/u/Prizal)\
**Post date:** [7 July 2020 14:11 UTC](https://discourse.nodered.org/t/node-red-need-to-restart-manually/29662/3 "2020-07-07T14:11:08Z")

</div>

> [@dceejay](#):
>
> `sudo systemctl enable nodered.service`

this is the result 🙂  
sudo systemctl enable nodered.service  
Failed to enable unit: Unit file nodered.service does not exist.

sudo systemctl enable node-red.service  
Failed to enable unit: Unit file node-red.service does not exist.

also cant find node-red in /lib/systemd/system$

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [7 July 2020 14:20 UTC](https://discourse.nodered.org/t/node-red-need-to-restart-manually/29662/4 "2020-07-07T14:20:20Z")

</div>

so how was it installed ? the nodered.service file should be under /lib/systemd/system if the debian install script completed successfully.

---

<div class="post-metadata">

**Author:** ![Prizal](https://avatars.discourse-cdn.com/v4/letter/p/f475e1/32.png) [@Prizal](https://discourse.nodered.org/u/Prizal)\
**Post date:** [7 July 2020 14:21 UTC](https://discourse.nodered.org/t/node-red-need-to-restart-manually/29662/5 "2020-07-07T14:21:39Z")

</div>

im not sure how was it installed . im confused as I read and looking for solution and found all solution that doesnt show me same result

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [7 July 2020 14:45 UTC](https://discourse.nodered.org/t/node-red-need-to-restart-manually/29662/6 "2020-07-07T14:45:42Z")

</div>

well only the debian install script will add the necessary scripts [https://nodered.org/docs/getting-started/raspberrypi#autostart-on-boot](https://nodered.org/docs/getting-started/raspberrypi#autostart-on-boot)

---

<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:** [7 July 2020 15:08 UTC](https://discourse.nodered.org/t/node-red-need-to-restart-manually/29662/7 "2020-07-07T15:08:26Z")

</div>

You can just run the script in the link posted above and it will add the scripts, aswell as making sure everything else you need is there.

---

<div class="post-metadata">

**Author:** ![Prizal](https://avatars.discourse-cdn.com/v4/letter/p/f475e1/32.png) [@Prizal](https://discourse.nodered.org/u/Prizal)\
**Post date:** [8 July 2020 04:47 UTC](https://discourse.nodered.org/t/node-red-need-to-restart-manually/29662/8 "2020-07-08T04:47:44Z")

</div>

how do i create a script that will auto start node-red everytime ? maybe start as daemon ..

---

<div class="post-metadata">

**Author:** ![Prizal](https://avatars.discourse-cdn.com/v4/letter/p/f475e1/32.png) [@Prizal](https://discourse.nodered.org/u/Prizal)\
**Post date:** [8 July 2020 05:07 UTC](https://discourse.nodered.org/t/node-red-need-to-restart-manually/29662/9 "2020-07-08T05:07:20Z")

</div>

Found the solution. Thank you guys .

Solution from here :  
[https://nodered.org/docs/faq/starting-node-red-on-boot](https://nodered.org/docs/faq/starting-node-red-on-boot)

my directory location is : /usr/local/bin/node-red

Thanks a lot 😉

---

<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:** [6 September 2020 05:07 UTC](https://discourse.nodered.org/t/node-red-need-to-restart-manually/29662/10 "2020-09-06T05:07:21Z")

</div>

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