Node Configuration¶
This document details the configuration of an individual node within an Emakin server farm. Node configuration primarily involves setting application host connections and other network-related parameters.
Configuration Precedence¶
Emakin uses a layered configuration system. Settings are loaded in the following order of precedence:
<installdir>/appsettings.json: The default configuration file. Direct modification is discouraged.<installdir>/Configuration/Data/appsettings.json: This file allows overriding default settings. Configuration changes should typically be made here.- Environment Variables: Environment variables prefixed with "AK_" override settings from
appsettings.json. <installdir>/Configuration/Data/protectedsettings.json: This file stores encrypted configuration settings, taking precedence over all other layers.
Environment Variable Overrides¶
Environment variables beginning with "AK_" override corresponding settings in appsettings.json. Double underscores ("__") are used as separators for nested settings.
Example: Database Connection
1 2 | |
Example: Web Server Port
1 | |
Command-Line Argument Overrides¶
Command-line arguments passed to the agent executable override all other configuration layers.
Example:
1 | |
Encrypting Configuration Settings¶
While appsettings.json stores settings as plain text, sensitive information (like database credentials) can be encrypted and stored in protectedsettings.json.
Warning
Encrypted settings in protectedsettings.json are write-only. They cannot be read back. Losing this file results in permanent data loss.
Encrypting using the CLI:
The setconfig command (described in the CLI interface documentation) encrypts settings. For example:
1 | |
This encrypts the provided database connection string and stores it in protectedsettings.json. This encrypted value will override any other settings for DbConnStr.
This layered configuration approach combines flexibility with a secure mechanism for managing Emakin agent settings. Refer to the CLI interface documentation for further details on command-line tools.