Taking advantage of generous offers: make your own personal password vault without a server, 10GB of R2 storage is plenty for personal use; manage your own 2FA and passwords, safe and reliable

Foreword

This is a tutorial post explaining how to use Cloudflare to set up Bitwarden and use a self-hosted Bitwarden instance. The main code contributions come from open-source code on GitHub. Without further ado, let’s get started.


Prerequisites

  1. A GitHub account
  2. A Cloudflare account with an R2 bucket enabled (a credit card is required)
  3. A domain accessible in mainland China that has already been hosted on Cloudflare

Main Tutorial

Click this link for one-click deployment: Deploy with One Click
After clicking, you will see the following image:

Click Create Deployment and wait for the deployment to finish…

Once the deployment is complete, click Settings:

Add your domain:

Then click Variables and Secrets:

Open your domain, find this, and copy it:

Paste it here:

Then refresh the webpage and enter your account and password.


Usage Tutorial

I’ll use Edge as an example.

Open the Bitwarden official website and download the extension for the corresponding browser:

Since I’m not using Chrome, I can’t install it directly with the button. Instead, it downloads a file called “Bitwarden Password Manager 2026.1.1.crx”. Now open Edge’s extension management page, as shown below:

Simply drag the file into the extensions area to install it successfully. If it doesn’t work, you can enable Edge’s developer mode, as shown below:

What should you do if you find that you can’t log in with your account and password after opening it???

Scroll down, click Self-hosted, enter your website address, and then enter your account and password:

24 Likes

Let’s push to Diamond, boys—give us a boost!

1 Like

Thanks for sharing the tutorial!

Thanks for sharing, but I still feel more comfortable deploying it on my own server.

Thanks for sharing

Thanks for sharing the tutorial! :xhj001:

1 Like

Can anyone help? What should I do about the 404 page when connecting and authorizing newly registered Cloudflare and GitHub accounts?

You didn’t enable R2, right?

cf really is a cyber Buddha. But why do so many people self-host their passwords? Are Bitwarden’s servers not secure?

So many services require a membership.

Thanks for sharing

This technical post is excellent.

Would it have an impact if there were an outage like the one a few months ago?

Thanks for sharing the tutorial!

Support, thanks, legend!

There will be an impact, but it only means that synchronization won’t work. You can still use it locally.

Nice

1 Like

Can we leave R2 off?

Just wondering, once it’s deployed, how do I use it on my phone? I’d appreciate it if someone knowledgeable could help.

1 Like

Thanks for sharing the tutorial!

Download the Bitwarden app and select self-hosted when logging in—you can give it a try.
Android: GitHub - bitwarden/android: Bitwarden mobile apps (Password Manager and Authenticator) for Android. · GitHub
iOS: GitHub - bitwarden/ios: Bitwarden mobile apps (Password Manager and Authenticator) for iOS. · GitHub

1 Like