Migration Playbook: From dotenv / git-crypt / sops to xenvsync
Published March 27, 2026 · 10 min read · Migration Guide
Before You Start
Migrating secret management is high-stakes work. The goal of this playbook is to make each phase independently reversible. You should be able to complete Phase 1 and stop, run both systems in parallel during Phase 2, and only cut over fully in Phase 4 once you have validated that xenvsync works end-to-end in your environment.
Estimated timeline: One sprint (one week) for most teams. The bottleneck is usually CI validation and getting all team members to generate identities — not the technical setup.
From plaintext .env
1–2 days
Fastest path — nothing to replace, just add encryption.
From dotenv-vault
2–3 days
Need to export secrets from service and re-encrypt locally.
From git-crypt / sops
3–5 days
Decrypt existing vault, re-encrypt with xenvsync, validate CI.
Phase 1: Inventory and Install
Before touching any secrets, understand what you have. List every .env file, vault artifact, and CI secret in use. This inventory becomes your test checklist in Phase 4.
Phase 2: Encrypt One Non-Production Environment
Start with staging or dev — never production first. This lets you validate the full push/pull/run cycle with low risk. Run the old and new systems in parallel until you are confident.
Phase 3: Transition CI to Runtime Key Injection
Update one CI job to use xenvsync. Store the key value as a CI secret and write it to a file at runtime. Validate that the job passes before updating all jobs.
Phase 3b: Set Up Team Keys (if using team sharing)
If you are moving away from a shared-key model, have each team member generate their X25519 identity now. Collect all public keys before re-pushing the vault.
Phase 4: Validate and Cut Over
Run this checklist before removing the old system:
Rollback Plan
Because each phase is additive (you never delete the old system until Phase 4), rollback at any phase is straightforward:
- –Phase 1 rollback: Nothing changed — just delete .xenvsync.key and the vault files.
- –Phase 2 rollback: Revert the vault commit. The old system is still functional.
- –Phase 3 rollback: Revert the CI job change. Old secrets variables are still there.
- –Phase 4 rollback: If you did not delete old artifacts, revert the commit and restore the old CI variables.
Migration from Specific Tools
From plaintext .env files
Fastest path. Just run xenvsync init and xenvsync push. The .gitignore update happens automatically. Run Phase 2–4 in a single day.
From dotenv-vault
Export your decrypted secrets from the dotenv-vault service into a local .env file. Then run xenvsync init and push. The key difference: xenvsync never calls an external service — the vault is self-contained in your repo.
From git-crypt
Run git-crypt unlock to decrypt the repo, copy the plaintext secrets to a temporary .env file, then run xenvsync init and push. After validating, remove the git-crypt filter configuration from .gitattributes.
From sops
Run sops --decrypt secrets.yaml to extract plaintext values. Convert to KEY=VALUE format in a .env file. Then follow the standard xenvsync init and push flow. For teams already using age keys, note that X25519 key derivation in xenvsync is independent of age key format.