# \[SOLVED\] Help needed migrating node-red to docker

**URL:** <https://discourse.nodered.org/t/solved-help-needed-migrating-node-red-to-docker/68703>\
**Category:** General\
**Tags:** docker\
**Created:** [8 October 2022 05:22 UTC](https://discourse.nodered.org/t/solved-help-needed-migrating-node-red-to-docker/68703 "2022-10-08T05:22:34Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Topolynx](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/topolynx/32/32597_2.png) [@Topolynx](https://discourse.nodered.org/u/Topolynx)\
**Post date:** [8 October 2022 05:22 UTC](https://discourse.nodered.org/t/solved-help-needed-migrating-node-red-to-docker/68703/1 "2022-10-08T05:22:34Z")

</div>

Hello. I would like to migrate my node-red to a docker container. I have installed some nodes using npm and I would like to move them too into the container. Could someone please help me?

---

<div class="post-metadata">

**Author:** ![tve](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tve/32/59475_2.png) [@tve](https://discourse.nodered.org/u/tve)\
**Post date:** [8 October 2022 05:26 UTC](https://discourse.nodered.org/t/solved-help-needed-migrating-node-red-to-docker/68703/2 "2022-10-08T05:26:31Z")

</div>

This may help you: [Running under Docker : Node-RED](https://nodered.org/docs/getting-started/docker)  
Also: [Docker - FlexDash](https://flexdash.github.io/docs/quick-start/docker/) - just ignore the flexdash specific stuff...

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [8 October 2022 06:19 UTC](https://discourse.nodered.org/t/solved-help-needed-migrating-node-red-to-docker/68703/3 "2022-10-08T06:19:34Z")

</div>

> I would like to move them too into the container

Note that containers should be considered immutable, if you have variable data, store it in a volume as the links from @tve show.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [8 October 2022 09:05 UTC](https://discourse.nodered.org/t/solved-help-needed-migrating-node-red-to-docker/68703/4 "2022-10-08T09:05:27Z")

</div>

> [@Topolynx](#):
>
> I would like to migrate my node-red to a docker container

Are you sure you want to do that? Only do it if you have a good reason, as it does cause complications.

---

<div class="post-metadata">

**Author:** ![Topolynx](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/topolynx/32/32597_2.png) [@Topolynx](https://discourse.nodered.org/u/Topolynx)\
**Post date:** [8 October 2022 11:34 UTC](https://discourse.nodered.org/t/solved-help-needed-migrating-node-red-to-docker/68703/5 "2022-10-08T11:34:58Z")

</div>

@bakman2 yes I know, I've already created a folder bound to the dockerized node-red.

@Colin Which kind of complications? I don't use node-red for lot of stuff, I made a pair of flows that "translate" tuya messages in MQTT for a better integration of some of my devices in Home Assistant.

I've already moved 99% of my flows on the dockerized node-red but I need find a way to bring back the 2FA. [I shared my work here](https://discourse.nodered.org/t/help-needed-for-2fa-with-authy/62764) but I don't know how install _ **passport-google-oauth20** _. in my external volume.  
I've accessed the node-red bash and launched

```auto
npm install passport-google-oauth20

```

but i don't see new modules added in my /home/me/node-red-docker/ folder. Could you help me please?

---

<div class="post-metadata">

**Author:** ![sophiaabigail](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sophiaabigail/32/57978_2.png) [@sophiaabigail](https://discourse.nodered.org/u/sophiaabigail)\
**Post date:** [8 October 2022 11:37 UTC](https://discourse.nodered.org/t/solved-help-needed-migrating-node-red-to-docker/68703/6 "2022-10-08T11:37:20Z")

</div>

Hello. I would like to _migrate_ my _node_-_red_ to a _docker container_. I have installed some nodes using npm and I would like to _move_ them too into ... I thought I'd try _nodered docker container_ for once as I used (really just used) some other _Docker_ containers recently. Getting the _Node_-_Red_ v1. This _container_ can be extended to add the _required_ prerequisites for your projects. For example to add the _required_ libraries for the _node_ -_red_ -contrib-machine- ... A node is \*\*an instance of the Docker engine participating [192.168.l.254](https://192168l254.com.mx/ES) in the swarm . You can also think of this as a Docker node. You can run one or more nodes on a single physical computer or cloud server, but production swarm deployments typically include Docker nodes distributed across multiple physical and cloud machines.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [8 October 2022 12:29 UTC](https://discourse.nodered.org/t/solved-help-needed-migrating-node-red-to-docker/68703/7 "2022-10-08T12:29:46Z")

</div>

> [@Topolynx](#):
>
> Which kind of complications?

The sort you are having now, apparently.

---

<div class="post-metadata">

**Author:** ![Topolynx](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/topolynx/32/32597_2.png) [@Topolynx](https://discourse.nodered.org/u/Topolynx)\
**Post date:** [8 October 2022 12:48 UTC](https://discourse.nodered.org/t/solved-help-needed-migrating-node-red-to-docker/68703/8 "2022-10-08T12:48:42Z")

</div>

You're absolutely right 🙂

---

<div class="post-metadata">

**Author:** ![Topolynx](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/topolynx/32/32597_2.png) [@Topolynx](https://discourse.nodered.org/u/Topolynx)\
**Post date:** [8 October 2022 16:00 UTC](https://discourse.nodered.org/t/solved-help-needed-migrating-node-red-to-docker/68703/9 "2022-10-08T16:00:51Z")

</div>

Solved! It was a stupid, stupid detail. I've added in package.js the line `"passport-google-oauth20": "~2.0.0"` , now I'm able again to log in withmy google ccredentials 🙂  
Thanks to you all!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [22 October 2022 16:01 UTC](https://discourse.nodered.org/t/solved-help-needed-migrating-node-red-to-docker/68703/10 "2022-10-22T16:01:19Z")

</div>

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