This article defines the certificate options available to self-hosted instances of Bitwarden. You will select your certificate option during installation.
The information in this article may not apply to Bitwarden Unified self-hosted deployments.
Let's Encrypt is a certificate authority (CA) that issues trusted SSL certificates free of charge for any domain. The Bitwarden installation script offers the option to generate a trusted SSL certificate for your domain using Let's Encrypt and Certbot.
Certificate renewal checks occur each time Bitwarden is restarted. Using Let's Encrypt will require you to enter an email address for certificate expiration reminders.
Using Let's Encrypt requires ports 80 and 443 to be open on your machine.
If you change the domain name of your Bitwarden server, you will need to manually update your generated certificate. Run the following commands to create a backup, update your certificate, and rebuild Bitwarden:
Select 1, then follow the instructions:
You will need to install a build of OpenSSL for Windows.
You may alternatively opt to use an existing SSL certificate, which will require you to have the following files:
A server certificate (
A private key (
A CA certificate (
You may need to bundle your primary certificate with intermediate CA certificates to prevent SSL trust errors. All certificates should be included in the server certificate file when using a CA certificate. The first certificate in the file should be your server certificate, followed by any intermediate CA certificate(s), followed by the root CA.
Under the default configuration, place your files in
./bwdata/ssl/your.domain. You may specify a different location for your certificate files by editing the following values in
The values defined in
config.yml represent locations inside the NGINX container. Directories on the host are mapped to directories within the NGINX container. Under the default configuration, mappings line up as follows:
The following values in
Map to the following files on the host:
You should only ever need to work with files in
./bwdata/ssl/. Working with files directly in the NGINX container is not recommended.
Optionally, if using Diffie-Hellman key exchange to generate ephemeral parameters:
dhparam.pemfile in the same directory.
You can create your own
dhparam.pem file using OpenSSL with
openssl dhparam -out ./dhparam.pem 2048.
You may alternatively opt to use a self-signed certificate, however this is only recommended for testing.
Self-signed certificates will not be trusted by Bitwarden client applications by default. You will be required to manually install this certificate to the trusted store of each device you plan to use Bitwarden with.
Generate a self-signed certificate:
Your self-signed certificate (
.crt) and private key (
private.key) can be placed in the
./bwdata/ssl/self/your.domain directory and configured in the
To trust a self-signed certificate on Windows, run
certmgr.msc and import your certificate into the Trusted Root Certification Authorities.
To trust a self-signed certificate on Linux, add your certificate to the following directories:
And run the following commands:
For our Linux desktop app, accessing the web vault using Chromium-based browsers, and the Directory Connector desktop app, you also need to complete this Linux cert management procedure.
To trust a self-signed certificate on an Android device, refer to Google's Add & remove certificates documentation.
If you are not self-hosting and encounter the following certificate error on your android device:
You will need to upload Bitwarden's certificates to your device. Refer to this community thread for help finding the certificates.
If you opt to use no certificate, you must front your installation with a proxy that serves Bitwarden over SSL. This is because Bitwarden requires HTTPS; trying to use Bitwarden without the HTTPS protocol will trigger errors.