# Node-red is not starting on boot

**URL:** <https://discourse.nodered.org/t/node-red-is-not-starting-on-boot/15238>\
**Category:** General\
**Created:** [7 September 2019 14:08 UTC](https://discourse.nodered.org/t/node-red-is-not-starting-on-boot/15238 "2019-09-07T14:08:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dylantje](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dylantje/32/16492_2.png) [@Dylantje](https://discourse.nodered.org/u/Dylantje)\
**Post date:** [7 September 2019 14:08 UTC](https://discourse.nodered.org/t/node-red-is-not-starting-on-boot/15238/1 "2019-09-07T14:08:07Z")

</div>

Dear...  
finally node red running, only not when i start my Odroid N2  
I run armbian on my N2..

```auto

Welcome to Node-RED
===================

7 Sep 15:58:27 - [info] Node-RED version: v0.20.7
7 Sep 15:58:27 - [info] Node.js version: v10.16.3
7 Sep 15:58:27 - [info] Linux 4.9.190-odroidn2 arm64 LE
7 Sep 15:58:28 - [info] Loading palette nodes
7 Sep 15:58:29 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
7 Sep 15:58:29 - [warn] rpi-gpio : Cannot find Pi RPi.GPIO python library
7 Sep 15:58:29 - [info] Settings file : /home/pi/.node-red/settings.js
7 Sep 15:58:29 - [info] Context store : 'default' [module=memory]
7 Sep 15:58:29 - [info] User directory : /home/pi/.node-red/
7 Sep 15:58:29 - [warn] Projects disabled : editorTheme.projects.enabled=false
7 Sep 15:58:29 - [info] Flows file : /home/pi/.node-red/flows_odroidn2.json
7 Sep 15:58:29 - [info] Creating new flow file
7 Sep 15:58:29 - [info] Starting flows
7 Sep 15:58:29 - [info] Started flows
7 Sep 15:58:29 - [info] Server now running at http://192.168.5.70:1880/
7 Sep 15:59:13 - [info] Stopping flows
7 Sep 15:59:13 - [info] Stopped flows
7 Sep 15:59:13 - [info] Starting flows
7 Sep 15:59:13 - [info] Started flows

```

I found on the web that has to be a service file:

```auto

pi@odroidn2:~$ sudo systemctl enable nodered.service
[sudo] password for pi:
Failed to enable unit: Unit file nodered.service does not exist.
pi@odroidn2:~$

```

The file should be here:  
[Service file](https://discourse.nodered.org/t/node-red-on-ubuntu-dumb-question/3249/4)

```auto
/lib/systemd/system/nodered.service

```

Only i cannot find a file like this..  
So i hope there is someone..

---

<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 September 2019 14:39 UTC](https://discourse.nodered.org/t/node-red-is-not-starting-on-boot/15238/2 "2019-09-07T14:39:19Z")

</div>

the service file can be found here  
[https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/nodered.service](https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/nodered.service)

this is for Pi users so you will need to edit it to change the user (pi) to the one you want to run Node-RED as.

---

<div class="post-metadata">

**Author:** ![Dylantje](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dylantje/32/16492_2.png) [@Dylantje](https://discourse.nodered.org/u/Dylantje)\
**Post date:** [7 September 2019 14:57 UTC](https://discourse.nodered.org/t/node-red-is-not-starting-on-boot/15238/3 "2019-09-07T14:57:08Z")

</div>

Thanks

Just put the file in the directory?  
And change some things?  
Root or user file?

---

<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 September 2019 15:00 UTC](https://discourse.nodered.org/t/node-red-is-not-starting-on-boot/15238/4 "2019-09-07T15:00:34Z")

</div>

Yes you will need to change these lines to match your setup

```
User=pi
Group=pi
 WorkingDirectory=/home/pi
```

---

<div class="post-metadata">

**Author:** ![Dylantje](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dylantje/32/16492_2.png) [@Dylantje](https://discourse.nodered.org/u/Dylantje)\
**Post date:** [7 September 2019 15:18 UTC](https://discourse.nodered.org/t/node-red-is-not-starting-on-boot/15238/5 "2019-09-07T15:18:29Z")

</div>

Sorry

Do not understand...

Do i place the file in to:  
/lib/systemd/system/

And give the name:  
nodered.service

Or do i need the place the line into:  
WorkingDirectory=/home/pi/nodered [my place]

---

<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 September 2019 15:59 UTC](https://discourse.nodered.org/t/node-red-is-not-starting-on-boot/15238/6 "2019-09-07T15:59:33Z")

</div>

Yes the first of those two options
