How to migrate from LaunchDarkly to ConfigCat
Published: 2021-11-30 00:43:38

Coming from LaunchDarkly? This post will show you a simple & straight forward way to migrate your feature flags from LaunchDarkly to [ConfigCat](http://configcat.com/)

<div style="display: 'flex'; justify-content: 'center'">
  <img src="https://configcat.com/blog/assets/2021-11-16-migrate-from-launchdarkly/cc-question-mark.png" alt="cc-question-mark" width="200"/>
</div>

---

## Step 1: Get LaunchDarkly Access Token

Please follow the following steps in order to get your token.

1. Login to LaunchDarkly
2. Navigate to [authorization page](https://app.launchdarkly.com/settings/authorization)
3. Create an access token:
  ![ld-account-settings](https://configcat.com/blog//assets/2021-11-16-migrate-from-launchdarkly/ld-account-settings.png)
4. Once this pops up, just fill in the name and leave the rest as per the image and hit "Save token" (I use the name "migrate-access-token" for better clarity on the usage of the token)
  ![ld-create-access-token](https://configcat.com/blog//assets/2021-11-16-migrate-from-launchdarkly/ld-create-access-token.png)
5. Once you hit save, you will be presented with this image. Please do copy & save the access token.
  ![ld-created-access-token](https://configcat.com/blog//assets/2021-11-16-migrate-from-launchdarkly/ld-created-access-token.png)

Hold on to this token. We will be using it later.

## Step 2: Get ConfigCat Base64 encoded authorization header

1. Login to [ConfigCat](http://configcat.com/)
2. Navigate to your account's [public api credentials](https://app.configcat.com/my-account/public-api-credentials)
3. Once there, click on "add credentials" and add any name you want (I used the name "migrate-from-launchdarkly" as the name, for better clarity of the usage of the token)
  ![cc-public-api-credentials](https://configcat.com/blog//assets/2021-11-16-migrate-from-launchdarkly/cc-public-api-credentials.png)
  ![cc-public-api-credentials-generate](https://configcat.com/blog//assets/2021-11-16-migrate-from-launchdarkly/cc-public-api-credentials-generate.png)
4. Once you hit "generate", copy the Base64 encoded authorization header. This is the only value we need (make sure the value you copy includes `Basic `).
  ![cc-public-api-credentials-generated](https://configcat.com/blog//assets/2021-11-16-migrate-from-launchdarkly/cc-public-api-credentials-generated.png)

Hold on to this base 64 string. We will be using this string later.

## Step 3: Get Your Organisation ID for ConfigCat

This organisation ID will be the organisation that you want to migrate your feature flag to. So, be certain it is the correct organisation ID.
To get the ID:

1. Navigate to [https://app.configcat.com/organization](https://app.configcat.com/organization)
2. Note that the URL will change into: `https://app.configcat.com/organization/xxx`
3. Your organisation ID is `xxx`

Hold on to your ConfigCat organisation ID. We will be using it later

## Step 4: Use [this repository](https://github.com/tlkiong/migrate-ld-cc)

[This repository](https://github.com/tlkiong/migrate-ld-cc) makes it easy for you to migrate from LaunchDarkly to [ConfigCat](http://configcat.com/) using just one command with some configuration.

1. Clone [this repository](https://github.com/tlkiong/migrate-ld-cc) to your local
2. Run `npm install` to install all dependencies
3. Copy `.env.sample` file into `.env` file in the same location
4. Fill in the data in `.env` file as you have received in Step 1 to Step 3 above. For example:
  ```
  LAUNCH_DARKLY_READER_ACCESS_TOKEN=thisisyourtoken
  CONFIG_CAT_API_AUTH_HEADER=thisisyourauthheader
  CONFIG_CAT_ORG_ID=thisisyourorgid
  CONFIG_CAT_PLAN=free
  ```
5. Run `npm run migrate` on your terminal.
6. In your ConfigCat site, navigate to [products](https://app.configcat.com/product). There you should see `from launchdarkly` config under `Configs` section:
  ![cc-products](https://configcat.com/blog//assets/2021-11-16-migrate-from-launchdarkly/cc-products.png)
7. Click on the `from launchdarkly` config and you should see all your feature flags from launchdarkly in here.

Congratulations! You have migrated over from LaunchDarkly to [ConfigCat](http://configcat.com/) using just one command with some configuration.