> For the complete documentation index, see [llms.txt](https://docs.tricloudnexus.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tricloudnexus.io/edge/nexus-modules/platform-modules/apphostmodule/twin-config.md).

# Twin Config

To host external applications in the AppHostingModule, each application requires some configuration.\
The twin configuration should contain a list of applications, that are set in the property "applications".

The required properties for each application are:

* **executableName**: Name of the executable to run. Only .net dll's and exe files are currently supported.
* **executableFolderInsideZip**: The AppHostingModule downloads zip files containing the application. This property states the path inside the zip file, to the executable. If the executable is not in a folder, leave this empty.
* **sasUri**: SAS uri for cloud blob storage location of the application zip file. There is one SAS Uri per application.
* **httpPort**: The port exposed by the application. Currently only supports http from localhost.
* **executableArguments**: The arguments provided for running the executable.
* **executableType**: Application type. Currently only "Dotnet" is supported (0).
* **zipFileName**: Name of the zip file, containing the application.
* **validateChecksum**: If set to true, the zip file checksum is validated against the sha256Checksum, to ensure the file integrity.
* **sha256Checksum**: If the validateChecksum is set to true, this property holds the desired sha256 checksum.

To generate the sha256 checksum, the following powershell must be executed:

`Get-FileHash <Path to zip file>`

Here is an example of a twin configuration, containing 2 .net applications:

```
"applications": {
    "Application1": {
        "executableName": "Application1.dll",
        "executableFolderInsideZip": "",
        "sasUri": "https://tciotingestionstoragedev.blob.core.windows.net/app-hosting-module-drop/Application1.zip?sp=r&st=2023-02-20T09:39:24Z&se=2024-02-20T17:39:24Z&spr=https&sv=2021-06-08&sr=b&sig=ETj8%2BxIdf3duGOmp6xyOkf4mxv4dDAHSJNbJMXhOccU%3D",
        "httpPort": "5010",
        "executableArguments": "--AppHostingModuleRootDirectoryPath=/appdata/apphostingmodule --ImagesRootDirectoryPath=/appdata/images",
        "executableType": 0,
        "zipFileName": "Application1.zip",
        "validateChecksum": true,
        "sha256Checksum": "8F4E994DCE5EC56AFCE7188B11B47A6F705AC3EB8D209312140433A202E3E04C"
    },
    "Application2": {
        "executableName": "Application2.exe",
        "executableFolderInsideZip": "",
        "sasUri": "https://tciotingestionstoragedev.blob.core.windows.net/app-hosting-module-drop/Application2.zip?sp=r&st=2023-02-20T09:39:24Z&se=2024-02-20T17:39:24Z&spr=https&sv=2021-06-08&sr=b&sig=ETj8%2BxIdf3duGOmp6xyOkf4mxv4dDAHSJNbJMXhOccU%3D",
        "httpPort": "5011",
        "executableArguments": "--AppHostingModuleRootDirectoryPath=/appdata/apphostingmodule --ImagesRootDirectoryPath=/appdata/images",
        "executableType": 0,
        "zipFileName": "Application2.zip",
        "validateChecksum": false,
        "sha256Checksum": ""
    }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tricloudnexus.io/edge/nexus-modules/platform-modules/apphostmodule/twin-config.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
