Configuration
General
Configuration for the general system, server, first admin user, and telemetry.
Environment Variables
Environment variables are configurable for Directus Business Cloud and Enterprise Cloud projects via our Customer Success team. You can also set environment variables in self-hosted projects.
Environment variables are configurable for Directus Business Cloud and Enterprise Cloud projects via our Customer Success team. You can also set environment variables in self-hosted projects.
Variable | Description | Default Value |
---|---|---|
CONFIG_PATH | Where your config file is located. See Deploying Directus. | .env |
HOST | IP or host the API listens on. | 0.0.0.0 |
PORT | What port to run the API under. | 8055 |
UNIX_SOCKET_PATH | The Unix socket the API listens on, PORT and HOST will be ignored if this is provided. | |
PUBLIC_URL | URL where your API can be reached on the web. used for things like OAuth redirects, forgot-password emails, and publicly-accessible logos. | / |
ROOT_REDIRECT | Redirect the root of the application / to a specific route. Accepts a relative path, absolute URL, or false to disable. | ./admin |
SERVE_APP | Whether or not to serve the Data Studio web application. | true |
GRAPHQL_INTROSPECTION | Whether or not to enable GraphQL Introspection. | true |
GRAPHQL_SCHEMA_CACHE_CAPACITY | How many user GraphQL schemas to store in memory. | 100 |
ROBOTS_TXT | What the /robots.txt endpoint should return. | User-agent: *\nDisallow: / |
TEMP_PATH | Where Directus' temporary files should be managed. | ./node_modules/.directus |
Server
Variable | Description | Default Value |
---|---|---|
SERVER_KEEP_ALIVE_TIMEOUT | Timeout in milliseconds for socket to be destroyed. | server.keepAliveTimeout |
SERVER_HEADERS_TIMEOUT | Timeout in milliseconds to parse HTTP headers. | server.headersTimeout |
SERVER_SHUTDOWN_TIMEOUT | Timeout in milliseconds before the server is forcefully shut down. | 1000 |
Additional Server Variables
All SERVER_*
environment variables are merged with server
instance properties created from http.Server. This allows to configure server behind a proxy, a load balancer, etc. Be careful to not override methods of this instance otherwise you may incur into unexpected behaviors.
First Admin User
The following commands set details for the first admin user created when the project is bootstrapped.
Variable | Description | Default Value |
---|---|---|
ADMIN_EMAIL | The email address of the first user that's automatically created during bootstrapping. | |
ADMIN_PASSWORD | The password of the first user that's automatically created during bootstrapping. | |
ADMIN_TOKEN | The API token of the first user that's automatically created during bootstrapping. |
Telemetry
To more accurately gauge the frequency of installation, version fragmentation, and general size of the user base, Directus collects little and anonymized data about your environment.
Variable | Description | Default Value |
---|---|---|
TELEMETRY | Allow Directus to collect anonymized data about your environment. | true |
TELEMETRY_URL | URL that the usage report is submitted to. | https://telemetry.directus.io/ |
TELEMETRY_AUTHORIZATION | Optional authorization header value. |