Redakt configuration settings for the system and any installed modules are located in the appsettings.json
configuration file. All Redakt settings are contained in the "Redakt" object, which in turn has several child objects for different Redakt components. Configuration settings from the appsettings.json
file are automatically read by Redakt at system startup.
Most application settings can also be configured through code, as an options action passed to the applicable Redakt service registration method in the Startup.cs
file. Settings configured in code take priority and override the same setting in the application settings file. For specific module configuration settings, consult the module configuration guide.
Sensitive settings such as passwords or connection strings should not be committed to source control for security reasons. Depending on your deployment process and hosting platform, in many cases, these can be encrypted and kept in a secure location, such as Azure Key Vault.
Generic file structure
The general appsettings.json
file structure looks like this:
{
"Redakt": {
"LicenseKey": "",
"ContentManagement": { "..." },
"BackOffice": { "..." },
"IdentityServer": { "..." },
"ContentApi": { "..." },
"DataStore": { "..." },
"FileStore": { "..." },
"ServiceBus": { "..." },
"ApplicationCache": { "..." },
"Messaging": { "..." }
"Search": { "..." }
}
// other application settings...
}
Top-level settings
The Redakt appsettings.json
object contains the following top-level settings:
License Key
If you have a paid Redakt license, set this property to the license key you have received. Leave empty for a community license.
Content Management
Holds configuration settings for the content web rendering engine. See here for configuration options.
Back office
Holds configuration settings for the back office application. See here for configuration options.
Identity Server
Holds configuration settings for the Redakt identity server. See here for configuration options.
Content API
Holds configuration settings for the headless Content Delivery API. See here for configuration options.
Data Store
Holds settings for the database module. Specific module settings are contained in their own object. See the respective module's documentation page for configuration options. Example for the Lite DB database module:
"DataStore": {
"LiteDB": {
"FilePath": "App_Data\\Redakt.db"
}
}
File Store
Holds settings for the file store module. Specific module settings are contained in their own object. See the respective module's documentation page for configuration options. Example for the default local file system storage module:
"FileStore": {
"FileSystem": {
"RootPath": "App_Data\\Media"
}
}
Application Cache
Holds settings for the application cache module. Specific module settings are contained in their own object. See the respective module's documentation page for configuration options. Example for the default in-memory cache module:
"ApplicationCache": {
"InMemory": {
"SlidingExpirationSeconds": 300,
"AbsoluteExpirationSeconds": 3600
}
}
Service Bus
Holds settings for the service bus module. Specific module settings are contained in their own object. See the respective module's documentation page for configuration options. Example for the Mongo DB Capped Collection module:
"ServiceBus": {
"MongoCappedCollection": {
"CollectionName": "ServiceBus"
}
}
Search
Holds configuration settings for full-text search indexing. See here for configuration options.
Messaging
Holds configuration settings for messaging components.
Azure configuration
If you are hosting your application on Azure, and are using the application settings feature for setting Redakt configuration, you will need to combine the key path of the setting into a single setting key, separated by a semicolon (:
). For example, to set the endpoint URI for a Cosmos DB database, you would add an application setting with key Redakt:DataStore:AzureCosmosDb:EndpointUri
.
Values set in Azure configuration will override the same setting if present in the appsettings.json
file. Configuration set in code still takes priority over any other configuration.