# General

> Configuration for the general system, server, first admin user, and telemetry.

<partial content="config-env-vars">



</partial>

<table>
<thead>
  <tr>
    <th>
      Variable
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Default Value
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        CONFIG_PATH
      </code>
    </td>
    
    <td>
      Where your config file is located. See <a href="/self-hosting/deploying">
        Deploying Directus
      </a>
      
      .
    </td>
    
    <td>
      <code>
        .env
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        HOST
      </code>
    </td>
    
    <td>
      IP or host the API listens on.
    </td>
    
    <td>
      <code>
        0.0.0.0
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        PORT
      </code>
    </td>
    
    <td>
      What port to run the API under.
    </td>
    
    <td>
      <code>
        8055
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        UNIX_SOCKET_PATH
      </code>
    </td>
    
    <td>
      The Unix socket the API listens on, <code>
        PORT
      </code>
      
       and <code>
        HOST
      </code>
      
       will be ignored if this is provided.
    </td>
    
    <td>
      
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        PUBLIC_URL
      </code>
    </td>
    
    <td>
      URL where your API can be reached on the web. used for things like OAuth redirects, forgot-password emails, and publicly-accessible logos.
    </td>
    
    <td>
      <code>
        /
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ROOT_REDIRECT
      </code>
    </td>
    
    <td>
      Redirect the root of the application <code>
        /
      </code>
      
       to a specific route. Accepts a relative path, absolute URL, or <code>
        false
      </code>
      
       to disable.
    </td>
    
    <td>
      <code>
        ./admin
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        SERVE_APP
      </code>
    </td>
    
    <td>
      Whether or not to serve the Data Studio web application.
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        OPENAPI_ENABLED
      </code>
    </td>
    
    <td>
      Whether or not to enable OpenAPI Specification output.
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GRAPHQL_INTROSPECTION
      </code>
    </td>
    
    <td>
      Whether or not to enable GraphQL Introspection.
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GRAPHQL_SCHEMA_CACHE_CAPACITY
      </code>
    </td>
    
    <td>
      How many user GraphQL schemas to store in memory.
    </td>
    
    <td>
      <code>
        100
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        GRAPHQL_SCHEMA_GENERATION_MAX_CONCURRENT
      </code>
    </td>
    
    <td>
      How many GraphQL schemas can be generated simultaneously.
    </td>
    
    <td>
      <code>
        5
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ROBOTS_TXT
      </code>
    </td>
    
    <td>
      What the <code>
        /robots.txt
      </code>
      
       endpoint should return.
    </td>
    
    <td>
      <code>
        User-agent: *\nDisallow: /
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        TEMP_PATH
      </code>
    </td>
    
    <td>
      Where Directus' temporary files should be managed.
    </td>
    
    <td>
      <code>
        ./node_modules/.directus
      </code>
    </td>
  </tr>
</tbody>
</table>

<callout icon="i-lucide-triangle-alert" color="warning">

`PUBLIC_URL` must be a qualified URL when using [licensing](/licensing/overview) features beyond Core Plan and/or when configuring [SSO](/configuration/auth-sso)

</callout>

## License

See [Licensing](/licensing/overview) for a full explanation of license keys, license tokens and source precedence.

<table>
<thead>
  <tr>
    <th>
      Variable
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Default Value
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        LICENSE_KEY
      </code>
    </td>
    
    <td>
      License key in the format <code>
        DXXXX-XXXXX-XXXXX-XXXXX-XXXXC
      </code>
      
      . Activated against the Directus licensing service on first use and revalidated periodically. Takes precedence over <code>
        LICENSE_TOKEN
      </code>
      
       and any key set through the Studio.
    </td>
    
    <td>
      
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        LICENSE_TOKEN
      </code>
    </td>
    
    <td>
      Pre-issued license token for offline use. Validated locally on each startup and never contacts the licensing service. Mutually exclusive with <code>
        LICENSE_KEY
      </code>
      
       — setting both is a configuration error and Directus will refuse to start.
    </td>
    
    <td>
      
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        LICENSE_KEY_MANAGEMENT_ENABLED
      </code>
    </td>
    
    <td>
      Whether the license key can be managed in the Studio and via the API. Set to <code>
        false
      </code>
      
       to prevent the license from being activated, updated, or deactivated.
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
  </tr>
</tbody>
</table>

<callout icon="i-lucide-info">

When `LICENSE_KEY` or `LICENSE_TOKEN` is set in the environment, any license key management actions are disabled. To change the license, update the environment variable and restart Directus.

</callout>

## Server

<table>
<thead>
  <tr>
    <th>
      Variable
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Default Value
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        SERVER_KEEP_ALIVE_TIMEOUT
      </code>
    </td>
    
    <td>
      Timeout in milliseconds for socket to be destroyed.
    </td>
    
    <td>
      <a href="https://github.com/nodejs/node/blob/master/doc/api/http.md#serverkeepalivetimeout" rel="nofollow">
        server.keepAliveTimeout
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        SERVER_HEADERS_TIMEOUT
      </code>
    </td>
    
    <td>
      Timeout in milliseconds to parse HTTP headers.
    </td>
    
    <td>
      <a href="https://github.com/nodejs/node/blob/master/doc/api/http.md#serverheaderstimeout" rel="nofollow">
        server.headersTimeout
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        SERVER_SHUTDOWN_TIMEOUT
      </code>
    </td>
    
    <td>
      Timeout in milliseconds before the server is forcefully shut down.
    </td>
    
    <td>
      1000
    </td>
  </tr>
</tbody>
</table>

### Additional Server Variables

All `SERVER_*` environment variables are merged with `server` instance properties created from [http.Server](https://github.com/nodejs/node/blob/master/doc/api/http.md#class-httpserver). 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.

<table>
<thead>
  <tr>
    <th>
      Variable
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Default Value
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        ADMIN_EMAIL
      </code>
    </td>
    
    <td>
      The email address of the first user that's automatically created during bootstrapping.
    </td>
    
    <td>
      
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ADMIN_PASSWORD
      </code>
    </td>
    
    <td>
      The password of the first user that's automatically created during bootstrapping.
    </td>
    
    <td>
      
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ADMIN_TOKEN
      </code>
    </td>
    
    <td>
      The API token of the first user that's automatically created during bootstrapping.
    </td>
    
    <td>
      
    </td>
  </tr>
</tbody>
</table>

## Telemetry

To more accurately gauge the frequency of installation, version fragmentation, and general size of the user base, Directus collects usage data about your environment.

<table>
<thead>
  <tr>
    <th>
      Variable
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Default Value
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        TELEMETRY
      </code>
    </td>
    
    <td>
      Allow Directus to collect usage data about your environment. Whether it can be disabled depends on your license. See <a href="/licensing/telemetry">
        Telemetry
      </a>
      
       for more information.
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        TELEMETRY_URL
      </code>
    </td>
    
    <td>
      URL that the usage report is submitted to.
    </td>
    
    <td>
      <code>
        https://telemetry.directus.io
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        TELEMETRY_AUTHORIZATION
      </code>
    </td>
    
    <td>
      Optional authorization header value.
    </td>
    
    <td>
      
    </td>
  </tr>
</tbody>
</table>

<callout icon="i-lucide-book-open" color="primary" to="/licensing/telemetry">

For a full breakdown of what is collected, when it is sent, and how to opt out, see [Telemetry](/licensing/telemetry).

</callout>

## Project Owner Registration

The first time an owner is set for your instance, Directus sends a one-time registration that associates the project with a point of contact. Alongside the owner, this includes details such as organization name, how the project is used, and whether you opted in to product updates.

<table>
<thead>
  <tr>
    <th>
      Variable
    </th>
    
    <th>
      Description
    </th>
    
    <th>
      Default Value
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        PROJECT_OWNER
      </code>
    </td>
    
    <td>
      Registered owner and primary contact responsible for your Directus instance.
    </td>
    
    <td>
      
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        PROJECT_OWNER_ENABLED
      </code>
    </td>
    
    <td>
      Whether Directus sends the project owner registration information.
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
  </tr>
</tbody>
</table>

<callout icon="i-lucide-book-open" color="primary" to="/licensing/telemetry#project-owner-registration">

For a full breakdown of what the registration contains, and when it is sent, see [Project Owner Registration](/licensing/telemetry#project-owner-registration).

</callout>
