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

Deploy Directus on a VPS with Server Compass

Use the Directus template in Server Compass to deploy a self-hosted headless CMS and data platform on your VPS, then verify the Directus login screen in a browser.

About 7 minutesBrowser verified
1
Step 1

Open the server Apps tab

Select your 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 Directus 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 Directus

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

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

Select the Directus template

Choose the Directus template. Server Compass fills the Directus image, PostgreSQL service, persistent upload and extension volumes, admin fields, and required secret values.

Directus template selected in Server Compass
5
Step 5

Review the Directus settings

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

Reviewing Directus project settings and compose services
6
Step 6

Deploy Directus

Review the generated environment values, keep the admin password and Directus secret masked, confirm the port is available, and click Deploy Now.

Reviewing Directus 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 Directus and PostgreSQL images, starts the containers, and verifies the stack.

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

Confirm Directus is running

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

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

Open Directus in the browser

Click Open Application or open the application URL in a browser. The Directus login screen confirms the deployed app is reachable and ready for the generated admin credentials.

The deployed Directus login screen loaded in a browser

After Directus Opens

  • Log in with the generated admin email and password from Server Compass, then immediately store the credentials in a secure password manager.
  • Keep the Directus SECRET, database password, and admin password masked in screenshots and docs.
  • Add a domain and HTTPS before inviting users or exposing APIs publicly.
  • Create roles and permissions before publishing collections or API endpoints.
  • Back up both the Directus uploads/extensions volumes and the PostgreSQL data volume before storing production content.

Verified Result

The Directus app loaded successfully in a browser and displayed the login screen.

Directus deployment questions

What does the Directus template deploy?

It deploys Directus 11 with a PostgreSQL 16 database, persistent uploads, persistent extensions, generated secret values, and an initial admin account.

Which port did the tutorial use?

The tutorial used host port 8055, which maps to the Directus web UI on container port 8055.

Why does the browser verification stop at the login screen?

A fresh Directus deployment is considered reachable when the login screen loads. Logging in would expose generated credentials in the capture flow, so the public guide verifies the safe pre-login screen.

Should this become a blog post?

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

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