Skip to content

Commit c0b2720

Browse files
authored
Merge pull request #36 from Daenariz/feature/vaultwarden_readme
vaultwarden readme updated, instruction for argon2 PHC string added
2 parents 0c2296a + c91d033 commit c0b2720

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

modules/nixos/vaultwarden/README.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,34 @@ Unofficial Bitwarden compatible server written in Rust, formerly known as bitwar
55
- [repo](https://github.com/dani-garcia/vaultwarden)
66
- [docs](https://github.com/dani-garcia/vaultwarden/wiki)
77

8-
## Setup
9-
10-
- Visit `https://SUBDOMAIN.DOMAIN.TLD/admin` and enter the admin token.
11-
- Click on "Users" in the top row.
12-
- Invite users via email in the box at the bottom.
13-
148
## Sops
159

16-
Provide the following entries to your secrets.yaml for email support:
17-
1810
> Replace `abc123` with your actual secrets
1911
2012
```yaml
2113
vaultwarden:
2214
admin-token: abc123
23-
smtp-password: abc123
24-
hashed-smtp-password: abc123
15+
smtp-password: abc123 # for email support
16+
hashed-smtp-password: abc123 # for email support
2517
```
2618
27-
Generate the hashed password with:
19+
Generate the hashed smtp password with:
2820
2921
```shell
3022
nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
3123
```
3224

3325
> For more info, see our mailserver module.
26+
27+
Optionally, you can store your admin token as an argon2 PHC string with the OWASP minimum recommended settings in sops. It is recommended to use an alphanumeric string only, as special characters may need to be escaped:
28+
29+
```shell
30+
nix-shell -p openssl libargon2 --run 'echo -n "abc123" | argon2 "$(openssl rand -base64 32)" -e -id -k 19456 -t 2 -p 1'
31+
```
32+
33+
## Setup
34+
35+
- Visit `https://SUBDOMAIN.DOMAIN.TLD/admin` and enter the admin token.
36+
- Click on "Users" in the top row.
37+
- Invite users via email in the box at the bottom.
38+

0 commit comments

Comments
 (0)