content/getting-started/2.create-a-project.md
There are several ways to start a new Directus project. This guide walks through the most common scenarios.
:partial{content="license"}
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.
:cta-cloud
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.
You will need Docker installed and running on your machine. You can download it here.
::callout{icon="material-symbols:info-outline"} What is Docker? 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. ::
Run the following command in your terminal:
docker run -p 8055:8055 directus/directus
Directus should now be available at http://localhost:8055 or http://127.0.0.1:8055, where you'll see an onboarding screen to configure your first Admin account.
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.
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.14.1
ports:
- 8055:8055
volumes:
- ./database:/directus/database
- ./uploads:/directus/uploads
- ./extensions:/directus/extensions
environment:
SECRET: "replace-with-random-value"
DB_CLIENT: "sqlite3"
DB_FILENAME: "/directus/database/data.db"
WEBSOCKETS_ENABLED: "true"
::callout{icon="material-symbols:info-outline"} Breakdown of Docker Compose File
directus/directus image.ports list maps internal port 8055 is made available to our machine using the same port number, meaning we can access it from our computer's browser.volumes section maps internal directus/database and directus/uploads to our local file system alongside the docker-compose.yml meaning data is backed up outside of Docker containers.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.DB_CLIENT and DB_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, where you'll see an onboarding screen to configure your first Admin account.
The project that runs from this docker-compose.yml file is not production-ready but enough to use many features.
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.
::callout{icon="material-symbols:school-outline" color="secondary" to="/tutorials/self-hosting"} See how to deploy Directus on multiple hosting providers. ::
Now you have a project running, learn how to create a data model, and then use the auto-generated APIs created by :product-link{product="connect"}.