Skip to content

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:

  1. <installdir>/appsettings.json: The default configuration file. Direct modification is discouraged.
  2. <installdir>/Configuration/Data/appsettings.json: This file allows overriding default settings. Configuration changes should typically be made here.
  3. Environment Variables: Environment variables prefixed with "AK_" override settings from appsettings.json.
  4. <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
AK_DbProvider=Postgres
AK_DbConnStr="Host=myserver;Database=emakin;Username=emakin;Password=mypassword;"

Example: Web Server Port

1
AK_WEB__KESTREL__ENDPOINTS__HTTP__URL=http://*:81

Command-Line Argument Overrides

Command-line arguments passed to the agent executable override all other configuration layers.

Example:

1
.\AltiKare.Workflow.Agent.exe DBConnStr="Host=myserver;Database=emakin;Username=emakin;Password=mypassword;"

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
.\AltiKare.Workflow.Agent.exe setconfig DbConnStr 'Host=myserver;Database=emakin;Username=emakin;Password=mypassword;'

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.