# Self-hosted auth & security apps for Cloudflare

> Logins, OAuth and OpenID providers, 2FA codes and password vaults. 3 open-source apps you can deploy to your own Cloudflare account, ranked by stars and recent commits.

Page: https://openflarestack.com/category/auth-and-security/. Updated 2026-10-13.

## 1. Melody Auth

Host your own OAuth and OIDC login server with an admin panel and SDKs. Self-hosted alternative to Auth0.

- Repository: https://github.com/ValueMelody/melody-auth (MIT, 649 stars, last commit 2026-10-13)
- Creates: D1 database, KV namespace
- Install: see https://github.com/ValueMelody/melody-auth#readme
- Details: https://openflarestack.com/apps/melody-auth.md

## 2. 2FA

Encrypted TOTP code manager with offline PWA, imports from other apps and remote backups. Self-hosted alternative to Authy.

- Repository: https://github.com/wuzf/2fa (MIT, 452 stars, last commit 2026-10-13)
- Creates: KV namespace, Durable Objects, Cron trigger
- Deploy: https://deploy.workers.cloudflare.com/?url=https://github.com/wuzf/2fa
- Details: https://openflarestack.com/apps/2fa.md

## 3. 2FAuth Worker

Web and PWA authenticator for your 2FA codes, with offline use and automatic backups. Self-hosted alternative to Authy.

- Repository: https://github.com/nodeauth/2fauth-worker (AGPL-3.0, 61 stars, last commit 2026-03-25)
- Creates: D1 database, Cron trigger
- Deploy: https://deploy.workers.cloudflare.com/?url=https%3A%2F%2Fgithub.com%2Fnodeauth%2F2fauth-worker
- Details: https://openflarestack.com/apps/2fauth-worker.md
