Setup multiple Strapi nodes pointing at the same DB

Hi all, I need to create a redundant Strapi setup, (2 nodes with a common PostgreSQL database). I wasn’t able to find a document that confirms if this solution is supported. When I create the strapi app on the second node (yarn create strapi-app ) I receive the following message:
“It seems that your database is not empty. Strapi automatically creates tables and columns which might corrupt the data already present in your database. Are you sure you want to continue with the database?”
Is it OK to continue or there is another way to create a Strapi app on the second node pointing to an existing database?
Can someone confirm me if it is a supported setup? It would be nice if there was a document with the steps for this kind of setup with more nodes using the same database.

Thanks and regards,

You would deploy the same application to multiple hosts not create a new one.

Yes clustering is supported, though usually the way you would do it is create a local project (on your host machine, not the server). Set up models, ect and then push that code into source control (GitHub, GitLab, Bitbucket, whatever). Then you would deploy that code from source control onto the servers.

To handle the clustering you’ll probably need a proxy service sitting in front of the nodes to handle the routing of traffic, Nginx does this quite well but HAProxy, Caddy, Traefik, ect are all good options.

1 Like