# Fail to start nodered.service on raspberry pi

**URL:** https://discourse.nodered.org/t/fail-to-start-nodered-service-on-raspberry-pi/47668
**Category:** General
**Created:** [25 June 2021 15:20 UTC](https://discourse.nodered.org/t/fail-to-start-nodered-service-on-raspberry-pi/47668 "2021-06-25T15:20:19Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![2E3](https://avatars.discourse-cdn.com/v4/letter/2/e19adc/32.png) [@2E3](https://discourse.nodered.org/u/2E3)
#### Post date: [25 June 2021 15:20 UTC](https://discourse.nodered.org/t/fail-to-start-nodered-service-on-raspberry-pi/47668/1 "2021-06-25T15:20:19Z")

</div>

Hi, I am having some issues with the nodered.service

Node-RED version: v1.3.5  
Node.js version: v14.17.0  
Linux 5.4.51+ arm LE  
raspberry pi Zero W

I can start node-red-pi as user (2E3) without problems.

However when I wan to setup node red as a service through :  
systemctl start nodered.service

I get this failure:  
Failed to start nodered.service: Unit nodered.service has a bad unit file setting.  
See system logs and 'systemctl status nodered.service' for details.

status says:

nodered.service - Node-RED graphical event wiring tool  
Loaded: bad-setting (Reason: Unit nodered.service has a bad unit file setting.)  
Active: inactive (dead) since Fri 2021-06-25 16:47:52 CEST; 28min ago  
Docs: [Redirecting…](http://nodered.org/docs/hardware/raspberrypi.html)  
Main PID: 6020 (code=exited, status=0/SUCCESS)

/lib/systemd/system/nodered.service:8: Invalid user/group name or numeric ID: 2E3

My nodered.service files contains

# systemd service file to start Node-RED

# 

# 

[Unit]  
Description=Node-RED graphical event wiring tool  
#After=syslog.target network.target  
Wants=network.target  
Documentation=[Redirecting…](http://nodered.org/docs/hardware/raspberrypi.html)

[Service]  
Type=simple

# Run as normal pi user - change to the user name you wish to run Node-RED as

User=2E3 ---\> ERROR ????  
Group=2E3  
WorkingDirectory=/home/2E3/.node-red

Environment="NODE\_OPTIONS=--max\_old\_space\_size=256"

# uncomment and edit next line if you need an http proxy

#Environment="HTTP\_PROXY=my.httpproxy.server.address"

# uncomment the next line for a more verbose log output

#Environment="NODE\_RED\_OPTIONS=-v"

# uncomment next line if you need to wait for time sync before starting

#ExecStartPre=/bin/bash -c '/bin/journalctl -b -u systemd-timesyncd | /bin/grep -q "systemd-timesyncd.\* Synchronized to time server"'

ExecStart=/usr/bin/env node-red-pi $NODE\_OPTIONS $NODE\_RED\_OPTIONS  
#ExecStart=/usr/bin/env node $NODE\_OPTIONS red.js $NODE\_RED\_OPTIONS

# Use SIGINT to stop

KillSignal=SIGINT

# Auto restart on crash

Restart=on-failure  
RestartSec=20

# Tag things in the log

SyslogIdentifier=Node-RED  
#StandardOutput=syslog

[Install]  
WantedBy=multi-user.target

I can not find a solution

Any ideas ?

Thx  
2E3

---

<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: [25 June 2021 15:40 UTC](https://discourse.nodered.org/t/fail-to-start-nodered-service-on-raspberry-pi/47668/2 "2021-06-25T15:40:01Z")

</div>

Welcome to the forum @2E3

It is generally considered a bad idea to start a username with a digit. A number of commands will not cope with that. I imagine that this is the cause of the problem you are having.

---

<div class="post-metadata">

### Author: ![2E3](https://avatars.discourse-cdn.com/v4/letter/2/e19adc/32.png) [@2E3](https://discourse.nodered.org/u/2E3)
#### Post date: [25 June 2021 16:02 UTC](https://discourse.nodered.org/t/fail-to-start-nodered-service-on-raspberry-pi/47668/3 "2021-06-25T16:02:14Z")

</div>

Thx Colin, I will create a new profile and try again.

---

<div class="post-metadata">

### Author: ![2E3](https://avatars.discourse-cdn.com/v4/letter/2/e19adc/32.png) [@2E3](https://discourse.nodered.org/u/2E3)
#### Post date: [27 June 2021 16:57 UTC](https://discourse.nodered.org/t/fail-to-start-nodered-service-on-raspberry-pi/47668/4 "2021-06-27T16:57:58Z")

</div>

Dear @Colin

Works perfect! Thank you for the advice

---

<div class="post-metadata">

### Author: ![alexander77](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@alexander77](https://discourse.nodered.org/u/alexander77)
#### Post date: [27 June 2021 19:49 UTC](https://discourse.nodered.org/t/fail-to-start-nodered-service-on-raspberry-pi/47668/5 "2021-06-27T19:49:08Z")

</div>

I don't want to hijack a thread, but 2E3 has closed his question (works perfect) and i want to add a question regarding the same topic.  
I usually set up my raspis with the command sudo systemctl enable nodered.service.  
2E3 used start instead of enable. Is there a difference between these commands?

---

<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: [27 June 2021 20:27 UTC](https://discourse.nodered.org/t/fail-to-start-nodered-service-on-raspberry-pi/47668/6 "2021-06-27T20:27:03Z")

</div>

`start` starts the service running.  
`enable` says start it running each time the device boots, it does not not start it immediately.

---

<div class="post-metadata">

### Author: ![alexander77](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@alexander77](https://discourse.nodered.org/u/alexander77)
#### Post date: [27 June 2021 20:29 UTC](https://discourse.nodered.org/t/fail-to-start-nodered-service-on-raspberry-pi/47668/7 "2021-06-27T20:29:50Z")

</div>

Thank you!

---

<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: [11 July 2021 20:30 UTC](https://discourse.nodered.org/t/fail-to-start-nodered-service-on-raspberry-pi/47668/8 "2021-07-11T20:30:41Z")

</div>

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