Get Started
Log In
HomeProductsDownloadPricingHelpBlogContactTalk to SalesGet StartedLog In

Deploy Key Connector

This article will walk you through the procedure for enabling and configuring Key Connector in an existing self-hosted environment. Before proceeding, please thoroughly review the About Key Connector article to ensure a full understanding of what Key Connector is, how it works, and the impacts of implementation.



Management of cryptographic keys is incredibly sensitive and is only recommended for enterprises with a team and infrastructure that can securely support deploying and managing a key server.

In order to use Key Connector you must:

If your Organization meets or can meet these requirements, including a team and infrastructure that can support management of a key server, contact us and we'll activate Key Connector.

Setup & Deploy Key Connector

Once you've contacted us regarding Key Connector, we'll reach out to kick off a Key Connector discussion. The steps that follow in this article must be completed in collaboration with Bitwarden Customer Success & Implementation specialists.

Obtain New License File

Once you've contacted us regarding Key Connector, a member of the Customer Success & Implementation team will generate a Key Connector-enabled license file for your Organization. When your Bitwarden collaborator instructs you it is ready, complete the following steps to obtain the new license:

  1. Open your Bitwarden Cloud Web Vault and navigate to your Organization's SettingsSubscription screen.

  2. Select the Download License button.

  3. When prompted, enter the Installation ID that was used to install your self-hosted server and select Submit. If you don't know your Installation ID off-hand, you can retrieve it from ./bwdata/env/global.override.env.

You won't need your license file immediately, but you will be required to upload it to your self-hosted server in a later step.

Initialize Key Connector

To prepare your Bitwarden server for Key Connector:

  1. Save a backup of, at a minimum, .bwdata/mssql. Once Key Connector is in use, it's recommended that you have access to a pre-Key Connector backup image in case of an issue.


    If you're using an external MSSQL database, take a backup of your database in whatever way fits your implementation.

  2. Update your self-hosted Bitwarden installation in order to retrieve the latest changes:

    ./ update
  3. Edit the .bwdata/config.yml file and enable Key Connector by toggling enable_key_connector to true.

    nano bwdata/config.yml
  4. Rebuild your self-hosted Bitwarden installation:

    ./ rebuild
  5. Update your self-hosted Bitwarden installation again in order to apply the changes:

    ./ update

Configure Key Connector

To configure Key Connector:

  1. Edit the .bwdata/env/key-connector.override.env file that will have been downloaded with the ./ update.

    nano bwdata/env/key-connector.override.env

    This file will be pre-populated with default values that will spin up a functional local Key Connector setup, however the default values are not recommended for production environments.

  2. In key-connector.override.env, you will need to specify values for the following:

    • Endpoints: What Bitwarden endpoints Key Connector can communicate with.

    • Database: Where Key Connector will store and retrieve user keys.

    • RSA Key Pair: How Key Connector will access an RSA key pair to protect user keys at rest.


Automated setup will populate endpoint values based on your installation configuration, however it's recommended that you confirm the following values in key-connector.override.env are accurate for your setup:



Key Connector must access a database which stores encrypted user keys keys for your Organization members. Create a secure database to store encrypted users keys and replace the default keyConnectorSettings__database__ values in key-connector.override.env with the values designated in the Required Values column for the chosen database:


Migration from one database to another is not supported at this time. Regardless of which provider you choose, implement a frequent automated backup schedule for the database.

Database Required Values
Local JSON (default) Not recommended outside of testing.

Microsoft SQL Server keyConnectorSettings__database__provider=sqlserver

Learn how to format MSSQL Connection Strings
PostgreSQL keyConnectorSettings__database__provider=postgresql

Learn how to format PostgreSQL Connection Strings
MySQL/MariaDB keyConnectorSettings__database__provider=mysql

Learn how to format MySQL Connection Strings
MongoDB keyConnectorSettings__database__provider=mongo

Learn how to format MongoDB Connection Strings

RSA Key Pair

Key Connector uses an RSA key pair to protect user keys at rest. Create a key pair and replace the default keyConnectorSettings__rsaKey__ and keyConnectorSettings__certificate__ values in key-connector.override.env with the values required for your chosen implementation.


The RSA key pair must be at a minimum 2048 bits in length.

Generally, your options include granting Key Connector access to an X509 Certificate that contains the key pair or granting Key Connector access directly to the Key Pair:

Activate Key Connector

Now that Key Connector is fully configured and you have a Key Connector-enabled license, complete the following steps:

  1. Restart your self-hosted Bitwarden installation in order to apply the configuration changes:

    ./ restart
  2. Log in to your self-hosted Bitwarden as an Organization Owner and navigate to the Organization SettingsSubscription screen.

  3. Select the Update License button and upload the Key Connector-enabled license retrieved in an earlier step:

    Update your License
    Update your License
  4. Navigate to the Organization Manage screen.

  5. If you haven't already, navigate to the Policies screen and enable the Single Organization and Single Sign-On Authentication policies. Both are required to use Key Connector.

  6. Navigate to the Single Sign-On screen:


    The next few steps assume that you already have an active Login with SSO implementation using SAML 2.0 or OIDC. If you don't, please implement and test Login with SSO before proceeding.

  7. In the Member Decryption Options section, select Key Connector.

  8. In the Key Connector URL input, enter the address Key Connector is running at (by default, https://your.domain/key-connector) and select the Test button to ensure you can reach Key Connector.

  9. Scroll to the bottom of the screen and select Save.



  • Resource Center
  • Community Forums
  • Security Compliance
  • Success Stories
  • User Reviews
  • Newsfeed
  • Subscribe to Updates

©2022 Bitwarden, Inc.

Terms Privacy Sitemap