Skip to content
bryant-buiPublic

About

Self-hosted, zero-knowledge password manager (Bitwarden-compatible). Runs on Cloudflare Workers + D1/R2 with native Android (Jetpack Compose) & Chrome MV3 apps.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

OpenVault — Own your passwords. Encrypted everywhere.
OpenVault

OpenVault

A free, open-source, zero-knowledge password manager for Android and Chrome.
Self-host your vault on Cloudflare Workers, unlock with biometrics or PIN, and autofill passwords, 2FA & passkeys everywhere.


Android 9.0+ Chrome MV3 Cloudflare Workers License MIT Stars
Support me on Ko-fi

English · Tiếng Việt



Your vault, pinned and ready Passwords, 2FA and passkeys Local security health score Vault-door PIN and biometrics
Master-detail vault and instant autofill Slide-over generator and live 2FA
Plain screenshots, straight from the Android app & Chrome extension
Android Home Android Item Detail Android Watchtower Android Vault-Door Unlock

Home  ·  Item detail  ·  Watchtower  ·  Vault-door unlock



Android Items and Folders Android Password Generator Android Onboarding Android Light Theme

Items & folders  ·  Generator  ·  Onboarding  ·  Light mode



Extension Master-Detail Vault (Dark) Extension Slide-Over Generator

Vault & 2FA detail (Dark)  ·  Slide-over password generator



Extension Watchtower Security Extension 3+3 PIN Unlock

Watchtower audit  ·  3+3 PIN unlock



Extension Vault (Light)   Extension Persistent Side Panel

Light mode popup  ·  Persistent Chrome Side Panel

What it does

Android app

  • Clean 1Password-inspired Material 3 UI in OLED black and light mode
  • Adaptive foldable & tablet layout with a navigation rail and floating detail sheet
  • Vault-door unlock with rotating keyhole, hardware Keystore biometrics and 6-digit PIN
  • System-wide AutofillService and 1-tap Android 14+ Passkeys
  • Built-in 2FA codes (TOTP) with a CameraX QR code scanner
  • Offline-first encrypted Room cache with lightweight 25s revision sync
  • Watchtower health gauge, custom E2EE item icons, FLAG_SECURE and English / Vietnamese UI

Chrome extension

  • Manifest V3 wide master-detail popup (Ctrl+Shift+Y) and persistent Side Panel
  • Instant autofill (Ctrl+Shift+L) for Logins, Credit Cards, Identities, 2FA and Basic Auth
  • Inline PIN / Master unlock and password autosuggest right next to login fields
  • MAIN-world WebAuthn Passkeys synced encrypted across Chrome and Android
  • Slide-over Password Generator for random passwords and memorable passphrases
  • Local Watchtower security score and 3+3 segmented PIN unlock
  • One-click Proton Pass (ZIP / JSON / CSV) and Bitwarden JSON import, plus R2 backup triggers

Zero-knowledge crypto

  • Built around the Bitwarden Official API & Cryptographic Protocol
  • Cross-platform test vectors in spec/test-vectors.json verified in TypeScript and Kotlin
  • Client-side Argon2id (64 MiB, 3 iterations, parallelism 4) or PBKDF2-SHA256 (600,000 iterations)
  • Type 2 AES-256-CBC + HMAC-SHA256 constant-time Encrypt-then-MAC
  • Exact raw RFC 5869 HKDF-Expand ("enc" / "mac"), ES256 P-256 Passkeys and 5-attempt PIN self-destruct

Self-hosted backend

  • Runs serverless at near-zero cost on Cloudflare Workers (Hono) + D1 (SQLite)
  • Automated daily Zero-Knowledge R2 Snapshots (03:00 UTC Cron) with SHA-256 checksums and 30-day retention
  • Personal single-user lock (MAX_USERS=1) and ALLOW_SIGNUP=false lockdown
  • Per-user salted PBKDF2-SHA256 + Worker pepper verified with timingSafeEqual
  • security_stamp-bound JWTs, rotating refresh tokens with replay-theft family revocation, and D1 brute-force rate limiting

Passkeys & Autofill

Create and store WebAuthn / FIDO2 Passkeys right inside your encrypted vault — no vendor lock-in. In Chrome, the MAIN-world bridge intercepts navigator.credentials cleanly; on Android 14+, CredentialProviderService signs you in with one tap after biometric verification. Every passkey private key is encrypted client-side inside the cipher before touching Cloudflare D1, so your passkeys sync seamlessly across browser and phone without exposing keys to the server.

Download & Setup

Platform Version Status
Android 9.0+ 0.8.0 Supported (io.openvault.app)
Chrome / Edge / Brave (MV3) 0.6.0 Supported (extension/dist)
Cloudflare Workers Backend 0.1.0 Supported (Workers + D1 + R2)

Self-hosted backend

Requires Node.js >= 22.18 and a Cloudflare account (Free tier covers Workers + D1; R2 Free 10 GB requires a payment method on file).

npm install --global cf
cf auth login

cd backend
# Create D1 database and R2 backup bucket (replace apac with your closest region if desired)
cf d1 create --name openvault-db --primary-location-hint apac
cf r2 buckets create --name openvault-backups --location-hint apac

# Apply D1 schema migration remotely using the UUID returned by `cf d1 create`
cf d1 migrations apply <YOUR_D1_DATABASE_UUID> --dir ./migrations

# Provision secrets, deploy Worker, then remove the temporary file
node -e "const c=require('node:crypto'),fs=require('node:fs'); fs.writeFileSync('.secrets.tmp.json', JSON.stringify({ JWT_SIGNING_SECRET: c.randomBytes(48).toString('base64url'), PASSWORD_PEPPER: c.randomBytes(48).toString('base64url') }), { mode: 0o600 });"
cf deploy --secrets-file .secrets.tmp.json
rm .secrets.tmp.json

Tip: After registering your personal account, set ALLOW_SIGNUP: bindings.text("false") in backend/cloudflare.config.ts and run cf deploy again to lock down public signup permanently.

Production secrets checklist (read before every deploy)

No secret values are printed, logged, or pasted anywhere in this process — only names and lengths are ever checked. The Worker fails fast at startup if a required secret is missing or too short (validateRequiredSecrets in backend/src/security/env-validation.ts), so a deploy that serves traffic has already proven the length floors below. Use this list to verify and rotate:

  • JWT_SIGNING_SECRET — at least 32 characters, random, unique to this instance. Generate with node -e "console.log(require('node:crypto').randomBytes(48).toString('base64url'))" and set with cf secret put JWT_SIGNING_SECRET (never paste the value into chat, a file, or a log).
  • PASSWORD_PEPPER — at least 32 characters, random, different from the JWT secret. Same generation/storage as above. A missing pepper used to silently degrade to the literal string "undefined" — that fail-open is gone, the Worker now refuses to start instead.
  • JWT_SIGNING_SECRET_PREVIOUS — only when rotating the JWT secret: set it to the old secret (also ≥32 chars when set) before deploying the new JWT_SIGNING_SECRET, so tokens issued just before the rotation still verify. Remove it on the next deploy.
  • Rotation: generate a fresh secret, cf secret put the new value, deploy, confirm login still works, then revoke the old value. All existing JWTs are invalidated when the signing secret changes (users log in again once); changing the pepper invalidates the stored server-side password hashes, so rotate the pepper only together with a master-password change.
  • ALLOW_SIGNUP=false in production (see tip above) and MAX_USERS=1 unless you deliberately run a multi-user instance.
  • R2 bucket not public — verify on the Cloudflare dashboard (not verifiable from code). See docs/backup-encryption.md.
  • Test secrets are test-only: the values in backend/vitest.config.ts exist solely so the miniflare test worker passes startup validation and must never be copied to a real deployment.

Chrome extension

npm install
npm run build:extension
  1. Open chrome://extensions/ in Chrome, Edge, or Brave.
  2. Enable Developer mode in the top-right corner.
  3. Click Load unpacked and select extension/dist.
  4. Pin OpenVault to your toolbar and connect to your Cloudflare Worker URL.

Android app

Open android/ in Android Studio or build a release APK directly with Gradle (JDK 17+):

cd android
./gradlew :app:assembleRelease

Architecture

OpenVault/
├── spec/                    # Bitwarden-compatible crypto specification & shared test vectors
├── packages/crypto-core/    # Shared TypeScript crypto engine (Argon2id/PBKDF2, Type 2, TOTP, Passkey, Importers)
├── backend/                 # Cloudflare Workers (Hono) + D1 (SQLite) + R2 Daily Cron Backups
├── extension/               # Chrome Extension (Manifest V3, React 19 + Tailwind CSS v4)
└── android/                 # Android App (Kotlin + Jetpack Compose + Room + Autofill + Passkeys)

Security & Privacy

Your master password, master key, and decrypted vault items never leave your device. Everything is encrypted client-side before sync, and backend/src/services/backup.ts excludes password hashes and active refresh tokens from daily R2 snapshots. Clipboards automatically clear after your chosen timeout, and PIN unlock wipes local PIN material after failed attempts.

On Android, allowBackup="false" blocks cloud backup extraction, FLAG_SECURE blocks screenshots and screen recordings by default, USE_BIOMETRIC binds vault unlocking to hardware-backed Android Keystore keys, CAMERA is requested solely when scanning 2FA QR codes, and INTERNET is used only to talk to your self-hosted Cloudflare Worker (plus optional website favicons, which can be disabled in Settings). See spec/crypto-spec.md for the full threat model and wire specification.

Contributing

Bug reports, feature ideas, and pull requests are welcome. For major changes, open an issue first to discuss the design.

# Install workspace dependencies and run all TypeScript checks & unit tests
npm install
npm run typecheck
npm test

# Run local Cloudflare Workers + D1 dev server
cp backend/.dev.vars.example backend/.dev.vars
cd backend
npx cf d1 migrations apply openvault-db --local
npx cf dev

# Run Android unit & crypto-vector tests
cd android
./gradlew :app:testDebugUnitTest

License

OpenVault is open-source software licensed under the MIT License.

Star history

Star History Chart

About

Self-hosted, zero-knowledge password manager (Bitwarden-compatible). Runs on Cloudflare Workers + D1/R2 with native Android (Jetpack Compose) & Chrome MV3 apps.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Contributors

Languages