# systemd service file to start Node-RED [Unit] Description=Node-RED graphical event wiring tool. Wants=network.target Documentation=http://nodered.org/docs/hardware/raspberrypi.html [Service] Type=simple # Run as normal pi user - feel free to change... User=pi Group=pi Nice=5 #Environment="NODE_OPTIONS=--max-old-space-size=128" #Environment="NODE_RED_OPTIONS=-v" #WorkingDirectory=/usr/lib/node_modules/node-red/ #ExecStart=/usr/bin/env node $NODE_OPTIONS red.js $NODE_RED_OPTIONS ExecStartPre=/usr/local/bin/node /home/pi/.node-red/read_settings.js ExecStart=/usr/bin/env node-red-pi # Use SIGINT to stop KillSignal=SIGINT # Auto restart on crash Restart=on-failure # Tag things in the log SyslogIdentifier=Node-RED #StandardOutput=syslog [Install] WantedBy=multi-user.target