Migrate n8n from sqlite to postgres

Hi,

Pls suggest a better way to migrate from sqlite to postgres. We want to run using postgres in multi user environment. Currently with sqlite, its running in single user mode.

Basically, we want to move to share database between all users and in postgres mode.

@jan @Jon @harshil1712 @RicardoE105

Hey @dsuresh,

This question has already been answered on the forum. You can find more information on it here: How to migrate from SQLite to PostgreSQL?

Also, do you plan to use the same DB for multiple instances? If yes, you might run into issues. You will have to make changes to the source code to allow it to be compatible with your use case.

Also, the forum is active, and one generally receives a response within hours. We would appreciate it if you don’t tag us on every post. It only adds to our notifications and doesn’t really help :slight_smile:

1 Like

Sorry about that, I will try not to tag.

We are going to have one instance but shared by all. That’s possible, correct?

If you are having multiple instances of n8n point to the same shared database you will likely have a bad time.

For now what I would do is work on an export / import process for credentials and workflows that way you can run stand alone instances and maybe use git to manage versions.

To migrate the database this thread here: How to migrate from SQLite to PostgreSQL? - #5 by MutedJam has some great information on the process.

If you have a single instance with a single DB, it would be fine. However, if you have multiple users working on the same workflow at the same time, you will face issues. Since the editor is not updated in real-time, changes made to a workflow by person A will only be reflected when person B refreshers. You will have to make sure that the workflows are not updated by multi-users at the same time.

Definitely development is usually done by one developer at a time. Thanks.

1 Like