Strapi Production Deployment
We will deploy Strapi connected to a managed PostgreSQL database.
1. Create Strapi Project (Local)
bash
npx create-strapi-app@latest my-project
cd my-project
npm run build2. Server Configuration
Assuming you have Node.js 18+ and PM2 installed.
Environment Variables
Create .env file:
env
HOST=0.0.0.0
PORT=1337
APP_KEYS=...
API_TOKEN_SALT=...
ADMIN_JWT_SECRET=...
TRANSFER_TOKEN_SALT=...
DATABASE_CLIENT=postgres
DATABASE_HOST=127.0.0.1
DATABASE_PORT=5432
DATABASE_NAME=strapi
DATABASE_USERNAME=strapi
DATABASE_PASSWORD=securepassword3. PM2 Process
bash
pm2 start npm --name "strapi" -- start4. Nginx Proxy
Proxy port 1337 via Nginx to handle SSL and domain routing.
Page changelog
Last updated
- 2024-03-30—Initial or baseline update for this page.
Related articles
Deployment
Integrations & Plugins — Connect Your Stack
Patterns for integrating monitoring, auth, storage, CI/CD, and webhooks across your services.
Deployment
Deploying Next.js App Router on Cloud VPS
A comprehensive guide to hosting Next.js applications using Node.js, PM2, and Nginx reverse proxy architecture.
Deployment
Deploying Django with Gunicorn & Nginx
Production-ready Python deployment using Gunicorn as the WSGI server and Nginx as the reverse proxy.
Deployment
Self-Hosted GitLab CE Deployment
Take control of your DevOps pipeline by hosting your own GitLab instance on a cloud VPS.
Deployment
Self-Hosting a PaaS with Coolify
An open-source, self-hosted alternative to Heroku/Vercel for deploying your apps easily.
Deployment
S3-Compatible Storage with MinIO
Deploying high-performance private object storage for backups, artifacts, and large datasets.
Was this page helpful?