Directus Installation and Setup

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

Directus Installation and Setup

Directus is installed as a Node.js application or via Docker. Connects to PostgreSQL, MySQL/MariaDB, SQLite, MS SQL Server, or Oracle.

Requirements

  • Node.js 18.x or 20.x
  • PostgreSQL 10+ / MySQL 8+ / SQLite 3

Installation via npx

npx create-directus-project@latest my-directus

# Questions:
# Database: PostgreSQL
# Host: localhost
# Port: 5432
# Database name: directus
# Username: directus
# Password: ...
# Admin email: [email protected]
# Admin password: ...

cd my-directus
npx directus start

Docker (recommended for production)

# docker-compose.yml
version: '3'
services:
  directus:
    image: directus/directus:10.latest
    restart: unless-stopped
    ports:
      - "8055:8055"
    volumes:
      - ./uploads:/directus/uploads
      - ./extensions:/directus/extensions
    environment:
      SECRET: ${SECRET}
      DB_CLIENT: pg
      DB_HOST: postgres
      DB_PORT: 5432
      DB_DATABASE: ${DB_NAME}
      DB_USER: ${DB_USER}
      DB_PASSWORD: ${DB_PASSWORD}
      ADMIN_EMAIL: ${ADMIN_EMAIL}
      ADMIN_PASSWORD: ${ADMIN_PASSWORD}
      PUBLIC_URL: https://cms.example.com
      CORS_ENABLED: true
      CORS_ORIGIN: https://example.com
      CACHE_ENABLED: true
      CACHE_STORE: redis
      REDIS_HOST: redis
      REDIS_PORT: 6379
      STORAGE_LOCATIONS: local
      STORAGE_LOCAL_DRIVER: local
      STORAGE_LOCAL_ROOT: /directus/uploads
    depends_on:
      postgres:
        condition: service_healthy

  postgres:
    image: postgres:15-alpine
    restart: unless-stopped
    environment:
      POSTGRES_DB: ${DB_NAME}
      POSTGRES_USER: ${DB_USER}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
    volumes:
      - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ${DB_USER}"]
      interval: 10s

  redis:
    image: redis:alpine
    restart: unless-stopped

volumes:
  postgres_data:

S3 Storage

STORAGE_LOCATIONS=s3
STORAGE_S3_DRIVER=s3
STORAGE_S3_KEY=ACCESS_KEY
STORAGE_S3_SECRET=SECRET_KEY
STORAGE_S3_BUCKET=my-bucket
STORAGE_S3_REGION=eu-west-1
STORAGE_S3_ENDPOINT=https://s3.amazonaws.com
# For Cloudflare R2:
# STORAGE_S3_ENDPOINT=https://<account-id>.r2.cloudflarestorage.com
# STORAGE_S3_REGION=auto

Email

EMAIL_TRANSPORT=smtp
EMAIL_SMTP_HOST=smtp.mailgun.org
EMAIL_SMTP_PORT=587
[email protected]
EMAIL_SMTP_PASSWORD=smtp-password
[email protected]

Static Token for Server Requests

In Admin → Users → Admin → create Static Token. Add to .env of frontend:

DIRECTUS_URL=http://localhost:8055
DIRECTUS_STATIC_TOKEN=your-static-token

Timeline

Installing Directus with Docker, PostgreSQL, S3, and basic configuration — 2–4 hours.