Change the default database

Describe the issue/error/question

Hello Team,
I am using n8n service into my project. I have installed docker image on ec2 instance of AWS. My requirement is to store n8n data whatever I am creating in my external db i.e mongo Atlas.

Is that even possible? if yes then how?

Thank You.

What is the error message (if any)?

Please share the workflow

(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database you’re using (default: SQLite):
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via [Docker, npm,, desktop app]:

Hi @harshit

Welcome to the community.
Yes this is possible. Don’t think you can use a NoSQL database though. You can use Postgres for example.
doc is here: Docker - n8n Documentation

1 Like

I changed my database this morning from SQLite to Postgres and it was fairly painless, I accessed my container and ran the export command for workflows and credentials in the storage volume folder (/home/node/.n8n/) then I killed the container and set the env options I needed, fired up the container and ran the import commands then restarted the container again for luck and that sorted it all out.

The only thing I did have to do again was make my user for User Management which isn’t the end of the world as I was the only user on my system.

1 Like

The only issue I had when converting to postgres (I used a backup to git and restore from Git to get my workflows transfered)
Was that I didn’t notice the note that the postgres user cannot be the root login for postgres. This had me confused for a bit on how to fix the connection. Rest of it was idd pretty simple to do.

1 Like

thanks for the reply. I wanted to store in NoSQL. Since its not possible will access the data through api then.

1 Like