Skip to content

2FAuth

Self-hosted web app that stores your 2FA accounts and generates TOTP and HOTP codes

Copyleft (OSI) · AGPL-3.0
  • Self-hosted

Listed by , founder & editor

80

Health

Thriving

Overview

Stars

4,238

Last commit

yesterday

Nov 2026

Repository age

7 years

since May 2019

Latest version

v9.0.3

Nov 2026

Contributors

–

2 active in 90 days

Releases

15

last 12 months

Language

PHP

2FAuth is a PHP web app that keeps your two-factor accounts in a database you control and generates the codes in the browser. It works on desktop and mobile screens, so you do not need to reach for your phone when you sign in from a computer. It replaces Google Authenticator for people who prefer a self-hosted option.

You add accounts by scanning a QR code or by filling in a form. It generates TOTP, HOTP and Steam Guard codes, following RFC 4226 and RFC 6238. Accounts can be sorted into groups and edited after import. Imports work from 2FAuth JSON, Google Auth QR codes, Aegis (JSON and plain text) and 2FAS JSON.

Security options include optional database encryption, auto logout, sign-in with a security key such as a Yubikey, and multiple user accounts with limited or SSO-only registration. You can install it on your own server, with Docker, or on Heroku. The interface is available in English and French. It is licensed AGPL-3.0, and a paid hosted plan exists.

Who it's for

Self-hosters who want 2FA codes in a database they back up

Everything sits in one standalone database you can back up and restore.

Skip if: You want a native phone app that works offline without a server.

Desktop-heavy workers who sign in from a computer all day

Codes appear in the browser, so you skip picking up your phone.

Skip if: You need push approval or passkey storage.

Families or small teams sharing one install

Multi-user support lets each person have a separate account, with registration limited by email domain or SSO.

Skip if: You do not want to run and secure a server.

The problem it solves

Authenticator apps tie your codes to one phone, and losing it can lock you out of every account. 2FAuth keeps them in a database you can back up and opens them from any browser.

Strengths

  • Imports from Google Auth, Aegis and 2FAS
  • Generates TOTP, HOTP and Steam Guard codes
  • Optional database encryption and security-key login
  • Runs with Docker or on a standard Laravel stack
  • Multi-user with domain limits or SSO-only sign-up

Trade-offs

  • Web app only, with no native mobile app
  • No push approval or passkey storage
  • Interface is translated into English and French only
  • Self-hosting makes you responsible for server security

2FAuth replaces

Self-host 2FAuth

Self-hostable
Yes
Hosted plan
From $4/month · pricing

Frequently asked questions

Is 2FAuth free?

Yes. The code is AGPL-3.0 and you can self-host it at no cost. A paid hosted plan is also offered.

Can I import from Google Authenticator?

Yes, through Google Auth QR codes. Aegis, 2FAS and 2FAuth JSON files also import.

Can I self-host it with Docker?

Yes. Guides cover Docker CLI, Docker Compose, a plain server install and Heroku.

Does it follow the OTP standards?

Yes. It generates codes per RFC 4226 (HOTP) and RFC 6238 (TOTP).

Other Yubikey alternatives

Compare all 6 Yubikey alternatives →

Similar tools in Two-factor authenticators

FreeOTP

Two-factor authenticators

Android one-time password app under Apache-2.0 for people who want no Google account

1.7k 350 20 days ago Slowing Apache-2.0

Replaces Yubikey

2FAS

Two-factor authenticators

Open source authenticator app for Android and iOS with backup and sync

1.6k 135 23 days ago Active GPL-3.0

Copy SMS Code - OTP Helper

Two-factor authenticators

Android app that detects one-time codes in SMS and notifications and copies them for you

949 88 23 days ago Slowing AGPL-3.0

FreeOTP+

Two-factor authenticators

Android two-factor authenticator with encrypted tokens and backups, forked from FreeOTP

755 90 today Active Apache-2.0

Replaces Google Authenticator

OTPClient

Two-factor authenticators

GTK4 desktop app for TOTP and HOTP codes in encrypted local databases on Linux

560 53 4 days ago Thriving GPL-3.0

Mauth

Two-factor authenticators

Android authenticator app for TOTP and HOTP codes with a Material You interface

474 24 40 days ago Slowing GPL-3.0