Back to all templates
Strapi logo

Strapi

Application1024MB+ RAM

Headless CMS powered by Node.js with PostgreSQL

cmsheadlessapinodejs

Deploy Strapi in 3 Steps

1

Connect Your VPS

Add your server credentials to Server Compass

2

Select Strapi

Choose from our template library

3

Deploy & Configure

Fill in settings and click Deploy

No Docker knowledge required
CLI Deployment

Deploy Strapi Yourself

Want full control? Here's how to deploy Strapi yourself using Docker Compose.

1

Connect to Your VPS via SSH

Fire up your terminal application and establish a connection to your remote server.

terminal
# Access your VPS
ssh root@YOUR_SERVER_IP

# With SSH key authentication
ssh -i ~/.ssh/your-private-key root@YOUR_SERVER_IP

First time? Ensure Docker is installed first: curl -fsSL https://get.docker.com | sh

2

Initialize Project Folder

Create a folder to house your Docker Compose configuration.

terminal
# Create and navigate to project directory
mkdir -p ~/apps/strapi
cd ~/apps/strapi
3

Create Docker Configuration

Define your services in a docker-compose.yml file:

docker-compose.yml
services:
  strapi:
    image: node:20-bookworm-slim
    ports:
      - "1337:1337"
    environment:
      - NODE_ENV=development
      - HOST=0.0.0.0
      - PORT=1337
      - DATABASE_CLIENT=postgres
      - DATABASE_HOST=db
      - DATABASE_PORT=5432
      - DATABASE_NAME=strapi
      - DATABASE_USERNAME=strapi
      - DATABASE_PASSWORD=<your-db-password>
      - APP_KEYS=<your-app-keys>
      - API_TOKEN_SALT=<your-api-token-salt>
      - ADMIN_JWT_SECRET=<your-admin-jwt-secret>
      - TRANSFER_TOKEN_SALT=<your-transfer-token-salt>
      - JWT_SECRET=<your-jwt-secret>
      - STRAPI_TELEMETRY_DISABLED=true
    volumes:
      - strapi_app:/opt/app
    working_dir: /opt/app
    command: >
      sh -c "
        if [ ! -f package.json ]; then
          echo 'Initializing new Strapi v4 project...';
          npx --yes create-strapi-app@4 . --no-run --skip-cloud --dbclient=postgres --dbhost=db --dbport=5432 --dbname=strapi --dbusername=strapi --dbpassword=<your-db-password> --dbssl=false || exit 1;
        fi;
        [ -f package.json ] || { echo 'Strapi init failed'; exit 1; };
        if [ $NODE_ENV = development ]; then npm run develop; else npm run build && npm run start; fi
      "
    depends_on:
      db:
        condition: service_healthy
    restart: unless-stopped

  db:
    image: postgres:16-alpine
    environment:
      - POSTGRES_DB=strapi
      - POSTGRES_USER=strapi
      - POSTGRES_PASSWORD=<your-db-password>
    volumes:
      - db_data:/var/lib/postgresql/data
    restart: unless-stopped
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U strapi -d strapi"]
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 30s

volumes:
  strapi_app:
  db_data:
Required Settings
PORTHost port to expose(default: 1337)
NODE_ENVEnvironment mode (development or production)(default: development)
DB_NAMEDatabase name(default: strapi)
DB_USERDatabase user(default: strapi)
DB_PASSWORDDatabase password
APP_KEYSComma-separated Strapi APP_KEYS
4

Execute the Deployment

Start your containers and verify they're running correctly.

terminal
# Launch the stack
docker compose up -d

# Verify container status
docker compose ps

# Follow the logs
docker compose logs --follow
5

Allow Network Access

Update UFW rules to allow traffic on the application port.

terminal
# Allow the application port through firewall
sudo ufw allow 1337/tcp
sudo ufw reload

# Access your app at:
# http://your-server-ip:1337
Skip the Terminal

Don't want to type commands? We've got you.

Skip the terminal and deploy Strapi with a visual interface. Configure everything with clicks, not commands.

  • No terminal required
  • Point-and-click setup
  • Auto SSL certificates
  • Rolling deployments
  • Health monitoring
  • Instant rollbacks
Download Server Compass$29 one-time • Lifetime license

After Deployment

After deploying Strapi with Server Compass, complete these steps to finish setup

1

Complete Strapi setup wizard at /admin

2

Create an admin user and roles

3

In 'development' mode: Use Content-Type Builder to create collections

4

For production: Switch NODE_ENV to 'production' and redeploy to disable schema editing

Need help? Check out our documentation for detailed guides.

Strapi FAQ

Common questions about self-hosting Strapi

How do I deploy Strapi with Server Compass?

Simply download Server Compass, connect to your VPS, and select Strapi from the templates list. Fill in the required configuration and click Deploy. The entire process takes under 3 minutes.

What are the system requirements for Strapi?

Strapi requires a minimum of 1024MB RAM. We recommend a VPS with at least 2048MB RAM for optimal performance. Any modern Linux server with Docker support will work.

Can I migrate my existing Strapi data?

Yes! Server Compass provides volume mapping that allows you to import existing data. You can also use standard Strapi backup and restore procedures.

How do I update Strapi to the latest version?

Server Compass makes updates easy. Simply click the Update button in your deployment dashboard, and the latest Strapi image will be pulled and deployed with zero downtime.

Is Strapi free to self-host?

Strapi is open-source software. You only pay for your VPS hosting (typically $5-20/month) and optionally Server Compass ($29 one-time). No subscription fees or per-seat pricing.

Ready to Self-Host Strapi?

Download Server Compass and deploy Strapi to your VPS in under 3 minutes. No Docker expertise required.

Download Server Compass