Setting Configuration Values
These settings only apply to on-site installations.
If you have a hosted SaaS plan, then Veracity manages the settings for your deployment.
Contact our support line if you need changes to the settings on your hosted instance.
For an on-premises installation of Veracity Launch, you can change a parameter in the command line using the --flag=value pair format. Or, you can change a parameter by setting an environment variable. You can also change parameters in an .env file (sitting alongside the Launch executable), just omit the -- characters from the flag names and separate the options with a new line. The order of precedence is:
- A command line flag overrides an environment variable.
- An environment variable overrides an
.env file parameter. - An
.env file parameter overrides a default value.
Administrators typically use the .env file to store configuration settings.
Configuration values are sensitive information — protect them!
Example Command Lines:
$ ./VeracityLaunch-linux [--port 8080] --host=mydomain.com
$ ./VeracityLaunch-linux --help
Example .env File:
mongoServer=mongodb://localhost
adminDBName=VTCLXP
host=local.veracity.it
port=80
displayPort=80
protocol=http
domainRouting=false
SERVER_SECRET=9bcf20cc-b326-4d6f-9691-8c384e5dfbf8
Required Settings
Most Veracity Launch settings work well with their default values, and you should only change them if you needed. Other settings are different for every installation and you must configure them to match your IT environment. Below is a discussion of the common settings that all deployments must configure…
host
The host setting is the domain name where users can reach your Launch installation over the network. This should be a publicly-routable DNS name, like demo.golaunch.it, or launch.example.com. If users try to contact Launch with another address (e.g., the bare server IP), then Launch responds with an error.
This address should not be a URL — it's just the DNS name. You can use the server's bare IPV4 address in this field.
Incoming HTTP requests read this value from the host header, so be careful when running the server behind a proxy.
If you can’t make your client offer the correct HTTP header, then disable the server's check of the value: i.e., set disableHostCheck to true. However, when Launch constructs links to itself, it uses the host value in its configuration. So, if you disable the host check, then the links that Launch constructs to itself become incorrect.
Example Valid host Values:
host=launch.mycompany.org host=veracity.mycompany.com host=myveracitylaunch.io
Example Invalid host Values:
host=https://testlaunch.com host=FE80:CD00:0000:0CDE:1257:0000:211E:729C host=myhostname
port
The port is the port number on which the server listens. When running Launch on a shared server with other web applications, be careful to select a port that no other software uses.
This port appears in all links displayed by the software, unless it's the default port for the chosen protocol.
displayPort
The displayPort is the external-facing port that the client uses to access the system. Unless you are running a proxy, this is the same as the port setting. If you’re running a proxy, then it’s the port on which the proxy listens for client connections.
protocol
The protocol setting controls whether the server speaks HTTP or HTTPS. For historical reasons, the setting also controls which protocol to use to render links to the client. This setting should be either https or http…
- http — When the
protocol setting is http, the server serves normal HTTP on the selected port, and ignores any values for sslCert or sslKey. Links printed into the UI will use the scheme, http://.
- https — When the
protocol 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 offers HTTP but prints links to the client with https://. This affects how the server runs behind a proxy.
mongoServer
Veracity uses MongoDB as the primary database. The server won’t start without a functioning MongoDB connection. If the server can’t establish the database connection, then Launch fails, recycles, and tries 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.
You may need to update MongoDB connection strings that include the term, localhost. If Launch doesn’t connect to your local database, change localhost to 127.0.0.1.
Example mongoServer Values:
mongoServer=mongodb://localhost mongoServer=mongodb://dbUserName:password@local.veracity.it:27017 mongoServer=mongodb+srv://root:xxxxxxx@test.xxxxx.mongodb.net
adminDBName
The adminDBName is the name of the database in which the Launch will store all data. Two different installations of Veracity Launch may share a single MongoDB connection but use different admin databases.
Server_Secret
The Server_Secret is the key for various encryption functions internal to Launch. This should be a random string of characters. In a multi-server environment, each server should share the same value.
Changing the Server_Secret value signs-out all users.
Uploaded File Storage
When a user uploads learning files, Veracity Launch stores and serves those files using the server for content playback. In a load-balanced environment, each Launch server must have access to these files to serve them to clients.
By default, Launch uses
GridStore — a MongoDB-backed filesystem abstraction — to store your files. This means that the binary of the content is in the MongoDB database. This solution is scalable and performant, and suffices for most deployments.
However, if you’re concerned about database size (or cost, if you're using DBaaS), then you may wish to have Launch store the binary assets elsewhere. In this case, you can use the settings below to cause Launch to host the files on the local filesystem of the webserver.
If you wish to use a load balancer in front of several Launch servers, then each server must have access to the files. This means configuring a network file system such as NFS or EFS.
*This configuration setting assumes you’re not using a proxy between the Launch server and the wider network.
Serving Behind a Proxy
Some organizations choose to use another webserver to proxy HTTP to the Launch. This is useful if you need 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 Launch 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 Launch instead. In this scenario, the Launch server needs to know that the user sees an SSL connection, even when Launch is not serving SSL. Set protocol to https, but leave sslCert and sslKey blank.
WebSockets
Launch uses a
WebSocket connection to update various portions of the UI. While WebSockets are optional, for the server to work, it still must know whether to expect WebSockets. If you set
enableWebsockets to
true, then you must also configure the proxy to forward WebSocket connections to Launch. If you can’t, then set
enableWebsockets to
false.
Launch examines the incoming host header to find if the 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 set secureCookie to true, then you must inform the system to trust the upstream proxy. Add a X-Forwarded-Proto header to the HTTP request, and set it to https. This tells the Launch server that the incoming connection is secure, and that the server must obey the secureCookie setting.
For Launch’s inbuilt brute-force protection to work, the server must know the IP address of the client. The incoming IP address triggers brute-force protection, so the server throttles any client hitting the sign-in URL repeatedly. Since the IP address triggers the throttle, the delay won’t affect other clients. If Launch sees the upstream proxy as in incoming IP, then one client could slow-down all the other clients, and Launch users would see a message telling them to wait to sign-in. To inform Launch of the client IP (not the proxy IP), set the header X-Forwarded-For to the client IP address.
Paths
One reason to run Launch behind a proxy is to use the same webserver to host several applications. Set webRoot to a path on your server, and configure your proxy to forward only those paths to the Launch application.
Example NGINX Location Block: