mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.git
synced 2025-01-30 12:46:51 +00:00
fix: Update bitwarden admin token instructions
This commit is contained in:
parent
29a2b32a27
commit
6dd0f3c919
|
@ -18,14 +18,12 @@ Information security experts recommend using complex passwords and creating a un
|
||||||
|
|
||||||
## Setting an admin token manually
|
## Setting an admin token manually
|
||||||
|
|
||||||
First, make sure your system config is up to date. You may click "upgrade server" in the app and wait for a couple of minutes, or run the following command in the terminal:
|
{{% 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 %}}
|
||||||
|
|
||||||
```bash
|
First, we have to generate an admin token. Run the following:
|
||||||
cd /etc/nixos
|
|
||||||
git pull
|
|
||||||
```
|
|
||||||
|
|
||||||
Then, we have to generate an admin token. Run the following:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
nix-shell -p openssl --run 'openssl rand -base64 48'
|
nix-shell -p openssl --run 'openssl rand -base64 48'
|
||||||
|
@ -40,19 +38,9 @@ It will output a string like this:
|
||||||
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:
|
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
|
```bash
|
||||||
jq '.bitwarden.adminToken = "PASSWORD"' /etc/nixos/userdata/userdata.json > /etc/nixos/userdata/userdata.json.new && mv /etc/nixos/userdata/userdata.json.new /etc/nixos/userdata/userdata.json
|
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:
|
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.
|
||||||
|
|
||||||
```bash
|
|
||||||
nixos-rebuild switch
|
|
||||||
```
|
|
||||||
|
|
||||||
And after rebuilding the system, restart Bitwarden:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
systemctl restart vaultwarden
|
|
||||||
```
|
|
||||||
|
|
||||||
Now, your admin interface is available on `https://password.YOUR.DOMAIN/admin`.
|
Now, your admin interface is available on `https://password.YOUR.DOMAIN/admin`.
|
||||||
|
|
Loading…
Reference in a new issue