Vault — Runbook
Vault must be unsealed after every restart. Auto-unseal handles this automatically via Proxmox hook script — manual unseal is only needed if auto-unseal fails.
Secrets
Write a secret
Use the Vault Write Secret workflow in Forgejo Actions (workflow_dispatch):
| Input | Description | Example |
|---|---|---|
path |
Path under secret/ |
gluetun/nordvpn |
data |
JSON key-value pairs | {"key": "value", "key2": "value2"} |
patch |
Merge keys instead of overwrite | true / false (default) |
- Overwrite (default): replaces all keys at the path
- Patch: adds or updates specific keys, leaves others untouched
The workflow uses VAULT_TOKEN from Forgejo Actions secrets.
Claude Bot Token
Claude Code authenticates to Vault using a dedicated periodic token (policy: claude, 720h period, auto-renews).
Bootstrap / rotate the token
- Run the Bootstrap Claude Vault Token workflow in Forgejo Actions (
workflow_dispatch, no inputs) - The workflow creates the
claudepolicy (if missing) and generates a new periodic token - The token is stored at
secret/claude/vault-tokenand printed in the job logs - Update
~/.claude/settings.jsonon the workstation:{ "env": { "VAULT_TOKEN": "<token from step 3>", "VAULT_ADDR": "http://192.168.1.106:8200" } } - Restart Claude Code for the new token to take effect
Verify token works
curl -s -H "X-Vault-Token: $VAULT_TOKEN" \
"http://192.168.1.106:8200/v1/auth/token/lookup-self" | python3 -c \
"import json,sys; d=json.load(sys.stdin)['data']; print(f'display_name={d[\"display_name\"]} policies={d[\"policies\"]} ttl={d[\"ttl\"]}s')"
Status
Check seal status
ssh [email protected] "VAULT_ADDR=http://127.0.0.1:8200 /usr/local/bin/vault status"
Restart
ssh [email protected] "pct exec 106 -- rc-service vault restart"
Remember: auto-unseal fires on LXC start via the Proxmox hook script. If restarting the service (not the LXC), unseal manually.
Unseal
Manual unseal (if auto-unseal fails)
ssh [email protected]
export VAULT_ADDR=http://127.0.0.1:8200
vault operator unseal # run 3 times with 3 different unseal keys
Unseal keys are stored on chizuru at /etc/vault/unseal-keys.
Logs
| Log | Contents | Location | Loki query | Format |
|---|---|---|---|---|
| Vault server | Auth events, seal/unseal, secret access, policy changes, errors | LXC 106 /var/log/vault.log |
Not in Loki | Plain text |
| Auto-unseal hook | Unseal script output after LXC start | Proxmox host /var/log/vault-unseal.log |
Not in Loki | Plain text |
Notes:
- Vault runs on Alpine LXC 106 and writes to a file, not systemd journal — it's the one remaining service without Loki forwarding
- SSH access: ssh [email protected] "tail -f /var/log/vault.log"
- Auto-unseal log: ssh [email protected] "cat /var/log/vault-unseal.log"
Troubleshooting
Vault sealed after LXC restart
Auto-unseal should have fired. Check the hook script ran:
ssh [email protected] "cat /var/log/vault-unseal.log"
VAULT_TOKEN expired / permission denied in workflows
The VAULT_TOKEN Actions secret may have expired or been rotated. Generate a new token, update the Forgejo Actions secret, and re-run the failing workflow.
Cannot reach Vault at https://vault.eva-00.network
- Check Caddy is running:
ssh [email protected] "caddy status"(or viasystemctl) - Check Vault LXC is up:
ssh [email protected] "pct status 106" - Check Vault is unsealed: see Check seal status above