Suppose your product runs on one VPS: an app container, Postgres, maybe a worker. The database password lives in three .env files and once, by accident, in a commit you have since rewritten. Nothing is on fire. But every one of those passwords is permanent, nobody can tell you who read it last, and rotating it means editing three files and restarting two services at a moment you pick in advance on a calendar.
A secrets manager is the tool for that, and the usual objection is that running one is a whole second system. It is not: OpenBao (the Linux Foundation fork of Vault) is one container with raft storage on a named volume, no external database, no cluster. The full build with every command is in the guide linked at the end. What follows is the part that is worth knowing before you start it, because the numbers are small and the traps are quiet.
The numbers are not the problem
Measured on an ordinary VPS across repeated runs, verified 2026-11-17: boot to an active, unsealed server took 8.0–9.9 s, and idle memory sat between 22.8 and 40.3 MiB. The raft snapshot of a store with one KV secret, one database config and one role was 25,113 bytes, the same size in two separate runs. An AppRole login round trip took 0.18–0.22 s and issuing a dynamic Postgres credential 0.17–0.19 s. For comparison, the Postgres 17 container it hands credentials for idles at 24.0 MiB.
That spread in memory is election and page-cache timing right after unseal, not a leak. A single-node raft install with an idle API sits in the low tens of megabytes, which is less than most people budget for a log shipper.
Two traps that cost real time
The first is that Vault tutorials lie to you by omission. The dev server mounts secret/ for you; a production OpenBao server does not. bao secrets list returns cubbyhole/, identity/ and sys/, and your first kv put secret/app/db fails with a 404 on a path that looks like it should exist. One command fixes it, but only if you know that is the shape of the failure.
The second is worse because it fails silently. Dynamic database credentials are the feature that justifies the container: the app asks for a user, the database gets one with a short lease, and revoking the lease drops it. Except my first role definition had only creation_statements, and bao lease revoke answered "All revocation operations queued successfully!" while the user stayed in the database with a working password. The log had the reason (SQLSTATE 2BP01: the role cannot be dropped because the GRANT USAGE ON SCHEMA public depends on it), and the lease was being retried in the background the whole time. Success messages are not evidence. Add DROP OWNED BY before DROP ROLE, then verify pg_roles has zero rows for that user afterwards.
What I'd change
Use 5 key shares with a threshold of 3, not 1/1. The test used a single unseal key because it was a test; in production one lost key should not lose the store and one stolen key should not open it.
Write the unseal into the restart runbook. There is no auto-unseal without a KMS, so the container comes up sealed on every boot, health returns 503, and someone gets paged at 3 a.m. for a service that is running perfectly and simply locked.
And when you rotate the Postgres root password, test password auth from a second container. The official postgres image trusts 127.0.0.1, so a psql run inside it authenticates no matter what password you pass, so the wrong-password control test "succeeded" too. Connecting over the Docker network is what actually proves the rotation worked.
Top comments (1)
The measured footprint is a useful counterweight to the 'a secrets manager is a second system' objection. With dynamic Postgres credentials, I'd also set a short TTL and make sure the app handles credential renewal or reconnects when a lease expires, since connection pools that cache the original password are a common way this setup fails quietly. How are you handling pool refresh on the app side?