selfprivacy.org/content/en/docs/Services/bitwarden.md

47 lines
2.1 KiB
Markdown

---
title: "Bitwarden"
date: 2023-01-11T18:09:37+03:00
weight: 7
description: >
Your password manager
---
Information security experts recommend using complex passwords and creating a unique one for each account. Even three or four passwords are difficult to remember, so people often use the same password or similar ones. A password manager solves this problem: it generates complex passwords and stores them in a convenient form.
[Bitwarden](https://bitwarden.com/open-source/) can be downloaded and configured on your server, which is what we use as part of the SelfPrivacy project. Unlike other free (like freedom) password managers, Bitwarden provides easy synchronization of one database between all devices.
- [Official project website](https://bitwarden.com/open-source/)
## Recommended clients
- WEB-interface: available after [setting up the SelfPrivacy server]({{< ref "docs/Getting started/_index.md" >}}), at `https://password.YOUR.DOMAIN`
- [Official client](https://bitwarden.com/download/) (GNU/Linux, Windows, macOS, Android, iOS)
## Setting an admin token manually
{{% alert color="info" %}}
All commands in this guide are executed as root over SSH.
If you do not have root access, see [this guide](/docs/how-to-guides/root_ssh/) for more information.
{{% /alert %}}
First, we have to generate an admin token. Run the following:
```bash
nix-shell -p openssl --run 'openssl rand -base64 48'
```
It will output a string like this:
```
47pFSgYBbS0G0vCG63nX1yyblzgNaqZ40bNuJnwq2hvOy8ABfe+iHRfBeXlfrRdJ
```
This will be a password to your admin account. Copy it and paste it somewhere safe. To set it, we will run the following, replacing `PASSWORD` with the password you just generated:
```bash
jq '.bitwarden.adminToken = "PASSWORD"' /etc/selfprivacy/secrets.json > /etc/selfprivacy/secrets.json.new && mv /etc/selfprivacy/secrets.json.new /etc/selfprivacy/secrets.json
```
Now, we have to apply the changes. To do this, press "Upgrade server" in your app. After the upgrade is complete, restart Bitwarden using the app.
Now, your admin interface is available on `https://password.YOUR.DOMAIN/admin`.