How to run flow fuse a service

I followed the guidelines as described in this link:
Running the FlowFuse Device Agent as a service on a Raspberry Pi • FlowFuse

Description=flowfuse Device Agent
Wants=network.target
Documentation=Documentation • FlowFuse

[Service]
Type=simple

Run as normal pi user - change to the user name you wish to run flowfuse Device as

User=root
Group=root
WorkingDirectory=/opt/flowfuse-device

Environment="NODE_OPTIONS=--max_old_space_size=512"
ExecStart=/usr/bin/env flowfuse-device-agent

Use SIGINT to stop

KillSignal=SIGINT

Auto restart on crash

Restart=on-failure
RestartSec=20

Tag things in the log

SyslogIdentifier=flowfuseDevice
#StandardOutput=syslog

[Install]
WantedBy=multi-user.target

1 Like

Create the file service

sudo nano /etc/systemd/system/flowforge-device-agent.service

Paste the content from here.

Save and exit (ctrl + o then enter then ctrl + x)

Enable the service

sudo systemctl enable flowforge-device-agent.service

And finally start the service

sudo systemctl start flowforge-device-agent
1 Like