Environment Variable Settings

Beside its system settings you can also configure ngSurvey's core using following environment variable. These variables can also bet set either in the web.config file if you are using IIS or within the ngsurvey.settings.json file.

In a default Azure Linux app service or a custom Linux container any : in the variable name should be replaced by __ (double underscore).

🔅 Environment variables

  • NGSurvey:Secretencryption key used to sign the JWT and security items tokens. Must be at least 64 chars long.

  • NGSurvey:AutoDBSetupby default ngSurvey will automatically configure or upgrade your target database. If you want to disable the auto install / upgrade process you can set this variable to false. In such a case you will need to install manually the database using the dacpac file for Microsoft SQL Server. MariaDB or MySQL will only be installed by ngSurvey directly, we don't offer any scripts or code to install and setup the database manually by yourself.

  • NGSurvey:MailingBatchPoolingDelayis the delay in minutes after which the mailing related batchs like campaign email sending will trigger. Default is 1 minute.

  • NGSurvey:MaxMailingThread let you define how many worker threads will be used during the email sending process. Be careful when setting the number of threads as each thread will open a connection to your mail server. The default is 2.

  • NGSurvey:EnableTenants if you own a Tenant License you have to enable the tenants on your installation by setting this variable to true.

  • NGSurvey:DisableEmailBlacklistingdisables the ability to blacklist emails for campaigns if set to true.

  • NGSurvey:DisableMobilePhoneNumberBlacklistingdsables the ability to blacklist mobile phones for campaigns if set to true.

  • NGSurvey:EnableSwaggerif set to false will disable the access to the API documentation at https://yourngsurveysite/api.

  • NGSurvey:DistributedCacheenables distributed cache if set to true. Distributed cache must be enabled if you are using ngSurvey on cluster like configuration

  • NGSurvey:CacheTimeoutngSurvey uses internal caches to improve performances. By default these caches don't expire. You can set a timeout in minutes if you would like to set an expiration time for these caches to be flushed at regular interval.

  • NGSurvey:PanelSyncronizerThreadsNumber defines the number of threads that will be used to synchronize the panels against their data sources. The default is 6. Be careful as each thread can open a new connection to the data source to which your panel is connected.

  • NGSurvey:Languagesan array of languages code that will be selectable for the administration section. :

  • NGSurvey:ClusterNodedefines if set to true if the instance is running on a cluster node. Instances having the cluster node set to true will not run any kind of background jobs. You should keep the background jobs either on a separate instances that is not serving any surveys or on only one instance.

  • NGSurvey:EncryptionKeythis encryption key will be used for all encryption of data at the database level like connection strings, passwords, sensitive settings. Must be min. 64 characters long. Make sure to keep a backup of the key as it without the key you may not be able to recover any of your ngSurvey data.

  • NGSurvey:AccountLockoutThreshold number of times a login can try to authenticate before its being locked out.

  • NGSurvey:AccountLockoutDurationnumber of minutes during which the login account is locked before allowing to authenticate again.

  • NGSurvey:EnableHSTSenables HSTS if you are using SSL all cookies will be set as secure.

  • NGSurvey:WebSetupDisableddisable the web installation interface of ngSurvey to true.

  • NGSurvey:CaptchaDisableddisable catpcha features if set to true.

  • NGSurvey:TwoFactorDisableddisables two factor on login authentication if set true. Can be used to bypass the two factor authentication if any issue arises.

  • NGSurvey:ClearActivityLogsOlderThanDaysnumber of days to keep the activity log data.

  • NGSurvey:ClearActivityLogTresholdDaysnumber of days before the activity log data gets permanently deleted.

  • NGSurvey:EncryptActivityLogif set to true will encrypt the activity log data at the database level.

  • NGSurvey:PersitentMailStorageLocationpath to a folder that can be used to backup messages that are saved in the pickup exchange folder in case you are using the Exchange pickup folder to send out emails.

  • NGSurvey:MaxAllowedTextSizemaximum allowed text size in bytes that can be stored in the system. Can be used to prevent overflow attacks on the system. Default is 10485760.

  • NGSurvey:MailServerTestif set to true will not send directly emails through the configured mail server.

  • NGSurvey:LoadTestif set to true will allow posting multiple times the same respondent answers.

  • NGSurvey:AdminDisabledif set to true will disable all admin related features from the API. If disabled only the API related to survey retrieval and respondent submissions will be available.

  • NGSurvey:CPSPolicyif set to "Self" will enforce the content security policy (CSP) on the browser. Note that widget based answer items and any custom JavaScript related features will be disabled if set to Self.

  • KeyVault:Name name of the Azure key vault if you plan to store your environment variable in Azure's key vault.

  • AzureAd:ClientId client Id of the Azure's key vault.

  • AzureAd:ClientSecret client secret to access the Azure's ley vault.

Last updated

(c) 2024 Data Illusion Zumbrunn. All rights reserved. Reproduction strictly forbidden.