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
Step-by-step deployment guide

Deploy Strapi on a VPS with Server Compass

Use the Strapi template in Server Compass to deploy a self-hosted Node.js headless CMS with PostgreSQL on your VPS, then verify the Strapi admin setup screen in a browser.

About 10 minutesBrowser verified
1
Step 1

Open the server Apps tab

Select the tutorial-vps VPS, open the Apps tab, and start a new app deployment. Keep sensitive server details hidden before capturing or sharing screenshots.

Server Compass Apps tab before creating a Strapi app
2
Step 2

Choose an app template

Click New App and choose the template deployment path so Server Compass can load the built-in catalog.

Choosing to deploy an app from a Server Compass template
3
Step 3

Search for Strapi

Use the template picker search to find Strapi in the Server Compass template catalog.

Searching for Strapi in the Server Compass template picker
4
Step 4

Select the Strapi template

Choose the Strapi template. Server Compass fills the Node.js service, PostgreSQL service, persistent app and database volumes, and required Strapi secret values.

Strapi template selected in Server Compass
5
Step 5

Review the Strapi settings

Confirm the app name and compose services. In this run, the app was named strapi-demo and used host port 1337.

Reviewing Strapi project settings and compose services
6
Step 6

Deploy Strapi

Review the generated environment values, keep the database password and Strapi secrets masked, confirm the port is available, and click Deploy Now.

Reviewing Strapi environment variables and port before deployment
7
Step 7

Watch the deployment progress

Keep the deployment modal open while Server Compass uploads the compose file, pulls the Node.js and PostgreSQL images, initializes the Strapi project on first boot, starts the containers, and verifies the stack.

Server Compass deploying the Strapi template on the VPS
8
Step 8

Confirm Strapi is running

After deployment finishes, return to the Apps tab and confirm the Strapi app is marked Running with its application URL available.

Strapi template running in the Server Compass Apps tab
9
Step 9

Open Strapi in the browser

Click Open Application or open the application URL in a browser. The Strapi admin setup screen confirms the deployed app is reachable and ready for the first administrator account.

The deployed Strapi admin setup screen loaded in a browser

After Strapi Opens

  • Create the first Strapi administrator account at /admin and store the credentials in a secure password manager.
  • Keep APP_KEYS, API_TOKEN_SALT, ADMIN_JWT_SECRET, TRANSFER_TOKEN_SALT, JWT_SECRET, and the database password masked in screenshots and docs.
  • Add a domain and HTTPS before inviting users or exposing APIs publicly.
  • Create roles and permissions before publishing content types or API endpoints.
  • Use production mode for public-facing instances after schema setup, because Strapi disables the Content-Type Builder in production.
  • Back up both the Strapi app volume and the PostgreSQL data volume before storing production content.

Verified Result

The Strapi app loaded successfully in a browser and displayed the admin setup screen.

Strapi deployment questions

What does the Strapi template deploy?

It deploys Strapi v4 on Node.js 20 with a PostgreSQL 16 database, persistent app and database volumes, and generated secret values.

Which port did the tutorial use?

The tutorial used host port 1337, which maps to the Strapi web UI on container port 1337.

Why does the browser verification stop at the admin setup screen?

A fresh Strapi deployment is considered reachable when the admin setup screen loads. Creating the administrator account is intentionally left to the user because it creates real credentials.

Should this become a blog post?

No. The deployment guide should live on the Strapi template detail page and be linked from the reusable template deployment docs page.

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