Where are my flows stored

I have node-red installed on a Synology ds215J NAS and have followed this Installation Instructions. Everything works as expected and the node-red is launched, nodes are installed and and flows are created.

Now to the question, I search where my flows are located and are expected to find flows_*.json and flows_*_cred.json in the homes folder of node-red installation.

Search

The Modified date is when the installation was done, no changes after that even though I have created and deployed flows

Can anyone assist me to where they may be located?

In the log output you've shared, you can see the path to the flows file - /var/services/homes/admin/.node-red/flows_Storage.json.

But you can also see the line 'Creating new flow file' - which means that files doesn't exist but will be created the next time you hit deploy.

The fact it says 'port in use' suggests that log output is from you running Node-RED manually when its already running the background.

So its possible the auto-started version of Node-RED is using a different data directory - you'd have to check its log to see.

Yes, I have a auto-start script of node-red when the NAS is restarted, where do I find that log you are refering to? But my search result should find somewhere the files if they are created :grimacing:

It will depend on how your script is running Node-RED and how it redirects the output.

Here is the script I use to start up node-red

#!/bin/sh
HOME=/root
source $HOME/.profile
PATH=/opt/bin:/opt/sbin:$PATH
/usr/local/bin/node-red

Now I'am on the track...
When not using the start-up script and only start node-red from SSH client the flows files are created in the homes directory :+1:

Capture3

Anyone that can guide me what's wrong in the script?

SOLVED!

Installed node-red for a different user [Magnus] then admin and used the following script to trigger start-up node-red on boot

#!/bin/bash
export USER=Magnus
export HOME="/var/services/homes/Magnus"
cd $HOME
/usr/local/bin/node-red

Now the flows are store in the homes location under user [Magnus]

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