Self Hosting

Self-Hosting Requirements

This page outlines the requirements for self-hosting Directus.

We distribute Directus as a Docker image. To self-host Directus, you will need to be in an environment that supports Docker.

Variables

Directus uses environment variables to configure many advanced features. In order to run Directus, your host will need to provide the ability to edit the required variables. You can learn more about the available variables in the configuration section.

Compute

It can be easy to under-provision resources to run a self-hosted instance of Directus. For Directus' container resources, the required minimum system requirements are 1x 0.25 vCPU / 512 MB, although the recommended minimum is 2x 1 vCPU / 2GB.

Database

The Directus Docker Image contains all optional dependencies supported in the API. This means the Docker image can be used with most of the supported databases and storage adapters without having to create a custom image.

Directus supports the Long-Term Support (LTS) versions of PostgreSQL, MySQL, SQLite, MS SQL Server, MariaDB, CockroachDB, and OracleDB.

Storage

To store files, Directus uses the storage adapter pattern. This allows Directus to use any compatible storage provider. You will need to configure the storage adapter via configuration variables or mount a local file system directory as a volume.

Caching & Scaling

Directus uses Redis for caching and scaling. It is not required, but it is recommended to use Redis for caching and is a requirement with horizontally scaling your Directus instance.

Recommendations

While not required, you may also consider implementing a database and asset storage backup system to ensure the safety of your data, a CDN to improve performance, and a load balancer to distribute traffic across your Directus instances. To understand how your application is running, you may also consider implementing a monitoring system.