All the configuration options presented in this page may be added to your .env file. However, you have nothing to do if you want to use the default values.

Configuration profiles

{danger} Choose a configuration profile before starting to record statements. Then, don't change it or you may get inconsistent behaviors.

TRAX LRS offers several configuration profiles to better match your LRS use case. The default profile is basic. It can be changed in the .env file:



TRAX LRS simply stores the statements in the statements table, then extracts and stores the activities in the activities table.

No more information is stored in the database. This is enought to meet the xAPI conformance requirements without complexity.

This profile gives the priority to writing performances. When writing small batches of statements (which is the more efficient strategy), the basic profile may be 2x faster than the relational profile.

On the other hand, the basic profile is less performant to query statements. Reading performances will decrease significantly with large datasets. But this may not be an issue if you push your data to a more specialized database, for example with our Elasticsearch connector.

Finally, the basic configuration profile does not support some features such as peudonymization or personal data.


This profile stores additional data including agents and verbs in specific tables. Furthermore, it stores the relations between statements, agents, activities and verbs.

Such relations are used to improve performances when querying the database. Of course, this slightly decreases writing performances. But this is usually an acceptable counterpart.

Additionally, you can store activity types and statement categories with this profile. This is disabled by default and can be enabled in the .env file:



This profile relies on the relational profile and performs agents pseudonymization. Groups are not concerned by pseudonymization.

Pseudonymization has an additional cost in terms of performances.


This profile relies on the relational profile and performs both agents and groups pseudonymization.

Pseudonymization has an additional cost in terms of performances.

xAPI settings

Statements API limit

When performing a GET request on the Statements API, by default, the number of returned statements is limited to 100, except when you define your own limit in the request. You can change this default value in the .env file. For example:


Statements authority

TRAX LRS sets or overrides the authority of all the incoming statements. When creating a client in TRAX LRS, you can define the matching authority. When no authority is defined for a client, the default authority is used:

    "objectType": "Agent",
    "account": {
        "name": "api",
        "homePage": ""

You can change this default authority in the .env file. For example:


Other settings

TRAX LRS offers many more settings which are summarized here. Please, refer to the respective documentation pages for further details.

Data deletion

Setting Default Description
MAX_DELETABLE_STATEMENTS 10000 Maximum number of statements that can be deleted from the UI

Further details on the data deletion page.


Setting Default Description
XAPI_LOGGING_ENABLED false Enable logging xAPI requests

Further details on the monitoring page.


Setting Default Description
XAPI_STORE_PSEUDO_IRI Account homepage of pseudonymized accounts

Further details on the pseudonymization page.

File connector

Setting Default Description
IMPORTER_FILE_PATH Path of the file to import
IMPORTER_PSEUDONIMIZE false Should we pseudonymize the imported statements?
IMPORTER_BATCH_SIZE 100 Size of statements batches when importing
IMPORTER_AUTHORITY_NAME import Authority name for imported statements
IMPORTER_AUTHORITY_HOMEPAGE Authority homepage for imported statements
EXPORTER_FILE_PATH Path of the file to export
EXPORTER_BATCH_SIZE 100 Size of statements batches when exporting

Further details on the file connector page.

LRS connector

Setting Default Description
LRS_PUSH_ENDPOINT LRS endpoint to push statements
LRS_PUSH_USERNAME Basic HTTP username to push statements
LRS_PUSH_PASSWORD Basic HTTP password to push statements
LRS_PUSH_BATCH_SIZE 100 Size of statements batches when pushing
LRS_PULL_ENDPOINT LRS endpoint to pull statements
LRS_PULL_USERNAME Basic HTTP username to pull statements
LRS_PULL_PASSWORD Basic HTTP password to pull statements
LRS_PULL_BATCH_SIZE 100 Size of statements batches when pulling
LRS_PULL_AUTHORITY_NAME pull Authority name for pulled statements
LRS_PULL_AUTHORITY_HOMEPAGE Authority homepage for pulled statements

Further details on the LRS connector page.

Elasticsearch connector

Setting Default Description
ELASTIC_SEARCH_HOSTS ["localhost:9200"] Elasticsearch server hosts
ELASTIC_SEARCH_CLOUD_ID "aaaaaaaaaaaaaaaa" Elasticsearch Cloud ID
ELASTIC_SEARCH_CLOUD_API_ID "zzzzzzzzzzzzzzzz" Elasticsearch Cloud API ID
ELASTIC_SEARCH_CLOUD_API_KEY "ssssssssssssssss" Elasticsearch Cloud API Key
ELASTIC_SEARCH_USERNAME Elasticsearch server username
ELASTIC_SEARCH_PASSWORD Elasticsearch server password
ELASTIC_SEARCH_BATCH_SIZE 100 Size of statements batches when pushing
ELASTIC_SEARCH_STATEMENTS_INDEX statements Name of the statements index in Elasticsearch
ELASTIC_SEARCH_AGENTS_INDEX agents Name of the agents index in Elasticsearch
ELASTIC_SEARCH_ACTIVITIES_INDEX activities Name of the activities index in Elasticsearch
ELASTIC_SEARCH_AGENT_PROFILES_INDEX agent_profiles Name of the agent profiles index in Elasticsearch
ELASTIC_SEARCH_ACTIVITY_PROFILES_INDEX activity_profiles Name of the activity profiles index in Elasticsearch

Further details on the Elasticsearch connector page.

High-speed configuration

Setting Default Description
DISABLE_ACTIVITIES_RECORDING false Disable activities recording
DISABLE_STATEMENTS_VALIDATION false Disable statements validation

Further details on the optimization page.

Redis cache

Setting Default Description
CACHE_DRIVER file Set to redis to enable Redis cache
REDIS_HOST Redis server host
REDIS_PORT 6379 Redis server port
REDIS_PASSWORD Redis server password
REDIS_CACHE_DB 1 Redis cache server name
XAPI_CACHE_DURATION Redis cache duration in seconds (illimited by default)

Further details on the Redis page.


Setting Default Description
DEFER_STATEMENTS_PROCESSING false Enable queueing statements
QUEUE_CONNECTION sync Queue driver: database or redis

Further details on the queues page.


Setting Default Description
CMI5_TOKEN_LIFETIME 60 Lifetime of the CMI5 tokens, expressed in minutes

Further details on the CMI5 page.