Skip to content

2fa

Self-hosted authenticator on Cloudflare Workers with browser extension and cloud backups

Permissive (OSI) · MIT

Listed by , founder & editor

80

Health

Thriving

Overview

Stars

465

Last commit

8 days ago

Nov 2026

Repository age

2 years

since Jan 2024

Latest version

v2.0.0

Nov 2026

Contributors

–

2 active in 90 days

Releases

20

last 12 months

Language

JavaScript

2FA is a two-step verification code manager that you deploy to your own Cloudflare Workers account. It generates TOTP and HOTP codes, works as a PWA offline, and stores data in Workers KV. The code is MIT licensed and written in JavaScript.

You can add keys by scanning a QR code, reading an image, pasting a screenshot or dragging a file in. Bulk import works from Google Authenticator, Aegis, 2FAS and Bitwarden. Export formats are TXT, JSON, CSV, HTML and Google migration QR codes. Stored keys can be encrypted with AES-GCM 256 using an ENCRYPTION_KEY secret you set.

Backups run automatically and can sync to WebDAV, S3, OneDrive or Google Drive. A browser extension shows, copies and fills codes from your own instance. The interface supports 15 languages and light and dark themes.

It is a self-hosted alternative to phone authenticator apps.

Who it's for

Self-hosters who want codes available in any browser

Your own instance plus a browser extension gives codes without a phone.

Skip if: You want codes kept offline on a separate device.

People moving from Google Authenticator, Aegis or 2FAS

Bulk import from those apps and Bitwarden is built in.

Skip if: You use an app whose export format is not supported.

Cloudflare users who like serverless hosting

One-click deploy creates the Worker and KV store for you.

Skip if: You do not want to depend on a Cloudflare account.

The problem it solves

Authenticator codes tied to one phone are easy to lose and hard to back up. Moving between apps is tedious. This gives you a self-hosted store with import, export and scheduled remote backups.

Strengths

  • Imports from Google Authenticator, Aegis, 2FAS and Bitwarden
  • Exports to TXT, JSON, CSV, HTML and Google migration QR codes
  • Backups can sync to WebDAV, S3, OneDrive and Google Drive
  • AES-GCM 256 encryption of stored keys with your own key
  • Interface in 15 languages, 20 releases in the past year

Trade-offs

  • Needs a Cloudflare account and Workers KV
  • Losing the ENCRYPTION_KEY makes encrypted data and backups unrecoverable
  • Upgrades go through a Sync Upstream workflow you must set up
  • Firefox Android support has not been verified on real devices

Self-host 2fa

Self-hostable
Yes

Frequently asked questions

Is it free?

The code is MIT licensed. You deploy it to your own Cloudflare account.

Which codes does it support?

TOTP and HOTP.

Can I import from my current app?

Yes. It imports in bulk from Google Authenticator, Aegis, 2FAS and Bitwarden.

Is there a browser extension?

Yes. You enter your instance address in its settings and sign in to the instance in the same browser.

Similar tools in Two-factor authenticators

Proton Authenticator

Two-factor authenticators

Open source Android 2FA code app with encrypted sync, for Proton users replacing Google

358 33 4 months ago Dormant GPL-3.0

Authnkey

Two-factor authenticators

Android credential provider for using NFC and USB security keys as passkey holders

301 23 3 months ago Dormant MIT

CloudOTP

Two-factor authenticators

Cross-platform authenticator app with cloud backup for Android, Windows and Linux

276 26 2 months ago Slowing GPL-3.0

AuthInbox

Two-factor authenticators

Self-hosted Cloudflare service that extracts verification codes from email for teams and

185 77 17 days ago Slowing MIT

Authenticator

Two-factor authenticators

103 64 6 days ago Active GPL-3.0-or-later

Nitrokey App

Two-factor authenticators

Desktop app for managing passkeys and OTP on Nitrokey 3 and Passkey devices

127 24 22 days ago Active Apache-2.0

Replaces Yubikey