As an open-source Headless CMS, Strapi provides many deployment options from traditional hosting servers or your preferred hosting provider.
It was recently announced the Strapi Cloud beta program, a hosted Content Management platform. Strapi announced when will be available and more about what is coming. So if you don't want to deploy Strapi by yourself, join the waitlist to soon access the easiest way to host your Strapi application and get additional benefits!
In the meantime, the Strapi developer documentation includes several step-by-step how-to guides for deploying Strapi on the most popular hosting providers:
Another option is to use Docker to facilitate the deployment to various cloud providers, or Kubernetes managed services such as Amazon EKS, Microsoft AKS, or others.
In this post, we'll take a closer look at what Docker is. Learn how to build custom Docker containers with an existing Strapi project and introduce an open-source community tool called Dockerize, which can assist you in deploying Strapi to various cloud providers using Docker.
If you need to become more familiar with Docker and Docker Compose, check out this article to learn more about it and how it can help ship your applications to your favorite Cloud providers.
Strapi does not build any official container images because you can build many different types of applications for various use cases using Strapi. However, we provide Docker documentation for Strapi as a courtesy to the community.
Dockerize is a CLI tool built by Simen Daehlin, Strapi Community Organization Member.
This tool aims to simplify the life of developers who want to deploy Strapi with Docker. After the user answers some questions, it will generate files for their Strapi project.
It's a simple one-time run tool that will generate a Dockerfile, Dockerfile.prod
(if you choose production or both), and docker-compose
. All ready to go and configured to the user's needs.
This tool makes development and deploying with docker super simple, run the tool, answer questions, and off you go to the races! Under the hood, the tool will consider what database is wanted and currently supporting: MariaDB, MySQL, and PostgreSQL.
It will auto-detect YARN
or NPM
and use the tool according to what is being used by the project. It generates and backs up database.js/ts
for you if this is detected and generates config environment folders with files for you.
Last but not least, it also generates values that have been asked for your .env
file, which docker-compose can use. It also has CLI integration by passing CLI Flags so other CLI tools can work with it.
Currently, I am working on changes to server.js/ts
where we can inject and set up CORS as this seems to be a known issue for users. And detect if the project is a Strapi project; if not, we will start the Strapi CLI to simplify things for a user.
I started work on this as there needed to be more info about Strapi and Docker. In Strapi v3, an official Docker image of Strapi was downloaded more than 10M times. It was "a nice to have" for many people in the Strapi Community, yet not a good fit for many people who needed to customize their images.
Dockerize gives developers the power to customize their images to their applications' needs and requirements. This also enhances security and saves Strapi as a company from maintaining a docker image, as each user can create their own image.
I wrote a blog post on how to dockerize Strapi v4 for development, and after 40k visits, I realized that there was definitely a need for a tool to automate some of the work.
As a result, Deployify was born with the help of other developers. Making a simple tool to deploy Strapi to the cloud. I'm thrilled that this has become people's standard when using templates in Docker for images! 🧑🚀
The Strapi experience has always been about flexibility, customization, and open-source innovation. But we understand that managing infrastructure and scaling your application can sometimes be a daunting task, diverting your focus from what you do best: developing web experiences.
That's why we're excited to introduce Strapi Cloud, so you can leverage the same robust Strapi capabilities you love, but without the hassle of managing servers, worrying about uptime, or scaling infrastructure as your project grows. It will allow you to future-proof your apps with a CMS that meets the content management needs of all your stakeholders, no matter your use case, services or devices.
Strapi remains committed to open-source values, and self-hosting will always be a viable option. We believe in offering choices that align with your project's unique needs. Strapi Cloud is an additional resource for those who want to focus solely on development, leaving the infrastructure to us.
Aw are here to support you every step of the way, no matter which hosting option you choose. You can reach out to us and the community on our Discord if you have any questions!
Simen came from our Community and now working as a Solutions Engineer. Vivid PlayStation Trophy Hunter by night and loves anything with Pokemon.