Deploying the Hyperswitch card vault in production: what it involves
A team self-hosting Hyperswitch that needs to save cards has to decide whether the card vault, also called the locker, can go live safely, and that decision comes before any card data is stored. According to the Hyperswitch architecture docs, the card vault is a separate Rust service kept in its own repository, juspay/hyperswitch-card-vault, and it is the component built for PCI DSS requirements. It is distinct from the Rust core app server, which handles routing, retries, vaulting and observability, and from the encryption service used for key management. That separation matters for production: the locker needs its own compute, its own database and its own network controls, so it cannot be treated as a feature switched on inside the app server.
Choosing the locker is also a scope decision. Hyperswitch documents three self-hosted vault models: the native Hyperswitch Vault run in-house, an external PCI vault provider such as VGS or Tokenex, and the SaaS Hyperswitch Vault. In the in-house model, the Hyperswitch docs state that the merchant is fully responsible for PCI DSS certification and data handling. A team that wants to keep card data in its own environment needs to plan for that responsibility, while a team that prefers to hand cards to a provider takes on a different set of dependencies. Confirm the current wording of each model in the vault deployment pages before you commit, since the obligations under each one shape the rest of the build.
How the app server, vault, database and secrets backend connect
The diagram starts at the Router app server, which handles payment requests and hands card data to the card vault over its own TLS endpoint. The Router and Scheduler both use PostgreSQL and Redis on the main side, while the vault keeps card data in a separate database inside a trust boundary. The vault reads its keys from the secrets backend, so the key path is the part to verify first. Confirm every hand-off against the chart and docs you deploy, because this is a simplified view.
Simplified view of the main side, the vault boundary and the key path; confirm against your chart.
Secrets backend options and when each fits
This table compares the four places the vault's key material can be held: the chart's local configuration, a cloud KMS, HashiCorp Vault and an HSM-backed layer. Read each row for the conditions where it fits and the operational work it adds. The main takeaway is that this choice decides who runs key custody and recovery, so settle it before the first saved card is written.
| Option | When it fits | What it adds to operations | Read next |
|---|---|---|---|
| Chart local configuration | Test or proof-of-concept stands where keys can live in chart configuration under your control | Your secret handling, GitOps access and config review must cover the key path. Confirm the chart's exact settings for your release. | Key custodians and unlocking the locker |
| Cloud KMS | Your cluster and vault run in one cloud, and your team already operates that provider's key and IAM services | Adds cloud account, region, key policy and workload identity decisions to the runbook, and ties recovery to the provider's account controls | Using AWS KMS with the Hyperswitch card vault and encryption service |
| HashiCorp Vault | You already run a Vault cluster in your data center or cloud and want one secrets platform for the vault | Adds Vault high availability, token and URL management, and a separate upgrade and backup cycle that your platform team owns | Using HashiCorp Vault for Hyperswitch key management |
| HSM-backed layer | Your assessor or internal policy requires hardware-held key material and documented custodian procedures | Adds hardware procurement, firmware management, audit logging procedures and a dependency on HSM availability for unlock | Integrating an HSM with Hyperswitch key management |
| Any backend | Required whichever option you choose, because the vault cannot serve cards until its keys are unlocked | Custodians must unlock the vault after each restart, so write the unlock sequence and custodian-leaves runbook before go-live | Hyperswitch card vault key custodians and unlocking the locker |
Why the locker needs its own compute and database
The card vault (locker) should run as its own service with its own compute and its own database, not as a schema inside the app server's PostgreSQL or as extra containers in the app server's pods. The Hyperswitch architecture docs describe the card vault as a separate Rust service in its own repository, distinct from the Router and Scheduler services that make up the app server. That separation is what lets you control who and what can reach the place where encrypted card data is stored. If the vault shares a database role, a Kubernetes namespace or a network path with the app server, every workload that can reach the app server can also reach the vault's data path, and your access review has to cover both at once.
Plan the vault network before you deploy it. Decide which services may call the vault (normally only the app server's Router workloads that save or retrieve cards), which administrators may reach its database and its host, and which network segments sit between them. Write those rules as Kubernetes NetworkPolicy or equivalent firewall rules, and give the vault its own database user and its own database, so a compromised application role cannot read the card tables. Confirm with Juspay's current vault documentation exactly which endpoints the app server calls, since the specific interfaces may change between releases.
The same boundary sets your PCI DSS scope. In the self-hosted, in-house PCI model, the Hyperswitch docs state that the merchant is fully responsible for PCI DSS certification and data handling, so the vault, its database, its hosts and the paths into them are all in scope for your assessment. A separate vault with narrow network paths lets you define that scope precisely and show an assessor where cardholder data lives. Ask your QSA or internal assessor to review the boundary diagram before go-live, and record who is authorized to reach the vault network and how that access is reviewed.
How to deploy the vault step by step
This sequence takes a cluster and a dedicated database from empty infrastructure to a card vault that accepts encrypted card data, with a check at each stage so no saved card is stored before the vault is verified. Each step names who does it and what proves it is done.
Confirm the Kubernetes cluster and version fit
Platform engineering confirms that the cluster is one the Hyperswitch Helm charts support, that its Kubernetes minor version is one the project still maintains, and that the nodes, namespaces and network policies for the vault are separate from the app server namespace. Check the Kubernetes releases page for the current support window and the self-hosting docs for the chart's stated requirements. Done when a test pod deploys into the planned namespace under the intended Pod Security Standards level and the cluster's version is on the supported list.
Provision a dedicated PostgreSQL instance for the vault
The database team creates a PostgreSQL instance used only by the card vault, separate from the router and scheduler database, with its own credentials, backups and access list. Choose a major version that is still in support on the PostgreSQL versioning policy page on the day you go live, and confirm the connection settings with the self-hosting docs. Done when a connection from the vault namespace succeeds over an encrypted connection and a restore test from a backup of this instance completes.
Issue and install TLS certificates for the vault endpoint
The security or platform team issues a certificate for the internal vault hostname from your certificate authority, installs it as a Kubernetes secret, and sets the chart's TLS values as documented in the self-hosting guide. Record the certificate owner, expiry date and renewal process in your inventory. Done when the vault endpoint presents the expected certificate chain from inside the cluster and the app server trusts the issuing authority.
Select and configure the secrets backend
The security team chooses where the vault's master key material lives, such as a cloud KMS, HashiCorp Vault or an HSM-backed option, based on your hosting and key custody requirements. Confirm which backends the chart version supports and what each needs in configuration, including access roles, endpoints and key identifiers, with the self-hosting docs. Done when the vault service account can call the chosen backend with least-privilege permissions and a test encrypt and decrypt round trip succeeds.
Generate and wire the JWE keys into the app server
Following the custodian procedure your organization has agreed, generate the JWE key pair for the vault, store the private material only in the chosen secrets backend, and place the matching public key where the app server reads it. Keep key creation records with custodian sign-off. Done when the app server loads the key configuration on restart without errors and the vault and app server report matching key identifiers in their logs.
Deploy the vault chart
The platform team installs the card vault Helm chart into the planned namespace using a values file reviewed against the self-hosting docs, pointing it at the dedicated database, TLS secret and secrets backend configured earlier. Keep the values file in version control and deploy through your normal change process. Done when all vault pods reach the ready state, the health endpoint responds, and the logs show no failed database or backend connections.
Run connectivity and encryption checks
The platform and security teams verify that only the app server can reach the vault, that traffic is encrypted end to end, and that a test card payload is encrypted at write and returned intact at read using a non-production or test card number. Confirm that the database holds only encrypted data and that the vault's logs do not contain card values. Done when network policy tests block other namespaces, the round trip succeeds, and the results are recorded as evidence before any real card is saved.
Security controls for the vault in production
The locker holds real card data, so its surrounding controls matter as much as the vault code itself. The cards below cover the network, cluster access, secret storage, pod runtime, transport, and key access logs that your assessor will ask you to explain.
Restrict network paths to the vault
Only the app server should reach the card vault service, and only on the ports and paths the deployment needs. Use Kubernetes NetworkPolicy or your cluster's equivalent to deny all other ingress to the vault namespace, and keep the vault database reachable only from the vault pods. Check this with a test from an unrelated pod, because a flat cluster network is the most common gap an assessor finds first.
Least-privilege RBAC for Secrets
Secrets are stored unencrypted in etcd by default, so anyone who can read or list them in the vault namespace can read the JWE keys and database credentials. Grant the vault service account only the Secret reads it needs, limit list and watch to a small admin group, and review bindings after every upgrade. Confirm who holds cluster-admin, since that role bypasses namespace restrictions.
Kubernetes Secrets practicesEncryption at rest for etcd
Configure the API server with an encryption configuration so Secret objects are encrypted before they reach etcd, and confirm the key used for this layer is stored and rotated separately from the vault keys. Test the setting by reading a Secret directly from the etcd datastore and confirming the value is not plaintext. Ask your managed Kubernetes provider how etcd encryption is enabled and who controls the key if you use a hosted control plane.
Pod security standards for the vault
Apply the restricted Pod Security Standard to the vault namespace so pods run as non-root, cannot escalate privileges, and drop unneeded Linux capabilities. Set a read-only root filesystem where the image allows it, and avoid host networking and host path mounts. Verify the labels are enforced with a deliberately noncompliant test pod, and check the vault chart values against the benchmark controls for pod hardening.
Pod Security StandardsTLS and certificate rotation
Encrypt traffic between the app server, the vault, and the vault database, and define who issues and renews each certificate. Record expiry dates and automate renewal through your certificate manager, because an expired certificate stops card storage and retrieval at the same time. Test a rotation in a non-production environment before the first live rotation, and confirm the app server reloads trust material without a manual restart.
Audit logging of key access
Enable Kubernetes audit logging for reads and writes to Secrets and ConfigMaps in the vault namespace, and forward those events to a store your security team controls. Log every unlock and key load on the vault side as well, so each key use can be tied to a named operator or service account. Ask your team which events are retained, for how long, and who can delete them, since the audit trail is only useful if it is tamper resistant.
Running the vault database: backups, upgrades and failover
The vault database holds the encrypted card records, so its operating plan matters as much as the vault code itself. Start by choosing a PostgreSQL major version that is still supported for the whole life of the deployment. The PostgreSQL versioning policy lists version 14 as supported only until November 12, 2026, while 15, 16, 17 and 18 run later, with 18 supported until November 14, 2030. Confirm the current list on the PostgreSQL versioning policy page before you pick a version, and plan the first major upgrade before the chosen version reaches end of support. Minor releases do not change the storage format, so applying them means replacing the executables and restarting. Major upgrades need pg_upgrade, a dump and restore, or logical replication, and logical replication can keep downtime to several seconds.
PostgreSQL does not detect a failed primary or promote a standby on its own. If the vault must stay available when the primary fails, you need an external failover tool, a fencing method and a tested procedure for pointing the vault at the new primary. Decide whether the vault accepts a short outage or whether it should stay up through a node loss, and confirm that the vault service reconnects cleanly after a failover. Set up continuous archiving and point-in-time recovery, then restore a copy of the vault database to a separate environment and check that saved cards can still be read through the vault after the restore. Record the restore time you measure, because it sets the realistic recovery window you can promise internally.
Backups of the database alone do not recover saved cards. A restored vault database is only useful with the JWE key material and the secrets backend that unlocks it, so back up and test restores of those together, under the same custodian controls described in the sibling sections. Losing the locker data or its keys means losing saved cards, and the customers who saved them would need to re-enter details. Ask your team to document who can start a restore, where archived WAL and base backups are stored, how long they are retained, and how restores are logged. Run a restore drill on a schedule, and rerun it after each major PostgreSQL upgrade or change to the vault's key configuration.
Limits to confirm in your environment
The card vault sits at the center of your payment scope, and several of its dependencies move with each Hyperswitch release and each cloud or Kubernetes version. The items below are the points to settle with Hyperswitch and your QSA before the first saved card, not values to assume.
Vault chart and app server compatibility
The card vault is a separate service from the Router, so its chart version and image tag must match the app server release you run. Ask Hyperswitch which vault and Router versions are tested together for your target release, and check the compatibility matrix published with each GitHub release. Record both versions in your change ticket so a later upgrade of either one is planned as a pair.
Hyperswitch releasesSecrets backend support in the current chart
Confirm that the chart version you deploy supports your chosen key backend, whether that is a cloud KMS, HashiCorp Vault, OpenBao or an HSM-backed path. Backend options, configuration keys and required IAM or token settings can differ between chart versions, so do not rely on documentation from an earlier release. Ask Hyperswitch whether the backend is supported for the vault service specifically, not only for the encryption service.
TLS termination points
Decide where TLS ends for traffic to the vault: at the ingress controller, at a service mesh sidecar, or inside the vault pod. Card data must be encrypted in transit between the app server and the vault, so an ingress that terminates TLS and forwards in clear text inside the cluster needs a documented justification for your assessor. Ask Hyperswitch which internal connections the chart expects to be encrypted and how certificates are rotated.
Kubernetes version support window
Check the Kubernetes minor version your cluster runs against the support window on the Kubernetes release page, and confirm that Hyperswitch's chart is tested on that version. Kubernetes maintains only the three most recent minor releases, so a cluster on an older version may fall out of support during the life of the vault. Plan your cluster upgrade path so it does not force an unplanned vault change.
Kubernetes releasesSuperposition dependency
The v1.124.0 release notes make Superposition a required configuration dependency, and the deployment must have a Superposition service running before upgrading to that version. Ask Hyperswitch whether your target release needs Superposition for the vault path, and if so, who owns its deployment, database and upgrade. Treat it as an additional component in your scope and availability plan.
Hyperswitch releasesAssessor acceptance of the vault model
Before you build, ask your QSA whether the in-house vault model, with the merchant carrying full PCI DSS responsibility, matches your merchant level and risk appetite. Ask them to confirm how the vault, its database, its key backend and its administrators are placed in scope, and which evidence they expect. Hyperswitch documents that the merchant owns certification in this model, so an assessor's answer shapes the architecture, not only the paperwork.
Questions teams ask before deploying the Hyperswitch vault
What drives the cost of deploying the Hyperswitch card vault?
The cost is driven by the amount of platform work your team must absorb, not by a published fee. The main components are the compute and database the locker needs on its own, the secrets backend you choose, the TLS and network work, the key ceremony and custodian procedures, and the verification effort before the first saved card. Some of this is one-time setup, while the recurring part is operating the locker, rotating keys, applying Hyperswitch releases and running backups. DeployOpen does not publish prices. An engagement is fixed-scope, so ask for a written scope listing each component, who performs it, and which parts recur after go-live.
How long does a Hyperswitch vault deployment take?
Duration depends on the decisions that are still open when the work starts. The biggest variables are whether the secrets backend (a cloud KMS, HashiCorp Vault or an HSM) is already available, whether the Kubernetes cluster and PostgreSQL instance for the locker exist, how many environments you need, and how quickly custodians and security reviewers can sign off on key handling. Hyperswitch ships roughly monthly minor releases, so the target version and the Superposition dependency, which became required in v1.124.0, also affect planning. No duration is stated here. Ask for a timeline in the written scope that lists each dependency and the approvals it needs.
What does the work need from our team?
Your team needs to supply the infrastructure the locker runs on, the people who make decisions about keys, and the evidence your compliance function will review. In practice that means a Kubernetes cluster you control with a supported version, a PostgreSQL service with backups, network paths and TLS certificates, access to your chosen secrets backend, named key custodians, and an owner for the change process. Your security and compliance leads should also agree early on what evidence they need, because the vault's configuration and logs will become part of it. Confirm each item with your platform team before the scope is signed.
Can our team deploy the Hyperswitch card vault without outside help?
A capable platform team can deploy the vault alone if it has Kubernetes, PostgreSQL and secrets management experience and enough time to work through the key handling design. The harder parts are rarely the Helm install. They are the custodian model, the unlock sequence after restarts, backup and restore of the locker database, and producing evidence for a PCI DSS assessment. Consider which skills are missing and whether they are needed once or permanently. A fixed-scope engagement can cover the one-time build and handover, and retainers can cover upgrades and testing afterward. Decide the split in writing.
Does running the Hyperswitch vault remove our PCI DSS scope?
No. Running the vault yourself does not remove PCI DSS scope. In the self-hosted, in-house PCI model, the Hyperswitch documentation states that the merchant is fully responsible for PCI DSS certification and data handling. The vault stores card data, so the locker, its database, its keys, its network paths and the people who can reach them all fall within the assessed environment. Scope reduction comes from the vault model you choose, such as an external PCI vault provider or the SaaS Hyperswitch Vault, and each model moves responsibilities differently. Ask your qualified assessor to confirm the scope boundary before you build.
How do we verify the vault works before the first saved card?
Verify in a non-production environment first, then repeat the core checks in production before any real card is stored. Confirm that the locker pods start, that the JWE keys are loaded into the app server, that TLS works end to end, and that the locker database accepts connections and backups. Store and retrieve a test card in sandbox data only, confirm that raw card values never appear in logs or the database in plain text, and test the unlock sequence after a simulated restart. Record each check and its result so your security team can review them. Ask DeployOpen for the verification checklist in the written scope.
What should we check on the Kubernetes and PostgreSQL layer under the vault?
Engineers should confirm that the locker runs on a Kubernetes version still receiving patches, with a control plane built for high availability and an etcd backup plan, since Kubernetes Secrets are stored unencrypted in etcd by default unless encryption at rest is configured. The locker's PostgreSQL should run a supported major version. PostgreSQL 17 is supported until November 8, 2029, and PostgreSQL 14 until November 12, 2026. Also confirm TLS for database connections, a tested point-in-time recovery procedure, and restrictive RBAC on the namespace holding the JWE keys.
How to verify the vault before the first saved card
Treat the vault as unproven until you have run a saved card round trip end to end in the environment you will go live with. Save a test card through the app server, retrieve it through the same path production traffic will use, and confirm that the token returned to the app server resolves to the expected card reference and nothing else. Run the test against the vault's own compute and database, not a shared development instance, so that the network path, TLS settings and JWE key configuration you wired in are the ones being exercised. Repeat the round trip after any change to the app server or vault configuration, because a key or endpoint mismatch often surfaces only on retrieval.
Next, prove that raw card data is absent where it should never appear. Search app server logs, request traces, error reporting and the app database for the test card number and expiry, including during failed requests such as a declined or malformed save. Confirm that only tokens and masked values are persisted outside the vault. Then check the vault database directly and confirm the card data is stored in encrypted form, not as readable values. Ask your assessor early which evidence they expect for this, since the scope decisions in the PCI DSS work depend on the same answers.
Before go-live, run a restore test of the vault database into a separate environment and confirm that saved cards can still be retrieved from the restored copy. A backup that has never been restored is not evidence of recoverability. Finally, create a documented key custody record that names where the JWE keys and their backups are held, which systems can read them, and who approved their creation. Keep the procedures for custodian roles and the unlock sequence after restarts in the separate runbooks covered in the sibling topics on key custodians and the chosen secrets backend, and link this record to them rather than duplicating their steps. Confirm the exact checks against your own assessor's requirements and the Hyperswitch self-hosting documentation.
How DeployOpen scopes and delivers a Hyperswitch vault deployment
DeployOpen plans, builds, documents and supports self-hosted open-source platforms inside your own cloud accounts, data centers or air-gapped networks. For Deploying the Hyperswitch card vault in production, that means a written scope covering the locker's compute, database, TLS, secrets backend and key wiring, verified before the first saved card.
How we scope
- Confirm which vault model applies, since in-house PCI changes what you carry for PCI DSS
- Record the target infrastructure, Kubernetes distribution, PostgreSQL version and secrets backend in writing
- Agree the verification tests and acceptance criteria before any build work starts
How we build
- Deploy the card vault with its own compute and database, separate from the app server
- Configure TLS, network policy and the chosen secrets backend in your environment
- Wire the JWE keys into the app server and test that a saved card round-trips correctly
How we hand over
- Deliver runbooks for deployment, key handling, backups and restore tests for the vault
- Document the evidence your compliance and security teams need for PCI DSS assessment preparation
- Walk your platform and security staff through the setup and the verification results
How we support
- Offer ongoing support, upgrades and continuous testing as retainers after handover
- Plan vault upgrades alongside Hyperswitch minor releases and their compatibility matrix
- Retest after changes to keys, secrets backends, Kubernetes versions or database versions

