Document current Vaultwarden CLI setup
This commit is contained in:
1 parent
ea6b7ded17
commit
c9d7974d16
1 file changed
+64
-5
@@ -43,13 +43,72 @@ curl -fsSL -H "Authorization: token $GITEA_TOKEN" \
|
||||
|
||||
On SteamOS, the one sudo prompt makes `/nix` owned by `deck`. Nix then runs in single-user mode, with no daemon and no units in `/etc`.
|
||||
|
||||
Then, once per machine. The personal and headless profiles default to `https://vault.godemperordoge.org`, and `full-work` defaults to `https://vault.etvamerica.com`. Set `BW_SERVER` to override the profile default. If Bitwarden is already signed in to another server, run `bw logout` before retrying setup or `dot secrets`.
|
||||
### Set up the Bitwarden CLI
|
||||
|
||||
Run these steps in the same terminal. If `bw` or `dot` is missing after
|
||||
bootstrap, open a new terminal to pick up the installed tools.
|
||||
|
||||
1. Run `dot profile` and `bw status`. Check the server URL before signing in.
|
||||
|
||||
| Profile | Vaultwarden server |
|
||||
| --- | --- |
|
||||
| `full`, `headless` | `https://vault.godemperordoge.org` |
|
||||
| `full-work` | `https://vault.etvamerica.com` |
|
||||
|
||||
If the server is wrong and the CLI is already signed in, run `bw logout`
|
||||
and `unset BW_SESSION`. Then configure the matching URL. For example, on a
|
||||
personal machine:
|
||||
|
||||
```bash
|
||||
bw --nointeraction config server https://vault.godemperordoge.org
|
||||
bw status
|
||||
```
|
||||
|
||||
For a custom instance, set `BW_SERVER` to the same URL in the shell where
|
||||
you run `dot secrets`.
|
||||
|
||||
2. If you are logged out, sign in with your vault email and master password.
|
||||
The CLI prompts for the password and any supported two-step code. Capture
|
||||
the session key without printing it:
|
||||
|
||||
```bash
|
||||
BW_SESSION="$(bw login 'your-vault-email@example.com' --raw)" && export BW_SESSION
|
||||
```
|
||||
|
||||
If password login is blocked by your sign-in method, use your **personal
|
||||
API key** from **Settings → Security → Keys** in the web vault. Enter the
|
||||
client ID and secret at the CLI prompts, then unlock with your master
|
||||
password.
|
||||
|
||||
```bash
|
||||
bw login --apikey &&
|
||||
BW_SESSION="$(bw unlock --raw)" && export BW_SESSION
|
||||
```
|
||||
|
||||
If `bw status` already shows `locked`, skip login and run only
|
||||
`BW_SESSION="$(bw unlock --raw)" && export BW_SESSION`. If it shows
|
||||
`unlocked` in this terminal and the server is correct, continue.
|
||||
|
||||
3. Check that `bw status` shows `unlocked` and the expected server. Import
|
||||
the dotfiles secrets, then lock the vault when finished.
|
||||
|
||||
```bash
|
||||
dot secrets pull
|
||||
bw lock
|
||||
unset BW_SESSION
|
||||
```
|
||||
|
||||
Use `dot secrets pull --wireguard` in place of `dot secrets pull` only if
|
||||
you also want to import the saved WireGuard connections into NetworkManager.
|
||||
The session key belongs in the current terminal only. See the
|
||||
[Bitwarden CLI guide](https://bitwarden.com/help/cli/) for login and unlock
|
||||
details, and [Git authentication](docs/git-auth.md) for the separate Git
|
||||
credential sessions.
|
||||
|
||||
After importing your secrets:
|
||||
|
||||
```bash
|
||||
bw login && export BW_SESSION=$(bw unlock --raw)
|
||||
dot secrets pull # ~/.ssh/id_ed25519, secrets.env, Claude/pi MCP config
|
||||
dot secrets pull --wireguard # also import WireGuard connections into NetworkManager (sudo)
|
||||
dot boxes # distrobox: general (Fedora), etv (AlmaLinux 10)
|
||||
dot boxes # create the general and etv Distrobox containers
|
||||
dot doctor
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user