Configuration
Configure Vault for development and production environments.
API Configuration
Create packages/api/.dev.vars:
RP_NAME=Vault
RP_ID=localhost
RP_ORIGIN=http://localhost:5173
| Variable | Description | Default |
|---|---|---|
RP_NAME | Relying Party name for WebAuthn | Vault |
RP_ID | Relying Party ID (domain) | localhost |
RP_ORIGIN | Allowed origin for WebAuthn | http://localhost:5173 |
Web Configuration
Create packages/web/.env:
VITE_API_URL=http://localhost:8787
| Variable | Description | Default |
|---|---|---|
VITE_API_URL | API server URL | http://localhost:8787 |
Production Configuration
For production deployment on Cloudflare:
API (Workers)
Set these in your Cloudflare dashboard or wrangler.toml:
RP_NAME=Vault
RP_ID=vault.oxc.sh
RP_ORIGIN=https://vault.oxc.sh
Web (Pages)
VITE_API_URL=https://vault-api.oxc.sh
CLI Configuration
The CLI stores configuration in ~/.pwm/config.json:
{
"apiUrl": "https://vault-api.oxc.sh",
"token": "...",
"userId": "...",
"email": "user@example.com"
}Override the API URL:
export PWM_API_URL=http://localhost:8787
pwm entry list