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. 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.
Check out my other Article on the essential steps after installing Directus: