Configuration

Configuration

Setting Configuration Values

Info
These settings only apply to on-site installations. When using a hosted SaaS plan, Veracity will manage the settings for your deployment. Contact support if you require modifications to the settings on your hosted instance.
You can set parameters in the command line using the --flag=value, --flag2=value2 format. Each listed parameter can also be set as an environment variable. The same parameters (minus the "--") can also be placed in a file called ".env" alongside this executable. In the .env file, omit the "--" characters from the flag names, and separate the options with a new line. The order of precedence is:
  1. Command line flags override environment.
  2. Environment overrides .env file.
  3. .env file overrides defaults.
Info
It's typical to use the .env file to store configuration settings.
Alert
Configuration values are sensitive and should be protected.

Example Command Line

$ ./lrs2 [--port 8080] --disableAccountCreation
$ ./lrs2 --help

Example .env File

inProcessJobs=true
selfServiceAccounts=false
mongoServer=mongodb://localhost
adminDBName=VTCLRS
elasticSearchServer=
host=local.veracity.it
port=80
displayPort=80
protocol=http
domainRouting=false
SERVER_SECRET=9bcf20cc-b326-4d6f-9691-8c384e5dfbf8

    Required Settings

    Most Veracity settings work well with their default values, and you should only change them if you need to do so. Other settings are different for every installation and need to be configured to match your IT environment. Below is a discussion of the common settings that all deployments will need to configure.

    host

    The host setting is the domain name where the LRS installation can be reached over the network. This should be a publicly routable DNS name, like demo.lrs.io, or lrs.example.com. If the LRS is contacted using some other address (for instance the bare server IP), the LRS will respond with an error. This address should not be a URL — it's just the DNS name. It's possible to use the server's bare IPV4 address in this field. This value is read from the host header of incoming HTTP requests, so you should be careful when running the server behind a proxy. If it's impossible to make your clients provide the correct http header, then you can disable the server's check of the value. To disable the host header check, set disableHostCheck to true. Note that when the LRS constructs links to itself, it will use the provided host value from its configuration. If you disable the host header check, it's possible that the links the LRS constructs to itself (embeddable chart and dashboard links, the more link in an xAPI statement response, and others) may be incorrect.

    Below are examples of valid values:
    1. lrs.mycompany.org
    2. veracity.mycompany.com
    3. myveracitylrs.io
    Below are examples of invalid values:
    1. https://testlrs.com
    2. FE80:CD00:0000:0CDE:1257:0000:211E:729C
    3. myhostname

    port

    This is the port number on which the server will actually listen. When running the LRS on a shared server that contains other web applications, you must be careful to select a port that is not in use by other software. This port will appear in all links displayed by the software, unless it's the default port for the chosen protocol.

    displayPort

    This is the external facing port that a client will use to access the system. Unless you are running a proxy, this will equal the port setting. If you are running a proxy, it will be the port on which the proxy listens for client connections.

    protocol

    This setting controls which protocol, HTTP or HTTPS, the server will speak. For historical reasons, it also controls what protocol will be used to render links to the client. This setting should be either https or http.

    http
    When the setting is http, the server will serve normal http on the selected port. Any config values for sslCert or sslKey will be ignored. Links printed into the UI will use the scheme http://.

    https
    When the setting is https, the server serves https only if there is a valid sslCert and sslKey setting. If these settings are blank, then the server will serve http but will print links to the client with https://. This has some ramifications for running the server behind a proxy.

    mongoServer

    Veracity uses MongoDB as the primary database. The server will not start up without a functioning MongoDB connection. If the database connection cannot be established, the LRS will fail, recycle, and try again until the database becomes available. The MongoDB connection string contains information about the location of the server, the credentials to use to connect, and settings related to the database connection. The mongoServer should not include a database name, or trailing slash.
    Notes
    MongoDB connection strings that include the term localhost may need to be updated. If the LRS does not connect to your local database, please change localhost to 127.0.0.1.
    Examples:
    1. mongodb://localhost
    2. mongodb://dbUserName:password@local.veracity.it:27017
    3. mongodb+srv://root:xxxxxxx@test.xxxxx.mongodb.net

    adminDBName

    This is the name of the database in which the LRS will store all data unrelated to an individual tenant. Two different installations of Veracity may share a single MongoDB connection by using different admin databases.

    elasticSearchServer

    This setting is the connection string to Elasticsearch. Connecting to Elasticsearch is optional. Because the default of this setting is http://localhost:9200, you must explicitly set the value to nothing to disable the Elasticsearch connection.

    Server_Secret

    This is a key that is used for various encryption functions internal to the LRS. This should be a random string of characters. In a multi-server environment, each server should share the same random value. Changing this setting will log out all users.

    Examples:
    1. http://elastic:w3FKZHaoREVf4EA8S6yf@localhost:9200
    2. http://localhost:9200

      Outgoing Email

      Veracity can send emails to verify user accounts and support password reset. The system can also notify the administrator in the case of an unexpected restart of the software (usually caused by an error). To configure outgoing email, all the following settings must be populated. Veracity currently supports only SMTP for outgoing messages.
      Info
      Some STMP processors require that the system_email_from address be from a validated address. Check with your SMTP provider.


      Setting Name
      Discussion
      system_email_from
      This is the email address that will appear in the "From" field.
      email_pass
      This is the password for the given SMTP server.
      email_server
      This is the URL of the SMTP server. For example: smtp.sendgrid.net.
      email_to
      This address is used to send notifications to the system administrator.
      email_user
      The username used to access the SMTP server.

      Info
      All five of the above settings must be populated to enable outgoing email. You can verify that outgoing email is configured by checking the current configuration page from the administrative tools.

      Serving SSL

      Veracity can serve over SSL, given appropriate certificates. To configure Veracity to serve over SSL you must set the following fields. The below configuration assumes there is no proxy between the LRS and the wider network.

      Setting Name
      Discussion
      protocol
      should be https.
      port
      This is the port that the LRS actually listens on. Generally, this would be 443 for SSL.
      displayPort
      When not behind a proxy, the displayPort should match the port value.
      sslCert
      This is the path (relative to the working directory) to the SSL certificate file. This file should be in the PEM format and may contain additional chained certificates. For example: testcerts/certificate.crt.
      sslKey
      This is the private key associated with the certificate in the .crt file. This file should be in the PEM format. For example: testcerts/privatekey.key.

      Info
      Example certificate and key files are provided in the article attachments

        Serving Behind a Proxy

        Some organizations will choose to use another webserver to proxy HTTP to the LRS. This is useful in a case where you wish for more granular control over the HTTP requests, such as to set specific SSL configurations, to add additional headers, or for logging purposes. There are several considerations when running the LRS behind a proxy.

        SSL termination

        One common use case is to configure the proxy to terminate the SSL connection to the client and form a regular HTTP connection to the LRS. In this scenario, the LRS needs to know that the end user is seeing an SSL connection, even when the LRS is not serving SSL. Set the protocol setting to https but leave sslCert and sslKey blank.

        Streaming and file sizes

        The LRS has many functions intended to work for arbitrarily large data sizes, such as database backup or xAPI statement JSON upload. It's important to prevent your proxy server from buffering requests and responses, or some data loads may exceed the buffer limits and fail. Additionally, some data is streamed down to the client as it's processed. The software is designed such that most long running exports of reports or xAPI statements should begin downloading immediately, and new bytes are returned to the client as they are available. With buffering enabled in your proxy, no bytes will be returned to the client until the entire export completes. This can cause the client to abort the connection after no bytes are received in a given time, thus making it impossible to retrieve long running reports.

        WebSockets

        The LRS uses a WebSocket connection to update various portions of the UI. While WebSockets are optional, it's important that the server understands whether or not to expect WebSockets to work. If enableWebsockets is set to true, then the proxy must be configured to forward WebSocket connections to the LRS. If this is not possible, be sure to set enableWebsockets to false.

        HTTP Headers

        The LRS will examine the incoming host header to determine that the end client accessed the site from the expected domain. Set your proxy to echo the host header as received from the client, not to overwrite the header with the internal network host value.

        If you've set secureCookie to true, you'll need to inform the system that the upstream proxy is trusted. To do so, set a header on the HTTP request called X-Forwarded-Proto and make the value https. This will inform the LRS server that the incoming connection was secure, and thus the server will obey the secureCookie setting.

        For the LRS's inbuilt brute force protection to work, the IP address of the end client needs to be known to the server. Brute force protection is keyed by the incoming IP address, so a client hitting the login URL repeatedly will be throttled. Since the throttle is controlled by the IP, other clients are not affected by the delay. If the LRS sees the upstream proxy as in incoming IP, then one client may cause all clients to be slowed down, and users may experience a message telling them to wait to log in. To inform the LRS of the actual client IP, not the proxy's IP, set the header X-Forwarded-For to the actual client IP address.

        Paths

        One reason to run the LRS behind a proxy is to use the same webserver to host multiple applications. Set the setting webRoot to be a path on your server and configure your proxy to forward only those paths to the LRS application.

        Example Nginx Location Block

        location /
            {
                proxy_pass                 http://localhost:3005/;
                proxy_set_header           Host                 $host;
                proxy_set_header           X-Forwarded-For      $remote_addr;
                proxy_http_version         1.1;
                proxy_set_header           Upgrade              $http_upgrade;
                proxy_set_header           Connection           "Upgrade";
                proxy_set_header           X-Forwarded-Proto    $scheme;
                proxy_buffering            off;
                proxy_request_buffering    off;
                proxy_read_timeout         18000s;
                proxy_send_timeout         18000s;
            }

          Logging

          Veracity writes all log events to the process stdout stream. Your process or service control system is responsible for writing this information to disk, a database, or otherwise storing the events. Some, but not all, events are also written into a logs collection in the MongoDB database and can be viewed from the administrative UI. There are four settings that control how the log information is structured.

          Setting Name
          Discussion
          logLevel
          This is the logging verbosity. Either debug, info, warning, or error.
          logFormat
          Either human or lines. Some log management tools generate separate events for each newline in the output stream. In human mode, some data from single events is formatted to display on multiple lines, which can break such tools. Set the logFormat to lines to strip newlines from log events.
          logSources
          This is a comma separated list of log subsystem sources to display. This is useful when trying to isolate or debug specific components of the system
          no-color
          The LRS will normally use ANSI terminal colors to display information. Set this to true to disable all color output. Some systems are not capable of displaying this color and will show many Unicode escape characters instead of the coloring, making it difficult to view the logs.

          Notes
          Configuring a process control system to forward logs is beyond the scope of this documentation.

          Log Format

          Each line of a logged event is formatted in four fixed width columns. The first column is the ID of the worker thread that sent the message. The second is the message level — how important the message is. The third column is the log source — which subsystem generated the message. The logs can be filtered by both the source and level with the logSource and logLevel settings. The remainder of the line is the raw string of the message. This may or may not include formatted text or JSON data.

          Example:
          [M]    info   plugins    Found Plugin Dashboard C:\Development\­vtc2\­lrs2\­plugins\­netc-dashboards\­dashboards\­instructor\­navyInstructorActivities.js 
          [M]    info   plugins    Found Plugin Dashboard C:\Development\­vtc2\­lrs2\­plugins\­netc-dashboards\­dashboards\­student\­netcStudentActivities.js  
          [M]    info   websock    Starting socket server 
          [M]    info   system     Listening on 3005 
          [M]    info   system     Startup Complete  
          [M]    info   audit      System System Start  
          [M]    info   audit      EXTERNAL_CONNECTION 54.209.2.187:443 
          [M]    info   audit      UI GET /lrs/test-buck/content/create/ admin@example.com 
          [M]    info   audit      ACCESS lrs.content.create 640741e6240cc64d0857566f lrs.js admin@example.com true

          Audit Logging

          Info
          Audit logging is an Enterprise feature.
          Enterprise users can activate granular logging of many system events. These events will be printed into the server logs under the audit log source. The audit logger is a built-in, system-level plugin. It can be configured to log the following event categories.

          Event Type
          Discussion
          UI requests
          This setting will cause the audit logger to save all HTTP requests to the UI, including the method, path, and any logged in user.
          xAPI requests This setting will cause the audit logger to save all HTTP requests to the xAPI, including the method, path, and query.
          LRS API requests
          This setting will cause the audit logger to save all HTTP requests to the LRS management APIs.
          System API
          This setting will cause the audit logger to save all HTTP requests to the System management API.
          System ODM events
          Log all system level data model changes. All DB entities will report created, modify, and delete events for the specific entity type and ID.
          LRS ODM events
          Log all LRS level data model changes. All DB entities will report created, modify, and delete events for the specific entity type, ID, and LRS.
          User events
          Users account events such as created, deleted, locked, unlocked, password reset, login, and logout.
          Permissions
          This system will record all access control checks including what permission was requested, by who, on what entity, and what was the outcome.
          Permissions Set
          The system will record all modifications to permissions, including what permissions were granted and revoked, by whom, to whom, and on what entity.
          External Connections
          The system reached out to another server for some purpose. The log will contain the purpose, host/URL, protocol, and remote IP.

          Self Service User Accounts

          This section describes topics related to allowing users to manage their own accounts. This includes password reset, LRS creation, and account creation. Generally, an Enterprise install will be configured for only the system administrator to create LRS and user accounts. It's possible to configure the system to allow self-registration and LRS creation.
          Info
          Self-service account creation and password reset requires outgoing email to be enabled.
          The below table shows the recommended settings for an enterprise deployment. This will allow existing accounts to request password reset emails. Users may not self-register to the system, and users may not create their own LRSs. To allow specific users to create or access an LRS, use the system level permission system.

          Setting Name
          Recommended Value
          selfServiceAccounts
          true
          disableAccountCreation
          true
          defaultUserPermissions
          (empty string)

          The system can also be configured into a more permissive state, where users can create accounts for themselves and create their own LRS. This configuration supports a SaaS deployment like ours at lrs.io.
          Notes
          Enterprise customers should restrict network access to the LRS when in this state to prevent unauthorized users from creating accounts and LRSs
          Warning
          Enterprise customers are prohibited from charging for access to their LRS. Contact Veracity for the exact terms of the Enterprise license.

          Setting Name Recommended Value
          selfServiceAccounts true
          disableAccountCreation false
          defaultUserPermissions system.lrs.create

          All Settings

          Setting Name
          Category
          Default
          Data Type
          Discussion
          INSTALL_­NAME Server Setup String
          A name for this installation. Used for reporting functions in a multi-server installation.
          SERVER_­NAME Server Setup String
          A name for this server. This will render in the footer. Useful for understanding multi-server environments.
          SERVER_­SECRET Basics You must change this String
          A value used for various encryption functions. Should be the same between all servers in an installation.
          admin­DB­Name Basics VTCLRS String
          The database name to the system level tenant info database.
          admin­Notify­Updates Server Setup false String­Bool
          Notify the admin when updates are available.
          admin_­email Basics String
          The email address that identifies the admin user. This value is informational only. To change the actual address, use --setAdminUser=true.
          admin_­pass Basics String
          The password for the admin user. Do not place this in the .env file. Use the command line with --setAdminUser=true.
          analytics­Retry­Timeout Analytics 5000 Number
          The time in milliseconds before the client is signaled that the processor is working, and to try back later.
          auto­Index­Rebuild­Limit Limits and Rates 30000 Number
          When indexes are stale, LRSs with less than this many statements will be automatically upgraded.
          backup­Encrypt­Key fa299d32-96e2-43bf-aad7-2e61a96a8ddb String
          This key is used to encrypt LRS backups.
          brute­Free­Retries Limits and Rates 25 Number
          The number of free retries before the brute force prevention logic starts limiting the client.
          client­Request­QueueSize Server Setup 10 Number
          How many concurrent commands can each LRS execute per worker.
          config Basics .env String
          The name of the environment file to use.
          debug Logging false String­Bool
          Debugging console output. This is overcome by logLevel.
          default­User­Permissions Server Setup admin.lrs.create String
          The default global permissions for users. This is overridden by any specific permissions configuration on a user.
          disable­Account­Creation Features false String­Bool
          Prevent account creation.
          disable­Analytics­Cache Debugging false String­Bool
          Disable caching of the results for the Analytics dashboards.
          disable­Host­Check Server Setup false String­Bool
          Disable checking the host header against the configured host setting.
          disable­Plugins debugging false String­Bool
          Prevent the execution of plugins.
          disable­Reset­Password­Feedback Server Setup false String­Bool
          Prevent the reset password function from displaying any feedback about account status.
          disable­SSRF­protection Server Setup false String­Bool
          Allow the server to form connections to internal IP addresses.
          display­Port Basics 3005 Number
          The user facing port. This can differ from the port setting if there is a proxy server.
          domain­Routing Basics true String­Bool
          Whether or not your server will use domain-based routing. This means that the xAPI address will be yourlrs.lrs.io/xapi, or lrs.io/yourlrs/xapi.
          elastic­Missing­Ratio­Error Analytics 0.99 Number
          When determining if an Elasticsearch index is "healthy", it must have this ratio of statements to the MongoDB count.
          elastic­Reconnect­Timeout Analytics 30 seconds Human Interval
          A when a connection to Elasticsearch fails, how long should the server wait before trying again? (as a human interval, i.e., 1 minute).
          elastic­Search­Server Analytics String
          The full URL to the Elasticsearch server. Please be sure to use version 7.x of Elasticsearch.
          elastic­Timeout Analytics 20s String
          A timeout for Elasticsearch queries.
          email_­pass Email String
          Password on the outgoing email server.
          email_­server Email String
          The address of the SMTP server that the system will use to send emails.
          email_­to Email String
          The email address at which the system can reach the system administrator.
          email_­user Email String
          Username on the outgoing email server.
          enable­Websockets Server Setup false String­Bool
          Enable the WebSocket system for dynamic front end features. You must either use a MongoDB replica set or set the workers setting to 1.
          enforce­Limits­Cache­Time 30000 Number

          enforce­Password­Complexity Server Setup false String­Bool
          Require complex passwords.
          es­Dynamic­Extensions Analytics true String
          How are dynamic extensions treated? Set to true for regular Elasticsearch dynamic mapping or runtime to use runtime mapping.
          es­Index­Extensions Analytics true String­Bool
          Should xAPI extensions be included in the Elasticsearch mapping? This can cause document rejection if you have many different extensions in a dataset.
          es­Keyword­Max­Length Analytics 256 Number
          The maximum length beyond which similar strings will be assumed the same in the Elasticsearch mapping.
          expire­More­Links­After Server Setup 86400000 Number
          When to purge the More links from the xAPI.
          fetch­LRS­Routing­Cache­Time 5000 Number

          file­Upload­Size­Limit Limits and Rates 100000000 Number
          The maximum size in bytes for a content package upload.
          force­Portal­Launch­Cookie Server Setup false String­Bool
          Require the portal cookie, even for cross domain content.
          full­Text­Query­Limit Limits and Rates 100 Number
          The limit of results for full text searches in the statement viewer.
          generate­Statements­Iterations Limits and Rates 30 Number
          The number of iterations for the statement generation function.
          global­Mongo­Timeout Limits and Rates 10000 Number
          A global timeout for MongoDB transactions.
          host
          Basics
          local.veracity.it
          String
          The public facing DNS or IP of the server.
          in­Process­Jobs Features true String­Bool
          Should this server process the async job queue?
          inactive­Account­Disable Limits and Rates Human Interval
          A human interval, like 30 years or eight weeks. The amount of time where a user account will be locked if the user does not log in.
          job­Frequency Server Setup 30 seconds Human Interval
          How frequently should the server check for new async jobs in the job pool. Uses a human interval like 30 seconds or 5 minutes.
          json­Post­Limit Limits and Rates 100kb String
          the max size allowed in typical JSON post calls, excluding statement import. example: 100kb, 1mb, or 10gb.
          license Server Setup String
          The license key string provided to you by your sales POC.
          lock­After­Failed­Login­Attempts Server Setup 0 Number
          Lock accounts after X failed login attempts. Use 0 to disable.
          log­Format Logging lines String
          A log formatter. human or lines.
          log­Level Logging info String
          Set the log level, either trace, debug, info, warn, error, or fatal.
          log­Sources Logging String
          A list of log sources to display. Blank for all.
          max­VQL­Window­Size Limits and Rates 10000 Number
          The maximum number of results returned from any VQL query.
          maximum­Password­Lifetime Server Setup Human Interval
          Force the password from being changed after this period has elapsed.
          minimum­Password­Lifetime Server Setup Human Interval
          Prevent the password from being changed again before this period has elapsed.
          mongo­Server Basics mongodb://localhost String
          The full connection string to the Mongo DB server.
          no-color Server Setup String­Bool
          Disable console colors.
          password­Hash­Iterations Server Setup 10000 Number
          How many times are passwords hashed. Don't change this after install!
          password­Retention­Count Limits and Rates 5 Number
          Users may not reuse a password for this many generations.
          port Basics 3005 Number
          The actual port that the system will listen on.
          protocol Basics http String
          The user facing protocol. Note that server will serve with HTTP if this is http, and HTTPS only if this is https and the sslKey and sslCert are set.
          rate­Limit­Window Limits and Rates 86400 Number
          The time in seconds that the transaction limit is enforced over.
          rebuild­Statements­UI­Limit Limits and Rates 50000 Number

          recaptcha_­site_­key Server Setup String
          The site key for Google's reCAPTCHA system. Leave this blank to disable reCAPTCHA.
          secure­Cookie Server Setup false String­Bool
          Set the secure flag on the cookies.
          self­Service­Accounts Features true String­Bool
          Can users sign up for an account on their own?
          session­Timeout Server Setup 0 Number
          A timeout for the session cookie. Use a number, in milliseconds.
          set­Admin­User Basics String­Bool
          Update the database to reflect the values stored in --admin_email and --admin_pass. Do not place the password in the .env file. Use the command line to pass it.
          sim­Latency test 0 Number
          Simulate additional latency for all non-static routes.
          ssl­Cert Server Setup String
          The path (relative to CWD) to the SSL certificate file. Only used when protocol is https.
          ssl­Key Server Setup String
          The path (relative to CWD) to the SSL key file. Only used when protocol is https.
          statement­Default­Limit Limits and Rates 300 Number
          The default number of statements when limit is not set in the xAPI.
          statement­Max­Limit Limits and Rates 10000 Number
          The max limit that the server will support in the xAPI.
          stats­Cache­Time 180000 Number

          system­Mongo­ConnectionPool­Size Server Setup 100 Number
          How many connections to the DB can the system have.
          system_­email_­from Email String
          The address that will appear in the "From" field when the server sends an email.
          test­Timeout Tests 30000 Number
          Test timeout.
          webRoot Basics String
          A root path that all LRS functions will use.
          workers Limits and Rates 0 Number
          The number of processors to use. If unset (or set to 0), will use the number of logical cores on the server. "Lite" mode limits to 1.
          xapiAttachmentSizeLimit
          Limits and Rates
          1000000
          Number
          The maximum size in bytes for an xAPI attachment.
          passwordDictionary Server Setup
          String New in 1.14, a path (either absolute or relative to the CWD) to a file of newline delimited passwords that should be blacklisted (user cannot choose these passwords).


            • Related Articles

            • Custom Dashboards and Charts

              The Veracity Learning LRS offers several ways to generate custom dashboards. At the most basic level, you can place widgets (charts or lists) on a dashboard page. You can customize each widget with a set of options like what actor, what object, or ...
            • Accessibility Support

              Veracity Learning provides alternative access by allowing for exports of the data and textual reports. The graphical nature of the product makes extensive use of specific user interface, programming, and charting elements that cannot be made to meet ...
            • Single Sign On (SSO) Integration

              Veracity can integrate with your single sign on provider using OpenID Connect or Security Assertion Markup Language (SAML). This integration allows your enterprise users to log into the LRS user interface without providing a password. Integrating a ...
            • Installation

              The process for installing the Lite or Enterprise version of the Veracity Learning LRS is quite similar. First, you'll need to download and extract the software. Inside the archive, you'll find executable files for each common OS. Select the one you ...
            • Plugins

              Veracity Learning 1.6 and later support plugins! Plugins are collections of JavaScript code that can extend the system to add new capabilities or modify how the system works. Overview A plugin is a collection of JavaScript code that adds or modifies ...