zishu's blog

zishu's blog

一个热爱生活的博主。https://zishu.me

Bitwarden / Vaultwarden --- Password management tool

1. Introduction#

Bitwarden is a free and open-source password management service that allows users to store sensitive information in an encrypted vault. The Bitwarden platform offers various client applications, including a web user interface, desktop apps, browser extensions, mobile apps, and a command-line interface. Bitwarden provides cloud-hosted services and also supports self-hosted solutions.

After researching some commonly used password management tools on the market, I chose Bitwarden. I deployed it on a server using self-hosting, regularly backed up the database, and exported passwords to ensure security.

https://bitwarden.com/

Vaultwarden, on the other hand, is an unofficial Bitwarden server implementation written in Rust. It provides a nice web management interface and is compatible with Bitwarden.

image

2. Deployment#

First, execute the following command on the server.

docker run -d --name bitwardenrs \  
  --restart unless-stopped \  
  -e WEBSOCKET_ENABLED=true \  
  -v /data/password/data/:/data/ \  
  -p 6666:80 \  
  -p 3012:3012 \  
  vaultwarden/server:latest

After the deployment is complete, open the website, log in, and register. Then, delete the container.

To disable registration, as I only want to use it myself, follow these two steps. If registration is not to be disabled, you can ignore the following steps.

docker stop bitwardenrs  # Stop the container  
docker rm -f bitwardenrs  # Delete the container
docker run -d --name bitwardenrs \  
  --restart unless-stopped \  
  -e SIGNUPS_ALLOWED=false \  
  -e WEBSOCKET_ENABLED=true \  
  -v /data/password/data/:/data/ \  
  -p 6666:80 \  
  -p 3012:3012 \  
  vaultwarden/server:latest

3. docker-compose.yml#

Using ChatGPT, I converted this piece of code into a docker-compose.yml file for easier deployment and installation.

image

version: '3'
services:
  bitwardenrs:
    image: vaultwarden/server:latest
    container_name: bitwardenrs
    restart: unless-stopped
    environment:
      - SIGNUPS_ALLOWED=false
      - WEBSOCKET_ENABLED=true
    volumes:
      - /data/password/data/:/data/
    ports:
      - "6666:80"
      - "3012:3012"

4. Chrome Extension#

By using a reverse proxy, you can log in to the web interface using a domain name. Additionally, a Chrome extension is used, which automatically saves passwords when logging into websites.

https://chrome.google.com/webstore/detail/bitwarden-free-password-m/nngceckbapebfimnlniiiahkandclblb

Afterwards, I only need to remember one master password, and all other website passwords are generated using encryption, allowing for convenience and security to coexist.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.