Back to all templates
Directus logo

Directus

Application512MB+ RAM

Open-source headless CMS and data platform with REST/GraphQL APIs

cmsheadlessapigraphql

Deploy Directus in 3 Steps

1

Connect Your VPS

Add your server credentials to Server Compass

2

Select Directus

Choose from our template library

3

Deploy & Configure

Fill in settings and click Deploy

No Docker knowledge required
CLI Deployment

Deploy Directus Yourself

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

1

Access Your VPS Terminal

Use your terminal to securely access your server. You'll need your server's IP address.

terminal
# Connect via SSH
ssh root@your-vps-ip

# Alternative with key file
ssh -i /path/to/key root@your-vps-ip

First time? Make sure Docker is installed on your VPS. Run: curl -fsSL https://get.docker.com | sh

2

Set Up the Deployment Folder

Initialize a project folder on your server.

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

Set Up the Stack Definition

Use this Docker Compose configuration for your deployment:

docker-compose.yml
services:
  directus:
    image: directus/directus:11
    ports:
      - "8055:8055"
    environment:
      - SECRET=<your-secret>
      - [email protected]
      - ADMIN_PASSWORD=<your-admin-password>
      - DB_CLIENT=pg
      - DB_HOST=postgres
      - DB_PORT=5432
      - DB_DATABASE=directus
      - DB_USER=directus
      - DB_PASSWORD=<your-db-password>
      - WEBSOCKETS_ENABLED=true
    volumes:
      - directus_uploads:/directus/uploads
      - directus_extensions:/directus/extensions
    restart: unless-stopped
    depends_on:
      postgres:
        condition: service_healthy

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

volumes:
  directus_uploads:
  directus_extensions:
  postgres_data:
Required Settings
PORTHost port to expose(default: 8055)
SECRETSecret key for encryption
DB_PASSWORDDatabase password
ADMIN_EMAILAdmin email(default: [email protected])
ADMIN_PASSWORDAdmin password
4

Start the Containers

Bring up your containers in detached mode.

terminal
# Start all services
docker compose up -d

# List running containers
docker compose ps

# Watch the logs
docker compose logs -f
5

Set Up Firewall Rules

Allow the application port through your server's firewall.

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

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

Let Server Compass do the heavy lifting.

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

  • Beautiful interface
  • One-click deploys
  • Let's Encrypt SSL
  • Zero downtime
  • Container monitoring
  • Easy rollbacks
Download Server Compass$29 one-time • Lifetime license

After Deployment

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

1

Log in with admin credentials

2

Create your data collections

Need help? Check out our documentation for detailed guides.

Directus FAQ

Common questions about self-hosting Directus

How do I deploy Directus with Server Compass?

Simply download Server Compass, connect to your VPS, and select Directus 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 Directus?

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

Can I migrate my existing Directus data?

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

How do I update Directus to the latest version?

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

Is Directus free to self-host?

Directus 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 Directus?

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

Download Server Compass