Starting Node Red with Project Selected

Hello I'm currently deploying node-red using docker, so when I start node red, all dependencies, and projects are already in place. The thing is that I would like for node-red to start with a project selected. Right now, I deploy everything, but have to enter node-red GUI and go to configurations > Projects > Open and select the project so my flow.json file is used, is there a way to pre-configure this?

@lucaslizama when you deploy like this, do you expect users to interact with the Node-RED editor and the projects feature? Or is this meant to be running as a headless system without anyone accessing the editor?

If it is the latter, then you can run in 'normal' mode, pointed at the projects directory to get the flow files from it.

Otherwise, if you really want to deploy it with projects enabled, then you can specify the name of the project you want it to run on the command-line, just as you would the flow file name.

I would like to deploy it with projects enabled, how can I specify the project through the command line? I don't see any command for that.

https://nodered.org/docs/getting-started/local#command-line-usage

Thank you, I really didn't see the [flows.json|projectName] part in the documentation, this actually solves my problem.

Sorry to revive an ancient thread.. But are you using a custom Docker image to do this, or the standard Node Red image?
I'm not sure where I would run the node-red cli unless in a custom image's startup script, but I would love to not build custom if I don't have to

I know this is an old thread. Have a query related to the same.
Currently - we have situation where we want users to be able to work on different branches of projects simultaneosuly.

I am trying to set up each branch as a separate NR instance (each on its own port).
So each project will be on its own branch and will have its own instance.

I have used the git worktree command and created 2 separate branches on my local.

Currently if i run the below command , both instances start with the same project which i last selected on any of the instances.

node-red -p 1881 --userDir C:/ProgramData/Node-red/XYZ project1
node-red -p 1882 --userDir C:/ProgramData/Node-red/XYZ project2

Anyway to start 2 separate instances with each working on its project - so long each is a different branch ?