2 min read

Where is the Directus Configuration File?

The configuration file holds all the environment variables for the Directus software. It's located with your project folder and is call .env.

The configuration file holds all the environment variables for the Directus software. It's located with your project folder and is call .env. Here are some common locations:

# Web Directory
/var/www

# User Directory
/~

# Nginx Web
/usr/share/nginx

You can edit the file using vim

vim /path/tp/project/.env

For those new to vim, use the arrow keys to move the cursor. Press i to start Insert mode so you can start type. Press ESC to exit Insert mode. Type :wq (with colon) to  save and close the file or :q! to exit without saving changes.

Any changes you make to the configuration file will require you to restart Directus through your package manager or system service.

Some parameters of interest in this file are:

  • PORT
  • DATABASE settings
  • SMTP settings
  • SSO settings

You can find the reference of all parameters in the Directus Documenation.

Configuration Options | Directus Docs
Directus 9. An Instant App & API for your SQL Database.

Check out my other Article on the essential steps after installing Directus:

4 Essential Steps after Installing Directus
So you’ve just installed Directus and wondering what’s next? I’ve gathered the 4 essential steps to get started right away.

By continuing to use our website, you consent to use essential cookies. We also use optional tracking cookies which help us gather statistics to improve our services. Do you consent to these cookies?

I Consent Do not track