# Multiple instances using Docker

**URL:** https://discourse.nodered.org/t/multiple-instances-using-docker/12613
**Category:** General
**Created:** [26 June 2019 13:58 UTC](https://discourse.nodered.org/t/multiple-instances-using-docker/12613 "2019-06-26T13:58:41Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Stylo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stylo/32/14221_2.png) [@Stylo](https://discourse.nodered.org/u/Stylo)
#### Post date: [26 June 2019 13:58 UTC](https://discourse.nodered.org/t/multiple-instances-using-docker/12613/1 "2019-06-26T13:58:41Z")

</div>

Is it possible to have multiple instances of Node-Red running on the same machine/server using docker, and if so is it possible to access each simply through different ports?

---

<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: [26 June 2019 20:03 UTC](https://discourse.nodered.org/t/multiple-instances-using-docker/12613/2 "2019-06-26T20:03:15Z")

</div>

Yes it is possible. Just specify the port. Don't have anyway of checking right now but it's definitely possible and nothing out of the ordinary for docker. Search how to use environmental variables and docker - there are plenty of examples.

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [26 June 2019 20:13 UTC](https://discourse.nodered.org/t/multiple-instances-using-docker/12613/3 "2019-06-26T20:13:05Z")

</div>

Yep - but you will need to mount/point to different data volumes to store your flows (as Docker is non-persistent when it comes to storage, and expose a different port in each instance

You will also need to give some thought to Internode communication (Docker to Docker) if it will be a requirement for your NRs to communicate and configure the docker host accordingly

Craig

---

<div class="post-metadata">

### Author: ![michaelblight](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/michaelblight/32/445_2.png) [@michaelblight](https://discourse.nodered.org/u/michaelblight)
#### Post date: [28 June 2019 02:54 UTC](https://discourse.nodered.org/t/multiple-instances-using-docker/12613/4 "2019-06-28T02:54:03Z")

</div>

I do this. One as a Home Assistant add-on which therefore uses the default port 1880, and another as a separate container defined as `-p 1881:1880` - outside the container it's 1881 and inside it's 1880.

---

<div class="post-metadata">

### Author: ![IoTPlay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iotplay/32/40_2.png) [@IoTPlay](https://discourse.nodered.org/u/IoTPlay)
#### Post date: [28 June 2019 05:05 UTC](https://discourse.nodered.org/t/multiple-instances-using-docker/12613/5 "2019-06-28T05:05:00Z")

</div>

Yes, I run 9 instances on one Pi
