Strapi cluster on multiple servers

System Information
  • Strapi Version: all
  • Operating System: Centos
  • Database: Postgresql
  • Node Version: 12
  • NPM Version:
  • Yarn Version:


Is someone know how to make a cluster of Strapi API instances on multiple servers ? How is it possible to share the controllers configuration and the public assets between servers ?

Thank you for your help.


What do you mean by sharing controllers and public assets?

You can configure multiple clusters by using Nginx load balancer. Take a look at this example:

Yes I already installed an NGINX but the controllers configuration and public assets are files physicaly written on disk.
If you add a public asset or a new content type on an instance it will not be available for all the other instances.
How to resolve this issue ?

What do you mean by modifying controllers? You should not modify / create content types on a specific instance. You create them on development environment, then you get a single instance which should be used in all clusters.

Related to public assets(images, and etc) you should use a third party provider, like aws, cloudinary.

So you basically should have 3 identical instances hosted on different servers, but connected to same database and to the same files provider.

1 Like

During deployment process I would recommend to use docker image and deploy that image on all servers simultaneously.

Hi @sunnyson,
Let say we have 5 identical production instances hosted on different server with load balancer to handle web/app with 30Mil MAU. We also have dev instance and we provide feature so that client can modify content-type medata (add new fields, edit fields, add new content-type…). Let say, we build publish function to publish their change from dev instance to production instance.

That mean we have to transfer all new/modified content-type medata from dev instance to 5 identical production instances above, and we also restart 5 identical production instances when complete. Is that the good way or is there better solution we can complete it?

Andy T