# Transfering node-red server to linux

**URL:** <https://discourse.nodered.org/t/transfering-node-red-server-to-linux/5824>\
**Category:** General\
**Created:** [15 December 2018 10:10 UTC](https://discourse.nodered.org/t/transfering-node-red-server-to-linux/5824 "2018-12-15T10:10:26Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrolin](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@patrolin](https://discourse.nodered.org/u/patrolin)\
**Post date:** [15 December 2018 10:10 UTC](https://discourse.nodered.org/t/transfering-node-red-server-to-linux/5824/1 "2018-12-15T10:10:26Z")

</div>

hey guys, got node-red on windows running sweet. want to transition it all to my linux box thats setup running rasbian. is there a easy way to transfer my flows and all that?

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [15 December 2018 10:55 UTC](https://discourse.nodered.org/t/transfering-node-red-server-to-linux/5824/2 "2018-12-15T10:55:07Z")

</div>

Have a look at the Projects feature:  
[https://nodered.org/docs/user-guide/projects/](https://nodered.org/docs/user-guide/projects/)

---

<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:** [15 December 2018 12:04 UTC](https://discourse.nodered.org/t/transfering-node-red-server-to-linux/5824/3 "2018-12-15T12:04:52Z")

</div>

I think this should work, if you are not using the projects feature:  
First install node-red using the Pi install/upgrade script from the docs.  
Then copy these files from your windows .node-red to the new .node-red  
The flows file which is probably named flows\_servername.json  
The credentials file flows\_servername\_cred.json  
package.json  
package-lock.json (if present, it depends on which version of npm you have)

Look through settings.js and adjust any entries with paths in them (if you have set any up)

run `npm install` which should install any extra nodes you have installed and are referenced in your package.json. If you were using an old version of npm then this may not install all of them, in which case you will have to manually install them.

Restart node-red and with luck you will be up and running. I am not certain whether copying the credentials file will allow any credentials that you have configured to work or whether you will have to re-enter them on the new system.

[Edit] `npm install` must be run from the .node-red directory of course.

---

<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:** [15 December 2018 13:15 UTC](https://discourse.nodered.org/t/transfering-node-red-server-to-linux/5824/4 "2018-12-15T13:15:40Z")

</div>

> [@Colin](#):
>
> . I am not certain whether copying the credentials file will allow any credentials that you have configured to work or whether you will have to re-enter them on the new system.

As long as you have set `credentialSecret` in your settings file so you know what key was used to encrypt the credentials file, then you can move it around quite happily. If you haven't set credentialSecret then you've been ignoring a big warning we print on startup ...

---

<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:** [15 December 2018 13:29 UTC](https://discourse.nodered.org/t/transfering-node-red-server-to-linux/5824/5 "2018-12-15T13:29:25Z")

</div>

@knolleary am I right in thinking that it is not necessary to copy .config.json across? I am not exactly sure what that does.

---

<div class="post-metadata">

**Author:** ![patrolin](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@patrolin](https://discourse.nodered.org/u/patrolin)\
**Post date:** [15 December 2018 14:38 UTC](https://discourse.nodered.org/t/transfering-node-red-server-to-linux/5824/6 "2018-12-15T14:38:45Z")

</div>

Awesome thank you

---

<div class="post-metadata">

**Author:** ![wb666greene](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wb666greene/32/6534_2.png) [@wb666greene](https://discourse.nodered.org/u/wb666greene)\
**Post date:** [15 December 2018 15:01 UTC](https://discourse.nodered.org/t/transfering-node-red-server-to-linux/5824/7 "2018-12-15T15:01:32Z")

</div>

Being a newbie, I've taken a simpler approach and I don't care about re-entering credentials as they are usually different when I move a flow to a different system -- usually as a starting point for a "spin-off" project.

First I setup the new system to run node-red and install any extra nodes I need, like dashboard etc. Then I open the browser on my main system to the original flow and then open a new tab (or window) to the new system.

On the original system I select the entire flow and from the menu do: Export-\>Clipboard. Then in the tab for the new system, from the menu do: Import-\>Clipboard and Ctrl-c (paste) the copied nodes into the popup and then import into the new system flow and edit as necessary.

Its nice that I can do it all from my best browser even if neither system is running on it without having to setup Samba or copy files to USB sticks or whatever. Also works well for reusing sub-sections as new starting points.

I guess if its a true "clone" the aforementioned methods could be less trouble overall, especially if you have a lot of credentials to setup. My biggest trip-up in moving between Linux and Windows is filename differences (problem with Samba too) / vs. \ in paths and differences in allowed character sets, using : in timestamps embedded in filenames always gets me.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [15 December 2018 18:08 UTC](https://discourse.nodered.org/t/transfering-node-red-server-to-linux/5824/8 "2018-12-15T18:08:21Z")

</div>

> [@wb666greene](#):
>
> My biggest trip-up in moving between Linux and Windows is filename differences (problem with Samba too) / vs. \ in paths and differences in allowed character sets, using : in timestamps embedded in filenames always gets me.

This is a lot less than it used to be. You can nearly always use "/" instead of "" in Windows. You can't use ":" it is true but things like path length issues have mainly gone away if you are using an up-to-date version of Windows 10 (or the server equivalent).

I always use ISO formatting for date/times and simply replace ":" with "-" if I want to use it in a file name. Or remove it altogether as ISO format date/times still make sense and sort correctly without the extra characters.

"/" is better to use in most programming anyway since you virtually always have to escape "" as "\". Avoid the issues altogether by using the appropriate functions in Node.JS.

---

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [16 December 2018 23:08 UTC](https://discourse.nodered.org/t/transfering-node-red-server-to-linux/5824/9 "2018-12-16T23:08:18Z")

</div>

One thing I have not seen in discussions of issues like this is the use of FTP (SFTP). It is available with little or no effort on most platforms and can make life easier, especially if you use a client with a gui. I do most development on a mac, with testing and deployment usually on a raspberry pi. I run Fetch on the mac, so remote directories just look like unix file listings and copying files is just drag and drop. I also use an editor on the mac (BBedit) that has a built-in FTP client, so files on the remote hosts can be edited locally. If you develop on Windows or linux, I would bet a similar arrangement could be put together.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [17 December 2018 00:57 UTC](https://discourse.nodered.org/t/transfering-node-red-server-to-linux/5824/10 "2018-12-17T00:57:00Z")

</div>

> [@drmibell](#):
>
> One thing I have not seen in discussions of issues like this is the use of FTP (SFTP)

There are a great many tools that can help with the transfer and/or sync and that work across platforms. Plenty of tools such as VScode support SCP (secure copy) for example which is available with any implementation of SSH.

SFTP or FTPS are also OK. RSYNC with SSH also good.

---

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [17 December 2018 01:33 UTC](https://discourse.nodered.org/t/transfering-node-red-server-to-linux/5824/11 "2018-12-17T01:33:04Z")

</div>

Exactly. Just keeping it simple.🙂
