Skip to content

Open Source Yubikey Alternatives

6 alternatives · Data checked · By , founder & editor · Two-factor authenticators

OnlyKey is the closest open source alternative to a YubiKey. It is a hardware key with open source firmware that also stores passwords and generates one-time codes. It lacks FIDO2 certification, though. For code-only needs, 2FAuth suits self-hosters and Aegis Authenticator suits Android users.

To self-host
2FAuth · AGPL-3.0, thriving
As a desktop app
Nitrokey App · runs on Linux
Without running a server
2FAuth · hosted plan from $4/month by the project
Most actively maintained
2FAuth · health 80/100, last commit Nov 2026

Best overall

Best for: Users who want an open-source hardware key with built-in password manager and 2FA

Unknown

Pick #2

Best for: Users of Nitrokey 3 hardware who want an open source tool to manage passkeys and OTP on the key

127 ActivePermissive

Pick #3

Best for: Android users wanting an open-source authenticator app with encrypted vault and backups

14k SlowingCopyleft

Compare OnlyKey vs Nitrokey App side by side →

Why people leave Yubikey

YubiKey is a line of hardware security keys made by Yubico. You plug one into a USB port or tap it by NFC to sign in. It supports FIDO2/WebAuthn, and it can also generate TOTP and HOTP codes through its companion authenticator app. People use it for two-factor authentication and phishing-resistant logins. It is sold as a physical device.

  • Hardware cost per key. You should buy at least two keys, one as a backup. The cost adds up across a team.
  • Closed hardware and firmware. The key's firmware is not fully open for independent review. Some users prefer fully open hardware designs.
  • Physical key can be lost. If you lose a key and have no backup, you may lose access to accounts. Software authenticators are easier to back up.
  • Certification gap in alternatives. Open source keys often lack the same FIDO2 certification as the YubiKey range. That matters if your organization requires certified devices.

Quick comparison

#AlternativeLicenseStarsHealthPlatformsFitParityMigrationImports from Yubikey
1 OnlyKey Unknown – – Direct replacement 0% Moderate –
2 Nitrokey App Permissive 127 Active Linux Partial replacement 29% Hard No
3 Aegis Authenticator Copyleft 14k Slowing Android Partial replacement 53% Moderate No
4 2FAuth Copyleft 4.2k Thriving Self-hosted Partial replacement 56% Moderate –
5 Stratum Copyleft 4.6k Slowing – Partial replacement 41% Moderate No
6 FreeOTP Permissive 1.7k Slowing Android Partial replacement 35% Moderate No

Fit = how much of Yubikey's job the tool replaces. Parity = share of Yubikey's core features the tool covers fully. Migration = effort to move your data and team over. Health and stars from November 24, 2026. How we rank.

The 6 best open source Yubikey alternatives

  1. 1

    OnlyKey

    Hardware key with a built-in password manager and two-factor login

    Unknown Direct replacement

    OnlyKey is a hardware security key with open source firmware that also stores passwords and generates one-time codes, so it can take a YubiKey's place for two-factor logins. It lacks the FIDO2 certification of the YubiKey range, and its ecosystem is smaller. Expect a moderate migration.

    Strengths

    • Combines password manager and two-factor authentication
    • One PIN unlocks the device
    • Open-source hardware key

    Trade-offs

    • No FIDO2 certification parity with YubiKey range
    • Smaller ecosystem and device support
    Best for
    Users who want an open-source hardware key with built-in password manager and 2FA
    Fit
    Direct replacement · 0% feature parity
    License
    License unknown
    Hosting
    Desktop / local
    Migration
    Moderate
    Last commit
    –
  2. 2

    Nitrokey App

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

    127 Active 68 Permissive Partial replacement

    Nitrokey App is a partial fit at 29.4% feature parity. It is a management tool for passkeys and OTP on Nitrokey 3 devices, not a key itself, so you must buy that hardware. Its 127 stars and a November 2026 commit show active upkeep, but it is Linux-focused and migration is hard.

    Strengths

    • Apache-2.0 license, maintained by Nitrokey GmbH
    • Available on Flathub
    • Manages both Nitrokey 3 and Nitrokey Passkey devices
    • Active, with 7 releases in the last year

    Trade-offs

    • Only manages Nitrokey 3 and Passkey devices, not a standalone key
    • Linux-focused desktop app; no Windows/macOS listed
    • Not a hardware token itself
    • Does not support Nitrokey Pro or Storage; those need the older app
    Best for
    Users of Nitrokey 3 hardware who want an open source tool to manage passkeys and OTP on the key
    Fit
    Partial replacement · 29% feature parity
    Health
    68/100 (Active) · breakdown
    License
    Permissive (OSI) (Apache-2.0)
    Hosting
    Desktop / local
    Migration
    Hard
    Last commit
    Nov 2026
    • Linux

    Feature parity with Yubikey · 29%

    • Partly FIDO2/WebAuthn security keys
    • Partly Passkey support
    • Yes Desktop app
    • Partly Hardware token OTP
  3. 3

    Aegis Authenticator

    Android 2FA app with an encrypted vault, local backups and imports from other

    14k Slowing 44 Copyleft Partial replacement

    Aegis covers about 53% of what a YubiKey does, and only the one-time code part. It has 13,593 stars and an encrypted vault with backups. It has no FIDO2/WebAuthn and no hardware-backed secrets, and it runs on Android only. Pick it as a phone-based code app.

    Strengths

    • AES-256-GCM vault unlocked by password or biometrics
    • Imports from Authy, Google Authenticator, Microsoft Authenticator and more
    • Automatic backups plus plaintext or encrypted export
    • Supports both HOTP and TOTP

    Trade-offs

    • No FIDO2/WebAuthn security key support
    • No hardware token storage of secrets
    • Android only, no desktop app
    • Android only; no iOS or desktop apps
    Best for
    Android users wanting an open-source authenticator app with encrypted vault and backups
    Fit
    Partial replacement · 53% feature parity
    Health
    44/100 (Slowing) · breakdown
    License
    Copyleft (OSI) (GPL-3.0)
    Hosting
    Desktop / local
    Migration
    Moderate
    Last commit
    Sep 2026
    • Android

    Feature parity with Yubikey · 53%

    • Yes TOTP code generation
    • Yes HOTP code generation
    • Yes QR code setup
    • Yes App lock with biometrics or PIN
    • No FIDO2/WebAuthn security keys
    • No Passkey support
    • Yes Search, icons and categories
    • No Desktop app
    • No Hardware token OTP
  4. 4

    2FAuth

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

    4.2k Thriving 80 Copyleft Partial replacement

    2FAuth reaches about 56% parity, the highest of these three, and works in a browser on desktop and mobile. Its last commit was in 2026 and it has 4,232 stars. It cannot act as a FIDO2 key or keep secrets in hardware, and you must host a server. It suits self-hosters.

    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

    Trade-offs

    • No hardware token storage of secrets
    • Cannot act as a FIDO2 security key
    • Requires hosting a server
    • Web app only, with no native mobile app
    Best for
    Self-hosters who want a web-based 2FA code manager usable on desktop and mobile
    Fit
    Partial replacement · 56% feature parity
    Health
    80/100 (Thriving) · breakdown
    License
    Copyleft (OSI) (AGPL-3.0)
    Hosting
    Self-hosted · Cloud from $4/mo
    Migration
    Moderate
    Last commit
    Nov 2026
    • Self-hosted

    Feature parity with Yubikey · 56%

    • Yes TOTP code generation
    • Yes HOTP code generation
    • Yes QR code setup
    • Partly App lock with biometrics or PIN
    • Partly FIDO2/WebAuthn security keys
    • No Passkey support
    • Partly Search, icons and categories
    • Partly Desktop app
    • No Hardware token OTP
  5. 5

    Stratum

    Android two-factor authenticator with encrypted backups and a Wear OS companion

    4.6k Slowing 51 Copyleft Partial replacement

    Stratum matches about 41% of YubiKey features, the lowest here. You get encrypted backups, categories and a Wear OS app, and it has 4,647 stars. It has no FIDO2/WebAuthn or hardware secret storage, and no desktop app. It fits Android users who want codes on their watch.

    Strengths

    • Supports TOTP, HOTP, mOTP, Steam and Yandex codes
    • Encrypted backups to cloud storage or the device
    • Works without Internet access and needs only camera permission
    • Imports from Google Authenticator, Authy, Steam and Blizzard

    Trade-offs

    • No FIDO2/WebAuthn security key support
    • No hardware token storage of secrets
    • Android and Wear OS only, no desktop app
    • Android only, with no iOS or desktop app
    Best for
    Android users wanting encrypted backups, categories and a Wear OS app
    Fit
    Partial replacement · 41% feature parity
    Health
    51/100 (Slowing) · breakdown
    License
    Copyleft (OSI) (GPL-3.0)
    Hosting
    Desktop / local
    Migration
    Moderate
    Last commit
    Nov 2026

    Feature parity with Yubikey · 41%

    • Yes TOTP code generation
    • Yes HOTP code generation
    • Yes QR code setup
    • No FIDO2/WebAuthn security keys
    • No Passkey support
    • Yes Search, icons and categories
    • No Desktop app
    • No Hardware token OTP
  6. 6

    FreeOTP

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

    1.7k Slowing 39 Permissive Partial replacement

    FreeOTP covers only the one-time-code side of a YubiKey, at 35.3% parity. It suits Android users who want a small Apache-licensed HOTP/TOTP app. It has 1,686 stars, but development is slowing. The biggest gap is no FIDO2/WebAuthn support, and secrets stay on the phone, not on a hardware token.

    Strengths

    • Implements HOTP (RFC 4226) and TOTP (RFC 6238)
    • Works with any server that supports those standards
    • Camera and internet permissions are both optional
    • Apache-2.0 license allows broad reuse

    Trade-offs

    • No FIDO2/WebAuthn security key support
    • No hardware token storage of secrets
    • No import/export or encrypted backup
    • Android only, with no iOS app
    Best for
    Android users wanting a minimal Apache-licensed HOTP/TOTP app
    Fit
    Partial replacement · 35% feature parity
    Health
    39/100 (Slowing) · breakdown
    License
    Permissive (OSI) (Apache-2.0)
    Hosting
    Desktop / local
    Migration
    Moderate
    Last commit
    Nov 2026
    • Android

    Feature parity with Yubikey · 35%

    • Yes TOTP code generation
    • Yes HOTP code generation
    • Yes QR code setup
    • No FIDO2/WebAuthn security keys
    • No Passkey support
    • No Desktop app
    • No Hardware token OTP

Feature parity: Yubikey vs the top 5

FeatureYubikeyOnlyKeyNitrokey AppAegis Authenticator2FAuthStratum
TOTP code generationYes––YesYesYes
HOTP code generationYes––YesYesYes
QR code setupYes––YesYesYes
App lock with biometrics or PINYes––YesPartly–
FIDO2/WebAuthn security keysYes–PartlyNoPartlyNo
Passkey supportYes–PartlyNoNoNo
Search, icons and categoriesPartly––YesPartlyYes
Desktop appYes–YesNoPartlyNo
Hardware token OTPYes–PartlyNoNoNo

yes · partly · no · – not checked.

Cost to switch

What Yubikey costs your team in a year, against running an open source alternative yourself.

Enter Yubikey's price per seat to compare.

Server prices are typical monthly VPS prices for the RAM the tool needs (2 GB when unknown). Your time to run and update it is not included.

How to choose

You want a physical key that you plug in, with open source firmware

→ OnlyKey

It is a hardware key with open source firmware that also holds passwords and generates one-time codes.

You already own or plan to buy Nitrokey 3 hardware and want to manage passkeys and OTP on a Linux machine

→ Nitrokey App

It is an open source management tool for passkeys and OTP on Nitrokey 3 devices, with a Linux focus.

You need an Android authenticator app with an encrypted vault and backups

→ Aegis Authenticator

It stores codes in an encrypted vault with backups and has 13,601 stars.

You want to run your own server for 2FA codes and reach it from desktop and mobile browsers

→ 2FAuth

It is self-hosted, works in a browser, and has the highest feature parity of the code apps at about 56%.

You want codes on your wrist as well as on your Android phone

→ Stratum

It includes a Wear OS app along with encrypted backups and categories.

You want a small HOTP/TOTP app under the Apache license on Android

→ FreeOTP

It covers only one-time codes and uses a permissive license.

Moving off Yubikey

  • None of the listed alternatives import data directly from a YubiKey. Secrets on the key's authenticator cannot normally be read out, so you re-enroll each account.
  • For each service, add the new key or app as a second factor first, then remove the YubiKey once you have confirmed the new login works.
  • Passkeys and FIDO2 credentials are tied to the YubiKey itself. You must register new credentials on OnlyKey or a Nitrokey 3 by hand.
  • The app-based options (Aegis Authenticator, 2FAuth, Stratum, FreeOTP) give you TOTP and HOTP codes only. Sites that require a hardware FIDO2 key will not accept them.

Frequently asked questions

What is the best open source alternative to a YubiKey?

OnlyKey ranks first. It is a hardware key with open source firmware that also stores passwords and generates one-time codes. It does not have the FIDO2 certification that YubiKeys carry.

Is there a free open source alternative to a YubiKey?

Yes, for one-time codes. Aegis Authenticator, Stratum, FreeOTP and 2FAuth are free and open source. None of them replace the hardware FIDO2 function.

Which alternative can I self-host?

2FAuth is the one you host yourself. It is a web-based 2FA code manager that works in a browser on desktop and mobile.

Which alternatives work on Android?

Aegis Authenticator, Stratum and FreeOTP are Android apps. Stratum also has a Wear OS app.

Does Nitrokey App work on Windows or Mac?

Nitrokey App is Linux-focused. It manages passkeys and OTP on Nitrokey 3 hardware, which you have to buy separately.

Can I import my YubiKey data into an alternative?

Not directly. None of the listed options import from a YubiKey, so you add each account again and register new passkeys.

2026 edition. Rankings use fit, health, license and popularity; sponsors never change the order. Methodology · Report an error.