# Migrate from installed 0.19 to dockerized 1.0.3

**URL:** <https://discourse.nodered.org/t/migrate-from-installed-0-19-to-dockerized-1-0-3/19271>\
**Category:** General\
**Created:** [17 December 2019 19:08 UTC](https://discourse.nodered.org/t/migrate-from-installed-0-19-to-dockerized-1-0-3/19271 "2019-12-17T19:08:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastian](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@sebastian](https://discourse.nodered.org/u/sebastian)\
**Post date:** [17 December 2019 19:08 UTC](https://discourse.nodered.org/t/migrate-from-installed-0-19-to-dockerized-1-0-3/19271/1 "2019-12-17T19:08:03Z")

</div>

Can't seem to identify my problem here.

I ran NodeRed 0.19.2 so far, which I installed 2 yrs or so ago. I do not remember any details of the installation process and actually the node.js thing is also a black box to me.

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.0.3 docker container running is easy.

I can even run my old NodeRed and the new one in parallel using different ports.

I have backed up ~/.node-red to save all my flows, just in case, but kept the folder as it is - mostly (see below). Now i actually just want to simply run:

` docker run -it -p 1880:1880 -v /home/sebastian/.node-red/:/data/ --name mynodered nodered/node-red`

As shown in the documentation, using the -v parameter to tell Docker to map the old Node-Red datapath containing configuration and flows to the docker container and use it.

When i started the docker container first it complained that credentials have been crypted with a host secret and i shall use a secret in the config file to be able to use the settings. Thats why i think the mapping of the folder is correct.

However, after I set a secret in the settings, restarted my old nodered (just to make sure it will re-crypt the stored credentials) and then stopped it and started the docker container again, the flows are not shown in the WebUi.

Also I chown'ed the settings folder to 1000:1000 as I read somewhere.

How can I smoothly transfer my flows to the dockerized NodeRed. It must be possible, but probably I forgot one tiny detail. Any obvious mistakes? I can't find any hints how to migrate to dockerized nodered. Thanks for your help!

---

<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:** [17 December 2019 19:25 UTC](https://discourse.nodered.org/t/migrate-from-installed-0-19-to-dockerized-1-0-3/19271/2 "2019-12-17T19:25:34Z")

</div>

What does the docker log show you ?

`docker logs -f mynodered`

Is there a specific reason why you want to use docker for node-red ?

---

<div class="post-metadata">

**Author:** ![sebastian](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@sebastian](https://discourse.nodered.org/u/sebastian)\
**Post date:** [17 December 2019 19:42 UTC](https://discourse.nodered.org/t/migrate-from-installed-0-19-to-dockerized-1-0-3/19271/3 "2019-12-17T19:42:20Z")

</div>

Thanks for your response!

Actually, docker logs shows exactly the console output i have seen.

But your question has made me review it once more and i saw the following line

```auto
17 Dec 19:31:10 - [info] Flows file : /data/flows.json

```

I noticed that the old flow file is actually

```auto
flows_HOSTNAME.json

```

Maybe the docker container does not really know or care about the hosts hostname and does not use it for the flows file.

I renamed the file and now it loads...

The reason i thought I'd try the docker is to not care about node.js or any other dependencies.

Would you suggest to not use docker?

Now i have all my flows - but I can not deploy them due to the following warning

```auto
Flows stopped due to missing node types.

    xmpp-server
    ui_base
    sqlitedb
    ui_tab
    ui_group
    influxdb
    sqlite
    e-mail in
    e-mail
    xmpp out
    xmpp in
    ui_chart
    http-send-multipart
    ui_gauge
    ui_ui_control
    ui_slider
    ui_button
    ui_text
    influxdb out

```

So altough all the nodes were somehow available and showing up in "manage palette", it seems to be caused by the fact i hadn't copied the node-modules into the new directory that i mapped into the container (i just copied the flows and settinsg).

**I copied the nodes and now only these things fail**

```auto
17 Dec 19:38:16 - [info] Waiting for missing types to be registered:
17 Dec 19:38:16 - [info] - e-mail in (provided by npm module node-red-node-email)
17 Dec 19:38:16 - [info] - e-mail (provided by npm module node-red-node-email)
17 Dec 19:38:16 - [info] To install any of these missing modules, run:
17 Dec 19:38:16 - [info] npm install <module name>
17 Dec 19:38:16 - [info] in the directory:
17 Dec 19:38:16 - [info] /data

```

How do i npm install something in a docker container?

_Update_  
_Actually: i have just found out that email and email-in can be installed via the "manage palette" menu. I do not need to run any npm commands._

_So this leaves only:_

Coming back to the question if it is recommended at all - I thought if a project offers and advertises the docker container it is somehow advised/promoted to use it....

thanks!

---

<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:** [17 December 2019 21:30 UTC](https://discourse.nodered.org/t/migrate-from-installed-0-19-to-dockerized-1-0-3/19271/4 "2019-12-17T21:30:22Z")

</div>

> somehow advised/promoted to use it

Is it ? There are many paths to Rome and docker is one of them.  
Don't get me wrong docker is fantastic, but it can introduce issues as well, especially if you want to use things like tcp/udp/serial or certain nodes that require compiling.

---

<div class="post-metadata">

**Author:** ![sebastian](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@sebastian](https://discourse.nodered.org/u/sebastian)\
**Post date:** [17 December 2019 21:46 UTC](https://discourse.nodered.org/t/migrate-from-installed-0-19-to-dockerized-1-0-3/19271/5 "2019-12-17T21:46:10Z")

</div>

> [@bakman2](#):
>
> but it can introduce issues as well, especially if you want to use things like tcp/udp/serial or certain nodes that require compiling.

Yeah.... I already learnt how to bash/attach into a running docker to create new keys in ~/.ssh to make my flow that calls a script via ssh work again 😉  
Also all "localhost" nodes (mqtt, influxdb, etc.) needed adaption...

So it also adds complexity that is for sure.

I'll just try to keep it running now and see. My NodeRed is business but not life critical. I want it up and running, but i'm happy to tinker with it and learn something new (which i did today, definitely).

I'm not really sure if i can back the claim that projects encourage (i think that was the word i was looking for in my last post) to use docker, but often it is mentioned first before the manual installation process.

Lets see 🙂

---

<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:** [17 December 2019 22:02 UTC](https://discourse.nodered.org/t/migrate-from-installed-0-19-to-dockerized-1-0-3/19271/6 "2019-12-17T22:02:26Z")

</div>

We recommend people run Node-RED in the manner in which they are most comfortable. If you are familiar and happy with docker then great, if not then it's one more thing to have to get to grips with as it does add some more little wrinkles into the mix.
