Monthly Archives: July 2020

How to use Cloudflare DNS for the Letsencrypt challenge with Bitwarden’s automatic setup

Bitwarden’s automatic setup script allows you to secure your server’s HTTPS connections using Letsencrypt via certbot but it does not provide control over the challenge type used to issue the certificate. If you wanted to use a DNS challenge and take advantage of the Cloudflare API for example, you’ll need to make some changes to the scripts.

As your docker user, follow the standard steps from the TL;DR guide, which I’ve linked to and copied here just for completion. I do not recommend copy and pasting commands like this without being sure of what you’re executing.

$ curl -Lso && chmod +x
$ ./ install

You can CTRL+C to stop the install once it begins prompting you for input. Edit the script and comment out the downloadRunFile calls (e.g., at the time of writing lines 109 and 118)

You can then download and apply this diff to ~/bwdata/scripts/

Once complete the standard install can be reinitiated

$ ./ install