Pos

Vaultwarden

Fungsi

Vaultwarden (dahulunya Bitwarden_RS) ialah Bitwarden tidak rasmi yang diprogramkan dengan Rust language berperanan sebagai password manager. Vaultwarden serasi dengan aplikasi Bitwarden rasmi dan sesuai untuk self-hosted kerana tidak memerlukan tenaga computer yang besar.

Perbezaan Vaultwarden Bitwarden
Database Sqlite Mysql
RAM usage 100MB 2GB

Environment

  • Ubuntu 22.04 LTS
  • Docker 20.10.12

Install docker

1
2
sudo apt install docker.io
sudo apt install docker-compose

Bina folder

1
2
mkdir vaultwarden
cd vaultwarden

Bina docker-compose.yaml file

1
touch docker-compose.yaml

Edit docker-compose.yaml file

1
nano docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
version: '3'

services:

  vaultwarden:
    image: vaultwarden/server:latest
    container_name: vaultwarden
    restart: unless-stopped
    environment:
      - WEBSOCKET_ENABLED=true
    volumes:
      - vw-data:/data
    ports:
      - "8080:80" # hostport:containerport

volumes:
  vw-data:

Edit docker-compose.yaml file dengan SMTP setting

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
version: '3'

services:
  vaultwarden:
    image: vaultwarden/server:latest
    container_name: vaultwarden
    restart: unless-stopped
    environment:
      - WEBSOCKET_ENABLED=true

      - SMTP_HOST=email-smtp.host.cpm
      - [email protected]
      - SMTP_FROM_NAME=Vault
      - SMTP_SECURITY=starttls # ("starttls", "force_tls", "off") Enable a secure connection. Default is "starttls" (Explicit - ports 587 or 25), "force_tls" (Implicit - port 465) or "off", no encryption (port 25)
      - SMTP_PORT=587          # Ports 587 (submission) and 25 (smtp) are standard without encryption and with encryption via STARTTLS (Explicit TLS). Port 465 is outdated and used with Implicit TLS.
      - SMTP_USERNAME=USERNAME_HERE
      - SMTP_PASSWORD=PASSWORD_HERE
      - SMTP_TIMEOUT=15

      - DOMAIN=https://vault.yourdomain.com
      - ADMIN_TOKEN=something_long_and_random # run openssl rand -base64 48
      - SIGNUPS_VERIFY=true
    volumes:
      - vw-data:/data
    ports:
      - "8080:80" # hostport:containerport

volumes:
  vw-data:

Run docker-compose

1
sudo docker-compose up -d

Login ke admin UI

http://localhost:8080

Tangkap layar 2022-06-09 052510.png

Pos ini dilesenkan di bawah CC BY 4.0 oleh penulis.