Skip to main content

How to migrate from LaunchDarkly to ConfigCat

· 3 min read
kiong
All Things Tech In Simple Terms

Coming from LaunchDarkly? This post will show you a simple & straight forward way to migrate your feature flags from LaunchDarkly to ConfigCat

cc-question-mark

Step 1: Get LaunchDarkly Access Token

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

  1. Login to LaunchDarkly
  2. Navigate to Account settings page by clicking My Profile in the top right menu
  3. Select the Authorization tab
  4. Create an access token: ld-account-settings
  5. 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
  6. Once you hit save, you will be presented with this image. Please do copy & save the access token. ld-created-access-token Hold on to this token. We will be using it later.

Step 2: Get ConfigCat Base64 encoded authorization header

  1. Login to ConfigCat
  2. Navigate to your account's 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 cc-public-api-credentials-generate
  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

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
  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

This repository makes it easy for you to migrate from LaunchDarkly to ConfigCat using just one command with some configuration.

  1. Clone this repository 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
  1. Run npm run migrate on your terminal.
  2. In your ConfigCat site, navigate to products. There you should see from launchdarkly config under Configs section: cc-products
  3. 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 using just one command with some configuration.