1
0
mirror of https://github.com/bitwarden/help synced 2025-12-06 00:03:30 +00:00
Files
help/_articles/hosting/external-db.md
fred_the_tech_writer 906e2ca0dd Promote to Master (#748)
* initial commit

* adding quotes for the array error

* Create Gemfile

* Create Gemfile.lock

* add .nvmrc and .node-version

* removed /article from URL

* update links to work with netlify

* more fixed links

* link fixes

* update bad links

* Update netlify.toml

toml test for redirects

* article redirect

* link fixes

* Update index.html

* Update netlify.toml

* Update _config.yml

* Update netlify.toml

* Update netlify.toml

* Update netlify.toml

* Update netlify.toml

* Update netlify.toml

* add article back into URL for launch

* Update netlify.toml

* Update netlify.toml

* add order to categories front matter

* Update netlify.toml

* update

* sidemenu update

* Revert "sidemenu update"

This reverts commit 5441c3d35c.

* update order prop

* Navbar updates per Gary and compiler warnings

* font/style tweaks

* Update sidebar.html

* Stage Release Documentation (#739)

* initial drafts

* rewrite Custom Fields article to prioritize new context-menu option & better organize ancillary information

* edit

* edit

* Custom Field Context Menu & CAPTCHA item in release notes

* SSO relink event

* update rn

* small edits

* improve release notes titles

* fix side menu

* Edits courtest of mportune!

* update order

* link fixes

* link cleanup

* image updates and a link

* fix trailing slash

Co-authored-by: DanHillesheim <79476558+DanHillesheim@users.noreply.github.com>
2021-09-21 13:21:11 -04:00

2.0 KiB

layout, title, categories, featured, popular, tags, order
layout title categories featured popular tags order
article Connect to an External MSSQL Database
hosting
false false
hosting
database
mssql
12

By default, self-hosted instances of Bitwarden will use a Microsoft SQL Server (MSSQL) database created as a normal part of installation setup, however you configure Bitwarden to use an external MSSQL database.

{% callout info %} Currently, self-hosted installations of Bitwarden support only MSSQL databases. Stay tuned for future updates on this topic. {% endcallout %}

To setup your self-hosted instance with an external database:

  1. Create a new MSSQL database named vault.

    {% callout warning %}You must use vault as your database name. A different database name will cause migration to fail.{% endcallout %}

  2. (Recommended) Create a dedicated DBO for your vault database.

  3. As an administrator of your Bitwarden server, open the global.override.env file in an editor:

    nano bwdata/env/global.override.env
    
  4. Edit the globalSettings__sqlServer__connectionString= value for the following information.

    • Replace "Data Source=tcp:mssql,1443"; with your MSSQL Server name, for example "Data Source=protocol:server_url,port".
    • If you created a DBO, replace User ID=sa; with your DBO User ID.
    • Replace Password=<default_pw>; with your DBO or SA password.
  5. Save your changes to global.override.env.

  6. Start Bitwarden (./bitwarden.sh start).

{% comment %} 6. Run ./bitwarden.sh updatedb to migrate the database schema.

{% callout success %}updatedb does not migrate data, it only migrates the database schema. To move existing data to the new database, restore a backup from ./bwdata/mssql/backups.{% endcallout %} {% endcomment %}

Once the above steps are complete, you can test the connection by creating a new user through the Web Vault and querying the external vault database for creation of the new user.