Skip to main content
Version: Next

Environment Variables

Fig reads a number of environment variables. Some are required for base functionality while others can be used to override setting configuration without having to made code changes.

The following environment variables are available:

CategoryFunctionFormatExample
Mandatory - Basic FunctionSpecifies the location of the Fig API so the client knows where it should contact.FIG_API_URIFIG_API_URI=http://localhost:7281
Setting ConfigurationOverrides the group attribute for a specific setting.FIG_[SettingName]_GROUPFIG_MYSETTING_GROUP = MyGroup
Setting ConfigurationOverrides the Validation Regex attribute for a specific settingFIG_[SettingName]_VALIDATIONREGEXFIG_MYSETTING_VALIDATIONREGEX = \d
Setting ConfigurationOverrides the Validation Explanation attribute for a specific settingFIG_[SettingName]_VALIDATIONEXPLANATIONFIG_MYSETTING_VALIDATIONEXPLANATION = Number
Setting ConfigurationOverrides the lookup table key attribute for a specific settingFIG_[SettingName]_LOOKUPTABLEKEYFIG_MYSETTING_LOOKUPTABLEKEY = MyLookup
Client ConfigurationSets the instance that this client should attempt to read. If instance does not exist, it will get the base settings.FIG_[CLIENTNAME]_INSTANCEFIG_MYCLIENT_INSTANCE = MyInstance
Client ConfigurationOverrides the poll interval that will be used to poll the API for updatesFIG_POLL_INTERVAL_MSFIG_POLL_INTERVAL_MS = 30000
Client ConfigurationOverrides the classification of the settingFIG_[SettingName]_CLASSIFICATIONFIG_MYSETTING_CLASSIFICATION = Functional
Client ConfigurationOverrides the HTTP request timeout (in whole seconds) used when contacting the Fig API. Takes precedence over FigOptions.ApiRequestTimeout and the hard-coded context-based defaults (Windows Service with offline settings: 2 s; Windows Service without offline settings: 5 s; other contexts with offline settings: 5 s; other contexts without offline settings: 60 s). Useful for raising the timeout in production without a code change. Must be a positive integer.FIG_API_REQUEST_TIMEOUT_SECONDSFIG_API_REQUEST_TIMEOUT_SECONDS = 10