Create a Project
There are several ways to start a new Directus project. This guide walks through the most common scenarios.
Directus is licensed under a BSL 1.1 for commercial usage. This means you require a license if you are an entity with over $5 million in total finances. Otherwise, you can continue to enjoy Directus in full and commercially without a license.
Request a license.
Directus Cloud
Directus Cloud provides infrastructure from the team who builds Directus. Projects can be created in over 15 global deployment regions and feature autoscaling for improved availability.
Create and login to your Directus Cloud account. The very first time you log in to your Directus Cloud account, you will be prompted to create a team. Each Directus Cloud project exists within the scope of one team.
Everything you need to start building. Provisioned in 90 seconds.Once started, it should take around 90 seconds for the Cloud project to be created. During this time, a link will be sent to the email associated with your Cloud account.
The email will contain your project URL as well as an email and password to login. If you used GitHub to create your account, this will be the email address associated with your GitHub account.
Login to your new project using the URL in your email inbox or on your Directus Cloud Dashboard.
Docker Installation
You will need Docker installed and running on your machine. You can download it here.
Docker is a developer tool that allows software-creators to distribute their work along with all dependencies and required environment settings. This means that applications can run reliably and consistently, making it the perfect way to use Directus both locally and in-production.As soon as there are new releases of Directus, we publish them on Docker Hub.
Quickstart
Run the following command in your terminal:
docker run -p 8055:8055 directus/directus
The initial admin email address and password will be shown in the terminal. Directus should now be available at http://localhost:8055 or http://127.0.0.1:8055.
This quickstart allows you to explore Directus at a glance, but lacks many features including persistence. Once you stop the Docker container from running, any changes you’ve made will be lost.
Docker Compose
This is the recommended way to get started with Directus. Create a new empty directory on your machine called directus
. Within this new directory, create the three empty sub-directories database
, uploads
, and extensions
.
Create a docker-compose.yml
file in the directus
directory:
services:
directus:
image: directus/directus:11.3.2
ports:
- 8055:8055
volumes:
- ./database:/directus/database
- ./uploads:/directus/uploads
- ./extensions:/directus/extensions
environment:
SECRET: "replace-with-random-value"
ADMIN_EMAIL: "admin@example.com"
ADMIN_PASSWORD: "d1r3ctu5"
DB_CLIENT: "sqlite3"
DB_FILENAME: "/directus/database/data.db"
WEBSOCKETS_ENABLED: "true"
- This file defines a single Docker container that will use the specified version of the
directus/directus
image. - The
ports
list maps internal port8055
is made available to our machine using the same port number, meaning we can access it from our computer's browser. - The
volumes
section maps internaldirectus/database
anddirectus/uploads
to our local file system alongside thedocker-compose.yml
meaning data is backed up outside of Docker containers. - The
environment
section contains any configuration environment variables we wish to set.SECRET
is required and should be a long random value.SECRET
is used to sign access tokens.ADMIN_EMAIL
andADMIN_PASSWORD
is the initial admin user credentials on first launch.DB_CLIENT
andDB_FILENAME
are defining the connection to your database.WEBSOCKETS_ENABLED
is not required, but enables Directus Realtime.
Open the Terminal, navigate to your directus
directory, and run the following command:
docker compose up
Directus should now be available at http://localhost:8055 or http://127.0.0.1:8055.
The project that runs from this docker-compose.yml
file is not production-ready but enough to use many features.
Deploy Directus
We also have a number of guides on self-hosting Directus on various cloud providers, like Amazon Web Services, Microsoft Azure, and Google Cloud Platform.
Next Steps
Now you have a project running, learn how to create a data model, and then use the auto-generated APIs created by Connect.