I’d far rather be happy than right any day, Douglas Adams, The Hitchhiker’s Guide to the Galaxy
Password managers are used to keep all your passwords safe. They store and manage all your passwords, so you don’t need to try to memorize a bunch of unique, complex passwords for all of your personal and work accounts. You only need to remember one password, the one to your password manager. They can generate complex passwords for you. You can also set your password manager to log in to sites automatically.
KeePassXC is a free cross-platform password manager.
Smartphone-based apps like Google Authenticator are convenient, but they come with serious risks —especially when it comes to device loss. If someone hasn’t backed up their codes or enabled syncing, they could find themselves locked out of everything.
Using a desktop-based 2FA manager like KeePassXC definitely gives more control. You can store and back up your TOTP secrets as part of your encrypted password database.
That said, for even stronger resilience and convenience, some people combine both: they store the TOTP secrets offline (on a piece of paper) or on KeePassXC securely (save the one-time backup codes, too) and use a mobile authenticator for everyday access. It’s a bit of extra setup, but worth it if your accounts are mission-critical.
To use a QR code file for two-factor authentication (2FA) in your system and integrate it with KeePass, you’ll typically be scanning the QR code to extract a secret key used for generating Time-based One-Time Passwords (TOTP). KeePass supports TOTP generation directly, so once you have the secret from the QR code, you can store it securely in your KeePass database.
When you’re in the Google Account security settings and setting up 2-Step Verification, after selecting the authenticator app option, you should see an option to “Can’t scan the QR code?” or “Enter setup key”. This will reveal the secret key. Then, you can jump to step 4.
sudo pacman -S zbar # Install the zbar package (Arch).
sudo apt-get install zbar-tools # Ubuntu, Debian, or similar.
nix-shell -p zbar # NixOS (temporary shell)
# NixOS (permanent installation)
# Add to your configuration.nix:
environment.systemPackages = with pkgs; [
zbar
];
# Then, rebuild your system.
sudo nixos-rebuild switch
zbarimg qrcode.png # Decode the QR code
# Example Output
QR-Code:otpauth://totp/Example:user@example.com?secret=JBSWY3DPEHPK3PXP&issuer=Example
To view your TOTP Code, right-click on the entry, select TOTP, Show TOTP. The current code will be displayed with a countdown timer.
To transfer it to Mobile Authenticator. Select the entry that contains the secret key, go to TOTP, Show QR Code. Scan this QR code with your mobile authenticator app.