Deployment
TIP
Deploying databases along with Strapi is covered in the Databases Guide.
Manual guides for deployment on various platforms, for One-click and docker please see the guides.
[
21YunBox
Step by step guide for deploying on 21YunBox
[
Amazon AWS
Step by step guide for deploying on AWS EC2
]()
[
Azure
Step by step guide for deploying on Azure
[
DigitalOcean
Manual step by step guide for deploying on DigitalOcean droplets
]()
[
Manual step by step guide for deploying on GCP’s App Engine
[
Heroku
Step by step guide for deploying on Heroku
]()
[
Render
Three different options for deploying on Render
[
Qovery
Step by step guide for deploying on Qovery
]()
Additional guides for optional software additions that compliment or improve the deployment process when using Strapi in a production or production-like environment.
[CAD
Caddy
Overview of proxying Strapi with Caddy
[HAP
Overview of proxying Strapi with HAProxy
]()
[
Nginx
Overview of proxying Strapi with Nginx
To provide the best possible environment for Strapi there are a few requirements, these apply in both a development (local) as well as a staging and production workflow.
- Node LTS (v12 or V14) Note that odd-number releases of Node will never be supported (e.g. v13, v15).
- NPM v6 or whatever ships with the LTS Node versions
- Typical standard build tools for your OS (the package on most Debian-based systems)
- At least 1 CPU core (Highly recommended at least 2)
- Minimum required storage space recommended by your OS or 32 GB of free space
- A supported database version
- MySQL >= 5.6
- MariaDB >= 10.1
- PostgreSQL >= 10
- SQLite >= 3
- MongoDB >= 3.6
- A supported operating system
- Ubuntu >= 18.04 (LTS-Only)
- Debian >= 9.x
- CentOS/RHEL >= 8
- Windows 10
- Docker -
We always recommend you use environment variables to configure your application based on the environment. Here is an example:
Path — ./config/server.js
.
Then you can create a .env
file or directly use the deployment platform you use to set environment variables:
Path — .env
.
APP_HOST=10.0.0.1
NODE_PORT=1338
TIP
To learn more about configuration you can read the documentation here
Before running your server in production you need to build your admin panel for production
npm install cross-env
Then in your package.json
scripts section:
"production": "cross-env NODE_ENV=production npm run build"
Run the server with the production
settings.
NODE_ENV=production npm start
Then in your package.json
scripts section:
WARNING
We highly recommend using to manage your process.
If you need a server.js file to be able to run node server.js
instead of npm run start
then create a ./server.js
file as follows:
const strapi = require('strapi');