Moving to a different server


I am currently self hosting on a Pi Zero 2 W, which is giving me problems when I try to update n8n. n8n is the only thing running on it.

I would like to move my installation to a Pi 4 running Ubuntu server.

How can I move the installation, preserving all settings and workflows?

Many thanks!

Hey @britaliano,

You have a couple of options, you can do an export of the credentials and workflows using the CLI tool (CLI commands for n8n | Docs)

Or you can stop the service / container and make a copy of the SQLite file and the config file and copy it to the new install.

When I did my first migration I did the CLI export / import option which worked well.

Hope this helps :+1:

1 Like

BTW. I checked some time ago and my SQL 1.7G what is pretty much in my opinion when I don’t have that many workflows (I think) is the way to slim db down?

@Shirobachi it is likely to be execution data being saved, if you take a look at the env options there are a couple for removing old data

I found DB_SQLITE_VACUUM_ON_STARTUP variable is it enough to set file ~/.n8n/config like that?

I also set before variable WORKFLOWS_DEFAULT_NAME to see if it’s working, and it didn’t.

I use docker with following volumes -v ~/.n8n:/home/node/.n8n

Also, I am not sure if it’s execution because I remove them from time to time, I had 400 cleaned all up and size of db is same

Thanks in advacne!

It will be the vacuum one then, rather than putting it in the file set it as an environment option so in a .env or pass it to your run command.

It would be worth setting the prune option as well and from there it may take 2 starts to get it to cleanup.

1 Like