Vaultwarden: The great Password Manager

Vaultwarden is an unofficial Bitwarden server implementation written in Rust. It's compatible with the official Bitwarden clients and is perfect for self-hosted environments where the official resource-heavy containers might be overkill. If you consider using a SaaS password manager, then look at Bitwarden.
We'll deploy Vaultwarden using the Gissilabs Helm chart, configured with a PostgreSQL database, SMTP for emails, and secured with network policies.
Preparation
First, let's add the Gissilabs Helm repository:
Database Connection
Note
By default Vaultwarden uses SQLite as a database. However, we are using an external PostgreSQL database as it is more reliable and provides better performance.
We are using an external PostgreSQL database. We need to create a Secret to hold the connection string.
Create a file named secret.yaml:
Update the database-url value with your actual database connection string.
Apply it to your cluster:
Configuration
Now, let's configure the Vaultwarden instance. We'll set up the domain, database connection, SMTP settings, and resource limits.
Create a values-overrides.yaml file with the following configuration:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | |
We can now deploy the Vaultwarden instance:
Exposing the Service
Finally, we'll expose Vaultwarden using the Gateway API. This HTTPRoute directs traffic from vaultwarden.mydomain.com to our service.
Security
Configuration update
Once you've deployed the service and conencted with your first use, it's recommended to:
- Update the configuration to disable the registration
- Enable the emergency access
- Disable the admin feature
Optional: Network Security
Because Vaultwarden is better when accessible online, it's better to limit the pod from being able to access anything in your cluster but the minimum. We'll use a CiliumNetworkPolicy to restrict traffic. This policy allows:
- Egress to CoreDNS (UDP 53).
- Egress to the PostgreSQL cluster (TCP 5432).
- Egress to the world (necessary for SMTP, mobile push notifications, and icon fetching).
Cloudflared
Being able to access the service from the internet is a must. And being more protected is also a must. You can use Cloudflared to expose the service.