# Configuring Orchestrator

> Orchestrator configuration fields required in UiPath.Orchestrator.dll.config to connect an external Orchestrator instance to AI Center.

Orchestrator configuration entails adding some fields in the Orchestrator [UiPath.Orchestrator.dll.config](https://docs.uipath.com/orchestrator/standalone/2.2510/installation-guide/uipath-orchestrator-dll-config). Before you begin, backup your existing UiPath.Orchestrator.dll.config file (for example making a copy in a different path).

There are two ways in which you can update this configuration:

* **Automated configuration** - this is the preferred approach, done using a PowerShell script.
* **Manual configuration** - a step-by-step guideline with explanations. This method should be used in very unique cases, such as governance rules not allowing for automated changes to Orchestrator Config. Manual configuration is error prone and can lead to downstream installation issues.

## Automated configuration

:::note
This method should be the preferred approach. Manual configuration should only be used in very special cases.
:::

1. Open PowerShell in Administrator mode.
2. Download the file from [here](https://github.com/UiPath/ai-customer-scripts/blob/master/orchestrator/orchestratorAutomationAIC21-10.ps1). You can do this by running the command below:
   ```
   https://raw.githubusercontent.com/UiPath/ai-customer-scripts/master/orchestrator/orchestratorAutomationAIC21-10.ps1
   ```
3. **Optional:** You can familiarize yourself with the script options by running the command below:
   ```
   get-help .\orchestratorAutomation.ps1 -full
   ```

   For most of the Orchestrator installations, the default values for the non-mandatory options will work. In these cases, run the command below.

   ```
   .\orchestratorAutomation.ps1 -aifUrl "<CONFIG_CLUSTER_FQDN>" -storageUrl "<storage DNS>"
   ```

   The following variables must be changed in the command.

   * Replace `<CONFIG_CLUSTER_FQDN>` with AI Center DNS.
   * Replace `<storage DNS>` with the domain name use for the storage. By default it should be `<objectstore.{fqdn}>`.

If you are using a non-standard port for AI Center for any of the above you can append **:port** to previous DNS.

If you have a non-standard path to Orchestrator UiPath.Orchestrator.dll.config, the path *to the file* must be specified explicitly:

   ```
   .\orchestratorAutomationAIC.ps1 -aifUrl "<CONFIG_CLUSTER_FQDN>" -storageUrl "<storage DNS>" -config "<Path to UiPath.Orchestrator.dll.config file>"
   ```

## Manual configuration

1. Go to the Windows Server where Orchestrator is running and open the Orchestrator config file.
2. Add the following lines within the `<appSettings></appSettings>` section, preferably right before the closing `appSettings` tag.
   ```
   <!--AiFabric-->
   <add key="AiFabric.Licensing" value="true" />
   <add key="AiFabric.MLSkillsCreate" value="false" />
   <add key="AiFabric.MLSkillsCreateOOB" value="false" />
   <add key="AiFabric.PackagesCreate" value="false" />
   <add key="AiFabric.Packages" value="false" />
   <add key="AiFabric.Logs" value="false" />
   <add key="AiFabric.ModuleEnabled" value="true" />
   <add key="AiFabric.FeatureEnabledByDefault" value="true" />
   <add key="AiFabric.MLPackagingInstructionsUrl" value="https://docs.uipath.com/ai-fabric/docs/building-ml-packages" />
   <add key="AiFabric.MLServiceUrl" value="https://{{aifUrl}}" /> // replace {{aifUrl}} with your production URL
   <add key="AiFabric.MLSkillUrl" value="https://{CONFIG_CLUSTER_FQDN]/ai-deployer" />
   <add key="AiFabric.MLPackageUrl" value="https://{{aifUrl}}/ai-pkgmanager" />
   <add key="AiFabric.MLLogUrl" value="https://{{aifUrl}}/ai-helper" />
   <add key="AiFabric.MLTrainUrl" value="https://{{aifUrl}}/ai-trainer" />
   <add key="AiFabric.ModelStorageUrl" value="https://{{storageUrl}}" />
   <add key="AiFabric.AccountId" value="host" />
   ```
3. Run the `iisreset` command from the **Command prompt** or from PowerShell.
