🎉 Node-RED 4.0 released

Noobs question: upgrading to 4.0 does affect existing config (palette, flows,...)?

If you check the posts above, others have reported isolated incidents with the 'split' node, otherwise it shouldn't.
Your flows, configs, palette etc should transfer to v4 without problems, although it's always advisable to back-up your instance before upgrading (there's lots of posts in the forum about how to do this).

I upgraded but unfortunately the new version does'nt see any of the previous flows, same for config nodes...
Ony palettes seems to be preserved.
I am in troubles...

What files do you have in your .node-red folder?

Start node-red in a command window and post the output here. It should start with welcome to node red. That will tell you which flows file it is trying to load.

roberto@RCORE:~/.node-red $ node-red start
26 Jun 17:05:55 - [info]

Welcome to Node-RED

26 Jun 17:05:55 - [info] Node-RED version: v4.0.0
26 Jun 17:05:55 - [info] Node.js version: v20.14.0
26 Jun 17:05:55 - [info] Linux 6.6.31+rpt-rpi-2712 arm64 LE
26 Jun 17:05:55 - [info] Loading palette nodes
26 Jun 17:05:56 - [info] Settings file : /home/roberto/.node-red/settings.js
26 Jun 17:05:56 - [info] Context store : 'default' [module=memory]
26 Jun 17:05:56 - [info] User directory : /home/roberto/.node-red
26 Jun 17:05:56 - [info] Projects directory: /home/roberto/.node-red/projects
26 Jun 17:05:56 - [warn] No active project : using default flows file
26 Jun 17:05:56 - [info] Flows file : /home/roberto/.node-red/start
26 Jun 17:05:56 - [info] Creating new flow file
26 Jun 17:05:56 - [warn] Encrypted credentials not found
26 Jun 17:05:56 - [error] Unable to listen on http://127.0.0.1:1880/
26 Jun 17:05:56 - [error] Error: port in use

Now I've got a credential error and nodered does'nt show any default flow.
This happened after I tried to restore the credential in settings.js. Currently

 credentialSecret: "",

That tells it to run node red using a flows file called start, as you can see from the log.
The command to use is node-red-start

roberto@RCORE:~/.node-red $ node-red-start

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.1.37:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use node-red-stop to stop Node-RED
Use node-red-start to start Node-RED again
Use node-red-log to view the recent log output
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as a systemd service.

Is that all?

What did you previously use to run node-red?

Try node-red-stop then node-red-start. If still no joy try just node-red

previously I used
sudo systemctl enable nodered.service
and
sudo systemctl restart nodered.service

Starting as a systemd service.
26 Jun 17:22:25 - [info]
Welcome to Node-RED

26 Jun 17:22:25 - [info] Node-RED version: v4.0.0
26 Jun 17:22:25 - [info] Node.js version: v20.14.0
26 Jun 17:22:25 - [info] Linux 6.6.31+rpt-rpi-2712 arm64 LE
26 Jun 17:22:25 - [info] Loading palette nodes
26 Jun 17:22:26 - [info] Settings file : /home/roberto/.node-red/settings.js
26 Jun 17:22:26 - [info] Context store : 'default' [module=memory]
26 Jun 17:22:26 - [info] User directory : /home/roberto/.node-red
26 Jun 17:22:26 - [info] Projects directory: /home/roberto/.node-red/projects
26 Jun 17:22:26 - [warn] No active project : using default flows file
26 Jun 17:22:26 - [info] Flows file : /home/roberto/.node-red/flows.json
26 Jun 17:22:26 - [info] Server now running at http://127.0.0.1:1880/
26 Jun 17:22:26 - [warn] Error loading credentials: SyntaxError: Unexpected token 'S', "S�P�)/��"... is not valid JSON
26 Jun 17:22:26 - [warn] Error loading flows: Error: Failed to decrypt credentials
^Croberto@RCORE:~/.node-red $

no changes

What do you mean 'no changes'?

Please answer all the questions and suggestions and describe what happens in each case.

Your credentials file is corrupt. Rename the file flows_cred.json to something else and try again.

I renamed flows_cred.json and .flows_cred.json.
stopped nodered (node-red stop) and restarted (node-red restart).

roberto@RCORE:~/.node-red $ node-red stop
26 Jun 21:57:21 - [info]

Welcome to Node-RED
===================

26 Jun 21:57:21 - [info] Node-RED version: v4.0.0
26 Jun 21:57:21 - [info] Node.js  version: v20.14.0
26 Jun 21:57:21 - [info] Linux 6.6.31+rpt-rpi-2712 arm64 LE
26 Jun 21:57:21 - [info] Loading palette nodes
26 Jun 21:57:22 - [info] Settings file  : /home/roberto/.node-red/settings.js
26 Jun 21:57:22 - [info] Context store  : 'default' [module=memory]
26 Jun 21:57:22 - [info] User directory : /home/roberto/.node-red
26 Jun 21:57:22 - [info] Projects directory: /home/roberto/.node-red/projects
26 Jun 21:57:22 - [warn] No active project : using default flows file
26 Jun 21:57:22 - [info] Flows file     : /home/roberto/.node-red/stop
26 Jun 21:57:22 - [info] Creating new flow file
26 Jun 21:57:22 - [warn]

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

26 Jun 21:57:22 - [warn] Encrypted credentials not found
26 Jun 21:57:22 - [error] Unable to listen on http://127.0.0.1:1880/
26 Jun 21:57:22 - [error] Error: port in use
roberto@RCORE:~/.node-red $ node-red start
26 Jun 21:57:27 - [info]

Welcome to Node-RED
===================

26 Jun 21:57:27 - [info] Node-RED version: v4.0.0
26 Jun 21:57:27 - [info] Node.js  version: v20.14.0
26 Jun 21:57:27 - [info] Linux 6.6.31+rpt-rpi-2712 arm64 LE
26 Jun 21:57:27 - [info] Loading palette nodes
26 Jun 21:57:28 - [info] Settings file  : /home/roberto/.node-red/settings.js
26 Jun 21:57:28 - [info] Context store  : 'default' [module=memory]
26 Jun 21:57:28 - [info] User directory : /home/roberto/.node-red
26 Jun 21:57:28 - [info] Projects directory: /home/roberto/.node-red/projects
26 Jun 21:57:28 - [warn] No active project : using default flows file
26 Jun 21:57:28 - [info] Flows file     : /home/roberto/.node-red/start
26 Jun 21:57:28 - [info] Creating new flow file
26 Jun 21:57:28 - [warn]

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

26 Jun 21:57:28 - [warn] Encrypted credentials not found
26 Jun 21:57:28 - [error] Unable to listen on http://127.0.0.1:1880/
26 Jun 21:57:28 - [error] Error: port in use
roberto@RCORE:~/.node-red $

in the settings.js I commented the credenzialSecret setting

I get the following at start time:

no flows detected in the nodered folder

[error] Error: port in use

Start by stopping this instance and then try again

This command does not tell Node-red to shutdown. In fact it tells Node-red to start up using a flows file called "stop"

The names for various Node-red scripts node-red-stop, node-red-start, node-red, node-red-pi (and possibly others) inevitably lead to confusion and mistakes.

The assumption that any parameter not otherwise understood is name of the flows file to use is a disastrous choice. IMHO.

Therefore I recommend you always use sudo systemctl stop nodered and sudo systemctl restart nodered (note no hyphen in the systemd service name)

roberto@RCORE:~ $ sudo lsof -i :1880
COMMAND   PID    USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
node-red 2681 roberto   19u  IPv4  14295      0t0  TCP *:1880 (LISTEN)
node-red 2681 roberto   25u  IPv4  22001      0t0  TCP 192.168.1.37:1880->192.168.1.157:39481 (ESTABLISHED)

it is nodered itself to use this port.
Killed the process
restarted (node-red start).

Now I get the default flows1
I have to inport and (unfortunately) old backup

What flow file do you expect the command node-red start to use?
A clue: it's not flows.json.

It has been stated multiple times that the commands are
node-red-start to start node red, not node-red start
and
node-red-stop to stop it.
Computers do what you tell them to do, not what you meant them to do. It is necessary to use the correct commands.

node-red-reload will stop and restart it.