Recommended to be installed inside an offline VM (vault).  When you want to keepassxc as replacement for Google Authenticator (actually TOTP, Time based One Time Password) Two Factor Authentication (2FA)) then a Debian based VM is more suitable than a Whonix-Workstation ™ based VM. 
yubikey-personalization yubikey-personalization-gui are YubiKey related. Users not using YubiKey can skip installation of these packages and install
Optional. If you like to autostart keepassxc.
mkdir -p ~/.config/autostart/
Open ~/.config/autostart/keepassxc.desktop in an editor as a regular, non-root user.
Paste the following content.
[Desktop Entry] Type=Application Name=keepassxc Exec=keepassxc
The process is now complete.
1. Use of an offline VM (vault) is recommended.
2. Make sure clock is correct.
3. To start.
4. Create a new database.
5. Default file name
Passwords.kdbx is ok.
If you are using Full Disk Encryption you might want to use a very easy password. Up to you.
6. Left click on
7. Menu →
Add new entry → under
Title: write any name name (such as
8. Right click on the new entry (such as
Time-based one-time password →
set up TOTP →
Default RFC 6238 token settings → paste 2FA code →
9. Right click on the new entry (such as
Time-based one-time password →
2FA TOTP code changes every 30 seconds. So clock needs to be reasonable correct.
Troubleshoting only. If code does not match.
Set timezone to UTC for simplicity.
sudo cp /usr/share/zoneinfo/Etc/UTC /etc/localtime
Go to https://www.timeanddate.com/worldclock/timezone/utc [archive] or any other similar source to find out the time in UTC.
Fix the clock. Change the date and time accordingly!
sudo date -s "26 SEPT 2018 11:54:25"
Check if the clock is correct now.
- Whonix (Offline WorkStation)
Since whonix use sdwdate then there will be a delay in the 30 seconds, Meaning if the TOTP code showed up at 30 and you copy/paste it to the website or service which require the TOTP it wont work until the timer will reach to 8 seconds and below, This mean we have 22 seconds delay. (The result is tested in offline whonix-ws standaloneVM within Qubes OS)
If you want to fix this delay then disable sdwdate and bootclockrandomization by running this command:
sudo service sdwdate stop && sudo service bootclockrandomization stop
Getting the Browser Extension To Work
|Community Support Only!:|
Install the browser addon from https://addons.mozilla.org/en-US/firefox/addon/keepassxc-browser/ [archive]
Create the following symlink to get the proxy to work:
ln -s /home/user/.mozilla/native-messaging-hosts native-messaging-hosts
.mozilla folder does not exist, create it.
- In Qubes, apt-get package installation could be done in TemplateVM.
- In Qubes, download and verification could be done in a temporary TemplateBased AppVM, ideally Qubes/DisposableVM. Then move to offline vault VM.
- In Non-Qubes-Whonix ™: install first, then disconnect internet and never re-enable internet access. TODO document
- Because accurate time required for TOTP and due to Boot Clock Randomization and sdwdate anonymizing time.
- https://addons.mozilla.org/de/firefox/addon/passifox/ [archive]