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.
VariableDescriptionDefault Value
CONFIG_PATHWhere your config file is located. See Deploying Directus..env
HOSTIP or host the API listens on.0.0.0.0
PORTWhat port to run the API under.8055
UNIX_SOCKET_PATHThe Unix socket the API listens on, PORT and HOST will be ignored if this is provided.
PUBLIC_URLURL where your API can be reached on the web. used for things like OAuth redirects, forgot-password emails, and publicly-accessible logos./
ROOT_REDIRECTRedirect the root of the application / to a specific route. Accepts a relative path, absolute URL, or false to disable../admin
SERVE_APPWhether or not to serve the Data Studio web application.true
GRAPHQL_INTROSPECTIONWhether or not to enable GraphQL Introspection.true
GRAPHQL_SCHEMA_CACHE_CAPACITYHow many user GraphQL schemas to store in memory.100
ROBOTS_TXTWhat the /robots.txt endpoint should return.User-agent: *\nDisallow: /
TEMP_PATHWhere Directus' temporary files should be managed../node_modules/.directus

Server

VariableDescriptionDefault Value
SERVER_KEEP_ALIVE_TIMEOUTTimeout in milliseconds for socket to be destroyed.server.keepAliveTimeout
SERVER_HEADERS_TIMEOUTTimeout in milliseconds to parse HTTP headers.server.headersTimeout
SERVER_SHUTDOWN_TIMEOUTTimeout 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.

VariableDescriptionDefault Value
ADMIN_EMAILThe email address of the first user that's automatically created during bootstrapping.
ADMIN_PASSWORDThe password of the first user that's automatically created during bootstrapping.
ADMIN_TOKENThe 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.

VariableDescriptionDefault Value
TELEMETRYAllow Directus to collect anonymized data about your environment.true
TELEMETRY_URLURL that the usage report is submitted to.https://telemetry.directus.io/
TELEMETRY_AUTHORIZATIONOptional authorization header value.