# Starting Node Red with Project Selected

**URL:** <https://discourse.nodered.org/t/starting-node-red-with-project-selected/18693>\
**Category:** General\
**Created:** [2 December 2019 15:19 UTC](https://discourse.nodered.org/t/starting-node-red-with-project-selected/18693 "2019-12-02T15:19:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucaslizama](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lucaslizama/32/14795_2.png) [@lucaslizama](https://discourse.nodered.org/u/lucaslizama)\
**Post date:** [2 December 2019 15:19 UTC](https://discourse.nodered.org/t/starting-node-red-with-project-selected/18693/1 "2019-12-02T15:19:31Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [2 December 2019 15:23 UTC](https://discourse.nodered.org/t/starting-node-red-with-project-selected/18693/2 "2019-12-02T15:23:22Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![lucaslizama](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lucaslizama/32/14795_2.png) [@lucaslizama](https://discourse.nodered.org/u/lucaslizama)\
**Post date:** [2 December 2019 15:31 UTC](https://discourse.nodered.org/t/starting-node-red-with-project-selected/18693/3 "2019-12-02T15:31:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [2 December 2019 15:34 UTC](https://discourse.nodered.org/t/starting-node-red-with-project-selected/18693/4 "2019-12-02T15:34:08Z")

</div>

[https://nodered.org/docs/getting-started/local#command-line-usage](https://nodered.org/docs/getting-started/local#command-line-usage)

---

<div class="post-metadata">

**Author:** ![lucaslizama](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lucaslizama/32/14795_2.png) [@lucaslizama](https://discourse.nodered.org/u/lucaslizama)\
**Post date:** [2 December 2019 17:00 UTC](https://discourse.nodered.org/t/starting-node-red-with-project-selected/18693/5 "2019-12-02T17:00:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![thompcd](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thompcd/32/75048_2.png) [@thompcd](https://discourse.nodered.org/u/thompcd)\
**Post date:** [21 July 2023 13:08 UTC](https://discourse.nodered.org/t/starting-node-red-with-project-selected/18693/6 "2023-07-21T13:08:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)\
**Post date:** [18 December 2023 10:12 UTC](https://discourse.nodered.org/t/starting-node-red-with-project-selected/18693/7 "2023-12-18T10:12:48Z")

</div>

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 ?
