> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognite.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up the Fabric connector

> Learn how to set up and run the Cognite Fabric connector as a Windows executable, Windows service, or Docker container.

## Before you start

* Make sure you have the credentials to connect your Fabric instance. Use [DefaultCredentials](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/identity/azure-identity/README.md#key-concepts) to authenticate the connector. This makes it very flexible, with multiple options for specifying credentials, which are client credentials, user login, or managed identities.
* Check the [server requirements](/cdf/integration/guides/extraction/fabric/fabric_server_requirements) for the connector.
* Create a configuration file according to the [configuration settings](/cdf/integration/guides/extraction/configuration/fabric-connector). The file must be in YAML format.

## Set up the connector

<Tabs>
  <Tab title="Windows standalone">
    <Steps>
      <Step title="Download the executable">
        Download the `fabric-connector-standalone-{VERSION}-win32.exe` file via the download links available from the Cognite Fabric Connector section on the **Extract data** page in the CDF user interface.
      </Step>

      <Step title="Save the file">
        Save the file in a folder.
      </Step>

      <Step title="Run the connector">
        Open a command line window and run the file with a configuration file as an argument.

        In this example, the configuration file is named `config.yml` and saved in the same folder as the executable file:

        ```bash theme={"languages":{"custom":["/_languages/kuiper.json","../_languages/kuiper.json"]}}
        fabric-connector-standalone-<VERSION>-win32.exe ./config.yml
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="Windows service">
    <Steps>
      <Step title="Download the service executable">
        Download the `fabric-connector-service-{VERSION}-win32.exe` file via the download links available from the Cognite Fabric Connector section on the **Extract data** page on the CDF homepage.
      </Step>

      <Step title="Save files in same directory">
        Save the file to the same directory as a configuration file named `config.yaml`. This must be the exact name of the file.
      </Step>

      <Step title="Install the service">
        As an administrator, open up the command line window in the folder you placed the executable file and the configuration file and run the following command:

        ```powershell theme={"languages":{"custom":["/_languages/kuiper.json","../_languages/kuiper.json"]}}
        .\fabric-connector-service-<VERSION>-win32.exe install
        ```
      </Step>

      <Step title="Configure the service">
        1. Open the **Services** app in Windows and find the **Cognite Fabric Connector** service.
        2. Right-click the service and select **Properties**.
        3. Configure the service according to your requirements.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Docker">
    The connector is available as a Docker container that is pre-built with a configuration that connects to CDF and downloads the configuration from an extraction pipeline in CDF. You can use the [example config](https://github.com/cognitedata/cdf-fabric-replicator/blob/main/config_examples/example_config.yaml) as a starting point.

    Enter this `docker run` statement with the following options:

    * `docker run` starts a new container.
    * `--name fabric-connector` names the container `fabric-connector`. This recognizes the connector when running `docker ps` and stops the connector with `docker stop db-connector`.
    * `--network=host` grants the container full network access. This is required to push metrics and connect to CDF.
    * `cognite/fabric-connector:<version>` is the name of the image. Replace `<version>` with the version you'll run.
    * Set the environment variables using the `-e VARNAME=value` parameters: `COGNITE_BASE_URL`, `COGNITE_PROJECT`, `COGNITE_TOKEN_URL`, `COGNITE_CLIENT_ID`, `COGNITE_CLIENT_SECRET`, `COGNITE_EXTRACTION_PIPELINE`.
    * Set the other environment variables mentioned in your [config yaml](https://github.com/cognitedata/cdf-fabric-replicator/blob/main/config_examples/example_config.yaml) stored in the extraction pipeline.
    * Set the managed identity on the container or set the environment variables for [DefaultCredentials](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/identity/azure-identity/README.md#key-concepts).
  </Tab>
</Tabs>
