vaultwarden
Unofficial Bitwarden-compatible password manager written in Rust
About this chart
Vaultwarden Helm Chart
Vaultwarden is an unofficial Bitwarden-compatible server written in Rust. It is lightweight, self-hosted, and provides a complete password management solution without requiring enterprise licensing.
TL;DR
helm repo add scripton-charts https://scriptonbasestar-container.github.io/sb-helm-charts
helm install my-vaultwarden scripton-charts/vaultwarden
Introduction
This chart bootstraps a Vaultwarden deployment on a Kubernetes cluster using the Helm package manager.
Key Features:
- 🔐 Complete password manager (personal & organizations)
- 🗄️ Dual-mode support: SQLite (embedded) or PostgreSQL/MySQL (external)
- 📦 Auto-switching: StatefulSet for SQLite, Deployment for external DB
- 🔒 Production-ready with 2FA, WebAuthn, SMTP, and admin panel
- 🚀 Lightweight and fast (Rust-based)
Prerequisites
Deployment Scenarios
This chart includes three pre-configured deployment scenarios optimized for different use cases:
Home Server (values-home-single.yaml)
Minimal resources for personal servers, home labs, Raspberry Pi, or Intel NUC:
helm install vaultwarden-home charts/vaultwarden \
-f charts/vaultwarden/values-home-single.yaml
Resource allocation: 50-250m CPU, 128-256Mi RAM, 5Gi storage
Startup Environment (values-startup-single.yaml)
Balanced configuration for small teams, startups, and development environments:
helm install vaultwarden-startup charts/vaultwarden \
-f charts/vaultwarden/values-startup-single.yaml
Resource allocation: 100-500m CPU, 256-512Mi RAM, 10Gi storage
Production HA (values-prod-master-replica.yaml)
High availability deployment with PostgreSQL and enhanced security:
helm install vaultwarden-prod charts/vaultwarden \
-f charts/vaultwarden/values-prod-master-replica.yaml \
--set postgresql.external.password=your-db-password \
--set postgresql.external.host=postgres.default.svc.cluster.local
Features: PostgreSQL support, PodDisruptionBudget, NetworkPolicy, ServiceMonitor
Resource allocation: 250m-1000m CPU, 512Mi-1Gi RAM, 20Gi storage
For detailed comparison and configuration examples, see the Scenario Values Guide.
- Kubernetes 1.19+
- Helm 3.0+
- PV provisioner support in the underlying infrastructure (for persistence)
- (Optional) External PostgreSQL 12+ or MySQL 5.7+ database
Versioning
| Chart Version | App Version | Kubernetes | Helm | Notes |
|---|---|---|---|---|
| 0.1.0 | 1.34.3 | 1.19+ | 3.0+ | Initial release with dual-mode support |
Installing the Chart
Basic Installation (SQLite mode)
To install the chart with the release name my-vaultwarden:
helm install my-vaultwarden scripton-charts/vaultwarden
Production Installation (PostgreSQL)
For production deployments with external PostgreSQL:
helm install my-vaultwarden scripton-charts/vaultwarden \
--set sqlite.enabled=false \
--set postgresql.enabled=true \
--set postgresql.external.host=postgres.default.svc \
--set postgresql.external.password=strongpassword \
--set vaultwarden.domain=https://vault.example.com \
--set ingress.enabled=true \
--set ingress.hosts[0].host=vault.example.com
Uninstalling the Chart
To uninstall/delete the my-vaultwarden deployment:
helm delete my-vaultwarden
Configuration
Basic Parameters
| Parameter | Description | Default |
|---|---|---|
replicaCount | Number of Vaultwarden replicas (Deployment mode only) | 1 |
image.repository | Vaultwarden image repository | vaultwarden/server |
image.tag | Vaultwarden image tag | 1.34.3 |
image.pullPolicy | Image pull policy | IfNotPresent |
Vaultwarden Configuration
| Parameter | Description | Default |
|---|---|---|
vaultwarden.domain | Domain URL for web-vault (REQUIRED) | "" |
vaultwarden.admin.enabled | Enable admin panel | true |
vaultwarden.admin.token | Admin token (argon2 PHC string) | "" (random) |
vaultwarden.admin.disableAdminToken | Disable admin authentication (NOT RECOMMENDED) | false |
SMTP Configuration
| Parameter | Description | Default |
|---|---|---|
vaultwarden.smtp.enabled | Enable SMTP for email notifications | false |
vaultwarden.smtp.host | SMTP server hostname | "" |
vaultwarden.smtp.port | SMTP server port | 587 |
vaultwarden.smtp.security | SMTP security (starttls, force_tls, off) | starttls |
vaultwarden.smtp.username | SMTP username | "" |
vaultwarden.smtp.password | SMTP password | "" |
vaultwarden.smtp.from | From email address | "" |
vaultwarden.smtp.fromName | From name | Vaultwarden |
Sign-up Configuration
| Parameter | Description | Default |
|---|---|---|
vaultwarden.signups.allowed | Allow new user registrations | true |
vaultwarden.signups.verifySignup | Require email verification | false |
vaultwarden.signups.allowedDomains | Allowed email domains (comma-separated) | "" (all) |
vaultwarden.signups.allowInvitations | Allow invitations even if signups disabled | true |
Security Settings
| Parameter | Description | Default |
|---|---|---|
vaultwarden.security.require2FA | Require 2FA for all users | false |
vaultwarden.security.showPasswordHint | Show password hints | true |
vaultwarden.security.websocketEnabled | Enable WebSocket notifications | true |
vaultwarden.security.iconService | Icon download service | internal |
vaultwarden.security.disableIconDownload | Disable icon downloads | false |
Database Configuration
SQLite Mode (Default)
| Parameter | Description | Default |
|---|---|---|
sqlite.enabled | Use embedded SQLite database | true |
PostgreSQL Mode
| Parameter | Description | Default |
|---|---|---|
postgresql.enabled | Use external PostgreSQL | false |
postgresql.external.host | PostgreSQL hostname | "" |
postgresql.external.port | PostgreSQL port | 5432 |
postgresql.external.database | Database name | vaultwarden |
postgresql.external.username | Database username | vaultwarden |
postgresql.external.password | Database password | "" (REQUIRED) |
MySQL Mode
| Parameter | Description | Default |
|---|---|---|
mysql.enabled | Use external MySQL/MariaDB | false |
mysql.external.host | MySQL hostname | "" |
mysql.external.port | MySQL port | 3306 |
mysql.external.database | Database name | vaultwarden |
mysql.external.username | Database username | vaultwarden |
mysql.external.password | Database password | "" (REQUIRED) |
Persistence Configuration
| Parameter | Description | Default |
|---|---|---|
persistence.enabled | Enable persistence | true |
persistence.data.enabled | Enable data directory persistence | true |
persistence.data.size | Data PVC size | 1Gi |
persistence.data.storageClass | Data storage class | "" |
persistence.data.existingClaim | Use existing PVC for data | "" |
persistence.data.accessMode | Access mode | ReadWriteOnce |
Service Configuration
| Parameter | Description | Default |
|---|---|---|
service.type | Kubernetes service type | ClusterIP |
service.ports | Service ports (http, websocket) | See values.yaml |
Ingress Configuration
| Parameter | Description | Default |
|---|---|---|
ingress.enabled | Enable ingress | false |
ingress.className | Ingress class name | "" |
ingress.annotations | Ingress annotations | {} |
ingress.hosts | Ingress hosts | [] |
ingress.tls | Ingress TLS configuration | [] |
Resource Configuration
| Parameter | Description | Default |
|---|---|---|
resources.limits.cpu | CPU limit | 1000m |
resources.limits.memory | Memory limit | 512Mi |
resources.requests.cpu | CPU request | 100m |
resources.requests.memory | Memory request | 128Mi |
Deployment Modes
This chart automatically switches between two deployment modes:
StatefulSet Mode (SQLite)
When: sqlite.enabled=true (default)
Characteristics:
- Uses StatefulSet for stable storage
- Data stored in PVC via volumeClaimTemplates
- Single replica (SQLite doesn't support clustering)
- Headless service for DNS stability
Best for:
- Home servers, personal use
- Small teams (< 10 users)
- Simple deployments without external database
Deployment Mode (PostgreSQL/MySQL)
When: postgresql.enabled=true OR mysql.enabled=true
Characteristics:
- Uses Deployment (stateless workload)
- Data stored in external database
- Supports multiple replicas (with autoscaling)
- Optional PVC for attachments only
Best for:
- Production environments
- High availability requirements
- Large teams and organizations
Examples
Example 1: Home Server (SQLite)
helm install vaultwarden scripton-charts/vaultwarden \
--set vaultwarden.domain=http://vault.local \
--set vaultwarden.signups.allowed=true \
--set persistence.data.size=5Gi
Example 2: Production with PostgreSQL and Ingress
helm install vaultwarden scripton-charts/vaultwarden \
--set sqlite.enabled=false \
--set postgresql.enabled=true \
--set postgresql.external.host=postgres.database.svc \
--set postgresql.external.password=strongpassword \
--set vaultwarden.domain=https://vault.example.com \
--set vaultwarden.smtp.enabled=true \
--set vaultwarden.smtp.host=smtp.gmail.com \
--set [email protected] \
--set vaultwarden.smtp.password=smtp-password \
--set [email protected] \
--set ingress.enabled=true \
--set ingress.className=nginx \
--set ingress.annotations."cert-manager\.io/cluster-issuer"=letsencrypt-prod \
--set ingress.hosts[0].host=vault.example.com \
--set ingress.hosts[0].paths[0].path=/ \
--set ingress.hosts[0].paths[0].pathType=Prefix \
--set ingress.tls[0].secretName=vaultwarden-tls \
--set ingress.tls[0].hosts[0]=vault.example.com
Example 3: Custom Configuration File
# custom-values.yaml
vaultwarden:
domain: "https://vault.example.com"
admin:
enabled: true
token: "" # Will generate random token
smtp:
enabled: true
host: "smtp.sendgrid.net"
port: 587
security: "starttls"
username: "apikey"
password: "SG.xxx"
from: "[email protected]"
signups:
allowed: false
allowInvitations: true
allowedDomains: "example.com,example.org"
security:
require2FA: true
websocketEnabled: true
sqlite:
enabled: false
postgresql:
enabled: true
external:
host: "postgres-ha.database.svc"
port: 5432
database: "vaultwarden"
username: "vaultwarden"
password: "strong-db-password"
persistence:
data:
size: 10Gi
storageClass: "fast-ssd"
ingress:
enabled: true
className: "nginx"
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: "50m"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
hosts:
- host: vault.example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: vaultwarden-tls
hosts:
- vault.example.com
resources:
limits:
cpu: 2000m
memory: 1Gi
requests:
cpu: 500m
memory: 512Mi
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 5
targetCPUUtilizationPercentage: 70
helm install vaultwarden scripton-charts/vaultwarden -f custom-values.yaml
Initial Setup
After installation, complete the setup:
-
Access Vaultwarden Web UI:
kubectl port-forward svc/vaultwarden 8080:80Open http://localhost:8080
-
Create Your First Account:
- Register a new account (if signups enabled)
- Or use invitation system if signups disabled
-
Configure Admin Panel:
- Navigate to /admin
- Retrieve admin token:
kubectl get secret vaultwarden -o jsonpath='{.data.admin-token}' | base64 -d - Configure SMTP, sign-up policies, and security settings
-
Set Up SMTP (Recommended):
- Required for password resets and invitations
- Update values.yaml with SMTP configuration
- Test email sending from admin panel
-
Enable Two-Factor Authentication:
- Available methods: Authenticator, Email, FIDO2, YubiKey, Duo
- Enable from account settings
Operational Commands
This chart includes operational commands via Makefile.
Access & Debugging
# Port forward to localhost
make -f make/ops/vaultwarden.mk vw-port-forward
# View logs
make -f make/ops/vaultwarden.mk vw-logs
# Open shell
make -f make/ops/vaultwarden.mk vw-shell
# Restart deployment
make -f make/ops/vaultwarden.mk vw-restart
Admin Panel
# Get admin token
make -f make/ops/vaultwarden.mk vw-get-admin-token
# Access admin panel (via port-forward)
make -f make/ops/vaultwarden.mk vw-admin
Database Operations
# Backup database (SQLite mode)
make -f make/ops/vaultwarden.mk vw-backup-db
# Restore database (SQLite mode)
make -f make/ops/vaultwarden.mk vw-restore-db FILE=tmp/vaultwarden-backups/db.sqlite3
# Check database connection (PostgreSQL/MySQL mode)
make -f make/ops/vaultwarden.mk vw-db-test
Monitoring
# Show resource usage
make -f make/ops/vaultwarden.mk vw-stats
# Describe pod
make -f
Deploy vaultwarden with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has vaultwarden on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartvaultwarden is pinned at v0.4.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply