Skip to content

Configuration Reference

All configuration is done through environment variables in the app/.env file (or via container environment variables).

Required Variables

VariableDescription
VAULT_ADDRHashiCorp Vault server URL (e.g. http://vault:8200)

At least one of the following is required for background services:

VariableDescription
VAULT_SYSTEM_TOKENStatic Vault token for system operations
VAULT_K8S_AUTH_ROLEKubernetes auth role name (preferred in K8s deployments)

Application Settings

VariableDefaultDescription
PORT3001HTTP port to listen on
NODE_ENVproductiondevelopment or production
VAULT_SKIP_TLS_VERIFYfalseSkip TLS certificate verification
CORS_ORIGINAllowed CORS origin (only needed if frontend is on a different origin)

Config Storage

VaultLens stores its own configuration (branding, webhooks, rotation schedules, AppRole credentials) in a local file backend (config.ini).

VariableDefaultDescription
VAULTLENS_CONFIG_PATH/configDirectory for config.ini and logo blobs
VAULTLENS_BACKUP_PATH/backupsDirectory for backup JSON files

Kubernetes Auth

VariableDefaultDescription
VAULT_K8S_AUTH_ROLEK8s auth role (replaces VAULT_SYSTEM_TOKEN)
VAULT_K8S_AUTH_MOUNTkubernetesVault Kubernetes auth mount path
VAULT_K8S_TOKEN_PATH/var/run/secrets/kubernetes.io/serviceaccount/tokenService account token path

Rate Limiting

VariableDefaultDescription
RATE_LIMIT_MAX500Max API requests per window (all /api/* routes)
RATE_LIMIT_WINDOW_MS900000Rate limit window in ms (15 minutes)
SHARING_RATE_LIMIT_MAX20Per-minute limit for the public sharing endpoint

Audit & Webhooks

VariableDefaultDescription
VAULT_AUDIT_LOG_PATHPath to Vault audit log file (required for webhook notifications)

System Token Resolution Order

VaultLens resolves the system token in this priority order:

  1. Kubernetes auth (VAULT_K8S_AUTH_ROLE) — auto-renews at 75% TTL
  2. AppRole — credentials generated by the setup wizard and stored encrypted in config storage
  3. Static token (VAULT_SYSTEM_TOKEN) — fallback for simple deployments

Example: Minimal Docker Setup

bash
VAULT_ADDR=http://vault:8200
VAULT_SYSTEM_TOKEN=hvs.your-token-here

Example: Kubernetes Setup

bash
VAULT_ADDR=http://vault.vault.svc.cluster.local:8200
VAULT_K8S_AUTH_ROLE=vaultlens

Released under the GPL-3.0 License.