vaultwarden

by ScriptonBasestar

Helm chartv0.4.0App 1.34.3BSD-3-Clause

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 VersionApp VersionKubernetesHelmNotes
0.1.01.34.31.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

ParameterDescriptionDefault
replicaCountNumber of Vaultwarden replicas (Deployment mode only)1
image.repositoryVaultwarden image repositoryvaultwarden/server
image.tagVaultwarden image tag1.34.3
image.pullPolicyImage pull policyIfNotPresent

Vaultwarden Configuration

ParameterDescriptionDefault
vaultwarden.domainDomain URL for web-vault (REQUIRED)""
vaultwarden.admin.enabledEnable admin paneltrue
vaultwarden.admin.tokenAdmin token (argon2 PHC string)"" (random)
vaultwarden.admin.disableAdminTokenDisable admin authentication (NOT RECOMMENDED)false

SMTP Configuration

ParameterDescriptionDefault
vaultwarden.smtp.enabledEnable SMTP for email notificationsfalse
vaultwarden.smtp.hostSMTP server hostname""
vaultwarden.smtp.portSMTP server port587
vaultwarden.smtp.securitySMTP security (starttls, force_tls, off)starttls
vaultwarden.smtp.usernameSMTP username""
vaultwarden.smtp.passwordSMTP password""
vaultwarden.smtp.fromFrom email address""
vaultwarden.smtp.fromNameFrom nameVaultwarden

Sign-up Configuration

ParameterDescriptionDefault
vaultwarden.signups.allowedAllow new user registrationstrue
vaultwarden.signups.verifySignupRequire email verificationfalse
vaultwarden.signups.allowedDomainsAllowed email domains (comma-separated)"" (all)
vaultwarden.signups.allowInvitationsAllow invitations even if signups disabledtrue

Security Settings

ParameterDescriptionDefault
vaultwarden.security.require2FARequire 2FA for all usersfalse
vaultwarden.security.showPasswordHintShow password hintstrue
vaultwarden.security.websocketEnabledEnable WebSocket notificationstrue
vaultwarden.security.iconServiceIcon download serviceinternal
vaultwarden.security.disableIconDownloadDisable icon downloadsfalse

Database Configuration

SQLite Mode (Default)

ParameterDescriptionDefault
sqlite.enabledUse embedded SQLite databasetrue

PostgreSQL Mode

ParameterDescriptionDefault
postgresql.enabledUse external PostgreSQLfalse
postgresql.external.hostPostgreSQL hostname""
postgresql.external.portPostgreSQL port5432
postgresql.external.databaseDatabase namevaultwarden
postgresql.external.usernameDatabase usernamevaultwarden
postgresql.external.passwordDatabase password"" (REQUIRED)

MySQL Mode

ParameterDescriptionDefault
mysql.enabledUse external MySQL/MariaDBfalse
mysql.external.hostMySQL hostname""
mysql.external.portMySQL port3306
mysql.external.databaseDatabase namevaultwarden
mysql.external.usernameDatabase usernamevaultwarden
mysql.external.passwordDatabase password"" (REQUIRED)

Persistence Configuration

ParameterDescriptionDefault
persistence.enabledEnable persistencetrue
persistence.data.enabledEnable data directory persistencetrue
persistence.data.sizeData PVC size1Gi
persistence.data.storageClassData storage class""
persistence.data.existingClaimUse existing PVC for data""
persistence.data.accessModeAccess modeReadWriteOnce

Service Configuration

ParameterDescriptionDefault
service.typeKubernetes service typeClusterIP
service.portsService ports (http, websocket)See values.yaml

Ingress Configuration

ParameterDescriptionDefault
ingress.enabledEnable ingressfalse
ingress.classNameIngress class name""
ingress.annotationsIngress annotations{}
ingress.hostsIngress hosts[]
ingress.tlsIngress TLS configuration[]

Resource Configuration

ParameterDescriptionDefault
resources.limits.cpuCPU limit1000m
resources.limits.memoryMemory limit512Mi
resources.requests.cpuCPU request100m
resources.requests.memoryMemory request128Mi

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:

  1. Access Vaultwarden Web UI:

    kubectl port-forward svc/vaultwarden 8080:80
    

    Open http://localhost:8080

  2. Create Your First Account:

    • Register a new account (if signups enabled)
    • Or use invitation system if signups disabled
  3. 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
  4. Set Up SMTP (Recommended):

    • Required for password resets and invitations
    • Update values.yaml with SMTP configuration
    • Test email sending from admin panel
  5. 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartvaultwarden is pinned at v0.4.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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