Skip to content
On this page

Directus +

Installation


Here's the instructions for working with the Directus+ starter kits locally.

1 - Download or Clone the Directus+ locally ​

Click Code > Download Zip. Save and extract the zip file.

OR

git clone https://github.com/directusplus/directus-plus.git into the directory where you'd like to store the templates.

Make sure you are logged in to Git within your terminal if using git clone.

2a - Register for a Directus Cloud account ​

https://directus.cloud/register

OR

2b - Self Host a Directus Instance ​

If you're prefer to self-host Directus, we highly recommend you do so with Docker. We have several guides on the Directus docs.

PostgreSQL is the tested and preferred database vendor for templates.

3 - Generate a static token for the admin user ​

You need the static token to seed the project.

  1. Go to the User Directory
  2. Choose the Administrative User
  3. Scroll down to the Token field
  4. Generate token and copy it
  5. Save the user (do NOT forget to save because you’ll get an error that shows Invalid token!)

4 - Apply the Template(s) ​

Open your terminal, run the following command

npx directus-template-cli@latest apply

# Then follow the prompts

# What type of template would you like to apply? (Use arrow keys)
From a local directory

# What is the local template directory?:
# Enter the directory to the template you wish to apply.
downloads/directus-plus/templates/lms

# You selected LMS
# ------------------
# What is your Directus URL?:
# Enter the URL for your Directus instance – ensure it's up and running before.
http://localhost:8055

# What is your Directus Admin Token?:
# Enter the static token you generated earlier.
your-static-token-goes-here
npx directus-template-cli@latest apply

# Then follow the prompts

# What type of template would you like to apply? (Use arrow keys)
From a local directory

# What is the local template directory?:
# Enter the directory to the template you wish to apply.
downloads/directus-plus/templates/lms

# You selected LMS
# ------------------
# What is your Directus URL?:
# Enter the URL for your Directus instance – ensure it's up and running before.
http://localhost:8055

# What is your Directus Admin Token?:
# Enter the static token you generated earlier.
your-static-token-goes-here

You can learn more about the Directus Template CLI tool here.

Note: It can take a few minutes for the template script to run if you’re using a remotely hosted Directus instance.