Deployment
Page summary:
Deployment options cover hardware/software prerequisites, environment variable setup, and building the admin panel before launch. In the documentation: links to provider‑specific and advanced guides to help pick the right hosting strategy.
Strapi provides many deployment options for your project or application. Your Strapi applications can be deployed on traditional hosting servers or your preferred hosting provider.
The following documentation covers the basics of how to prepare Strapi for deployment on with several common hosting options.
You can use Strapi Cloud to quickly deploy and host your project.
If you already created a content structure with the Content-Type Builder and added some data through the Content Manager to your local (development) Strapi instance, you can leverage the data management system to transfer data from a Strapi instance to another one.
Another possible workflow is to first create the content structure locally, push your project to a git-based repository, deploy the changes to production, and only then add content to the production instance.
For self-hosted Kubernetes deployments, we recommend using npm rather than pnpm. pnpm aggressive hoisting of dependencies can break native modules, such as mysql2— that your application may rely on. npm flatter, more predictable node_modules layout helps ensure native packages load correctly.
General guidelines
Hardware and software requirements
To provide the best possible environment for Strapi the following requirements apply to development (local) and staging and production workflows.
Before installing Strapi, the following requirements must be installed on your computer:
- Node.js: Only Active LTS or Maintenance LTS versions are supported (currently
v20,v22, andv24). Odd-number releases of Node, known as "current" versions of Node.js, are not supported (e.g. v23, v25). - Your preferred Node.js package manager:
- Python (if using a SQLite database)
-
Standard build tools for your OS (the
build-essentialspackage on most Debian-based systems) -
Hardware specifications for your server (CPU, RAM, storage):
Hardware Recommended Minimum CPU 2+ cores 1 core Memory 4GB+ 2GB Disk 32GB+ 8GB -
A supported database version:
| Database | Recommended | Minimum |
|---|---|---|
| MySQL | 8.0 | 8.0 |
| MariaDB | 10.6 | 10.5 |
| PostgreSQL | 14.0 | 12.0 |
| SQLite | 3 | 3 |
Deploying databases along with Strapi is covered in the databases guide.
-
A supported operating system:
Operating System Recommended Minimum Ubuntu (LTS) 24.04 20.04 Debian 11.x 10.x RHEL 10.x 8.x macOS 26.0 11.x Windows Desktop 11 10 Windows Server Not Supported Not Supported
Application Configuration
1. Configure
We recommend using environment variables to configure your application based on the environment, for example:
module.exports = ({ env }) => ({
host: env('HOST', '0.0.0.0'),
port: env.int('PORT', 1337),
});
Strapi generates a .env file with default values when you create a new project. You can edit this file or set variables in your chosen deployment platform (see example .env file):
HOST=10.0.0.1
PORT=1338
To learn more about configuration details, see the configurations documentation.
2. Launch the server
Before running your server in production you need to build your admin panel for production:
- yarn
- npm
- windows
NODE_ENV=production yarn build
NODE_ENV=production npm run build
npm install cross-env
Then in your package.json scripts section:
"build:win": "cross-env NODE_ENV=production npm run build",
And run:
npm run build:win
Run the server with the production settings:
- yarn
- npm
- windows
NODE_ENV=production yarn start
NODE_ENV=production npm run start
npm install cross-env
Then in your package.json scripts section:
"start:win": "cross-env NODE_ENV=production npm start",
And run:
npm run start:win
We highly recommend using pm2 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/strapi');
strapi.createStrapi(/* {...} */).start();
If you are developing a TypeScript-based project you must provide the distDir option to start the server.
For more information, consult the TypeScript documentation.
Strapi exposes a lightweight health check route at /_health for uptime monitors and load balancers. When the server is ready, it responds with an HTTP 204 No Content status and a strapi: You are so French! header value, which you can use to confirm the application is reachable. Hosting providers like Render can use this endpoint for automated health checks.
Advanced configurations
If you want to host the administration on another server than the API, please take a look at this dedicated section.
Additional resources
- Your Strapi project is created and its code is hosted on GitHub.
- You have read the general deployment guidelines.
The integrations page of the Strapi website include information on how to integrate Strapi with many resources, including how to deploy Strapi on the following 3rd-party platforms:
Deploy Strapi on AWS
Deploy Strapi on Azure
Deploy Strapi on DigitalOcean App Platform
Deploy Strapi on Heroku
Deploy Strapi on Render
One-click deploy to Render
Render offers a streamlined deployment experience for Strapi using Infrastructure-as-Code Blueprints. Click the button below to deploy a Strapi instance with a PostgreSQL database:
This Blueprint provisions:
- A Node.js web service running Strapi (Starter plan)
- A PostgreSQL database (Free plan)
- Auto-generated secrets (
APP_KEYS,JWT_SECRET,API_TOKEN_SALT, etc.)
For manual Render deployment, create a render.yaml file in your repository root:
services:
- type: web
name: strapi
runtime: node
plan: starter
buildCommand: yarn install && yarn build
startCommand: yarn start
healthCheckPath: /_health
envVars:
- key: NODE_ENV
value: production
- key: HOST
value: 0.0.0.0
- key: DATABASE_CLIENT
value: postgres
- key: DATABASE_URL
fromDatabase:
name: strapi-db
property: connectionString
- key: APP_KEYS
generateValue: true
- key: API_TOKEN_SALT
generateValue: true
- key: ADMIN_JWT_SECRET
generateValue: true
- key: TRANSFER_TOKEN_SALT
generateValue: true
- key: JWT_SECRET
generateValue: true
databases:
- name: strapi-db
databaseName: strapi
plan: free
In addition, community-maintained guides for additional providers are available in the Strapi Forum. This includes the following guides:
Proxying with Caddy
Proxying with HAProxy
Proxying with NGinx
Using the PM2 process manager
The following external guide(s), not officially maintained by Strapi, might also help deploy Strapi on various environments:
[Microsoft Community] Deploying on Azure
If you're looking for multi-tenancy options, the Strapi Blog has a comprehensive guide.