# FlowForge Agent

**URL:** <https://discourse.nodered.org/t/flowforge-agent/73794>\
**Category:** General\
**Tags:** flowforge\
**Created:** [17 January 2023 05:34 UTC](https://discourse.nodered.org/t/flowforge-agent/73794 "2023-01-17T05:34:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![allacmc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allacmc/32/73549_2.png) [@allacmc](https://discourse.nodered.org/u/allacmc)\
**Post date:** [17 January 2023 05:34 UTC](https://discourse.nodered.org/t/flowforge-agent/73794/1 "2023-01-17T05:34:35Z")

</div>

I'm testing flowforge

Could someone guide me how the flowforge agent works?

I installed the npm package and would like to know if it runs as a service?

If I reboot the device does it connect again?

And how does the issue of global persistent variables work?

Do I have some that are set to local text storage? Does this continue?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [17 January 2023 07:54 UTC](https://discourse.nodered.org/t/flowforge-agent/73794/2 "2023-01-17T07:54:15Z")

</div>

> [@allacmc](#):
>
> installed the npm package and would like to know if it runs as a service?

No. Not by default.

> **[GitHub - FlowFuse/device-agent: An agent to run FlowFuse managed instances of...](https://github.com/FlowFuse/device-agent#running-as-a-service)**
>
> An agent to run FlowFuse managed instances of Node-RED on devices - GitHub - FlowFuse/device-agent: An agent to run FlowFuse managed instances of Node-RED on devices

> [@allacmc](#):
>
> If I reboot the device does it connect again

If it is set to run on start up yes.

> [@allacmc](#):
>
> And how does the issue of global persistent variables work

If you're running the latest version of flowforge and the agent, Your projects will have access to two context stores - memory & persistent.

These context stores are relative to where they are running. For example, when the project is running on a device, it uses the devices, memory, and file system.

---

<div class="post-metadata">

**Author:** ![allacmc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allacmc/32/73549_2.png) [@allacmc](https://discourse.nodered.org/u/allacmc)\
**Post date:** [17 January 2023 19:08 UTC](https://discourse.nodered.org/t/flowforge-agent/73794/3 "2023-01-17T19:08:17Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/b/abe5278ad2d20708d42ac6af84bd15fc90fc768f.png)

I use this file, but was not working

when i call the command manually it works.

Any ideas?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/0/40546a0443ecb8d0f378d3411ee83b4b7ceb5e0d.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/6/16db748272f8d8b910bd3e92f84ceddd5aafbcf7.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [17 January 2023 20:04 UTC](https://discourse.nodered.org/t/flowforge-agent/73794/4 "2023-01-17T20:04:51Z")

</div>

> [@allacmc](#):
>
> I use this file, but was not working

Do you actually have a user named `pi`?

The sample service expects you to use a service account with all the necessary permissions to access the opt/flowforge-device directory & any necessary Comms port permissions that you want the node-red project on the device to use.

---

<div class="post-metadata">

**Author:** ![allacmc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allacmc/32/73549_2.png) [@allacmc](https://discourse.nodered.org/u/allacmc)\
**Post date:** [17 January 2023 20:10 UTC](https://discourse.nodered.org/t/flowforge-agent/73794/5 "2023-01-17T20:10:37Z")

</div>

I change this user.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/7/d7fd9942758f1b44abb111e837e4799dd70a88ec.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [17 January 2023 20:46 UTC](https://discourse.nodered.org/t/flowforge-agent/73794/6 "2023-01-17T20:46:07Z")

</div>

You shouldn't run as root. Also, does your OS have a group named pi?

---

<div class="post-metadata">

**Author:** ![allacmc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/allacmc/32/73549_2.png) [@allacmc](https://discourse.nodered.org/u/allacmc)\
**Post date:** [17 January 2023 21:12 UTC](https://discourse.nodered.org/t/flowforge-agent/73794/7 "2023-01-17T21:12:01Z")

</div>

I confess to you that I'm a little lost.

I have limited knowledge of linux.

Do you have any suggestions to help me?

Only the github walkthrough can't help me.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [8 March 2023 11:03 UTC](https://discourse.nodered.org/t/flowforge-agent/73794/8 "2023-03-08T11:03:47Z")

</div>

Hi @allacmc I'm certain by now you got past this.

If not, please shout up and I will help you get going in no time.

If so, would you mind telling what your difficulties were? It will help us improve our docs.

Thanks.

---

<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:** [7 May 2023 11:04 UTC](https://discourse.nodered.org/t/flowforge-agent/73794/9 "2023-05-07T11:04:23Z")

</div>

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