Install KeePassXC

In my ideal world, when I install something, magic happens and everything just works. When I installed KeePassXC that was mostly the case, but I had to configure a few things before it played nice with my browser of choice, LibreWolf.

I'd surprise if anyone reading these notes doesn't know, but LibreWolf is a fork of Firefox. I haven't tested it, but I assume the following steps are needed and will work with Firefox aswell.

Step 0: Install KeePassXC

I've installed the password manager using `pacman`:

$ run0 pacman -S keepassxc

Step 1: Install KeePassXC-Browser extension

In order to work with KeePassXC, my browser needed the KeePassXC-Browser extension. You can find the extension by searching ("Find more add-ons") for KeePassXC-Browser in the extensions section of your browser's preferences page, or by going to:

[HTTPS] KeePassXC-Browser by KeePassXC Team

I kind of expected more magic would happen with installing this extension. Unfortunately, some configuring was necessary.

Step 2: Create A `native-messaging-hosts` Directory

Create a new empty directory called `native-messaging-hosts` in `~\.librewolf` if you're using LibreWolf, or in `~/.mozilla` if you're using Firefox.

$ mkdir ~/.librewolf/native-messaging-hosts

I have no idea where this directory needs to go on a non-Linux system.

Step 3: Enable Browser Integration

In KeePassXC proper, not the browser extension, use the menu and choose:

Tools ⇒ Settings ([Ctrl]+[ , ]) ⇒ Browser Integration ⇒ Tab: General

Check "Enable browser integration".

Check "Firefox" under "Enable integration for these browsers". Yes, also check "Firefox" if you're actually using LibreWolf.

Step 4: Point the KeePassXC to the New Directory

Still in KeePassXC proper, not the browser extension, use the menu and choose:

Tools ⇒ Settings ([Ctrl]+[ , ]) ⇒ Browser Integration ⇒ Tab: Advanced

Make sure "Use a custom browser configuration location" is checked, and the following options are:

Browser type: Firefox

Config Location: ~/.librewolf/native-messaging-hosts

The browser type also needs to be "Firefox" if you're using LibreWolf. If you're using Firefox proper, the Config Location is `~/.mozilla/native-messaging-hosts` (the directory you just created).

Step 5: Connect the KeePassXC-Browser Extension to Your Password Database

In your browser, click the hamburger menu (the hamburger menu (☰) in the top-left corner), choose Add-ons and Themes ([Ctrl]+[Shift]+[a]).

Click the three dots (⋯) in the KeePassXC-Browser section, and choose "Preferences".

Click "CONNECTED DATABASES" and the "Connect" button. KeePassXC will show a popup asking for a name. Any name will do as long as it is clear to you which password database the extension is connecting to. If you have added multiple databases to KeePassXC, you're connecting the database in KeePassXC's active tab.

That's it. This is how I'm using KeePassXC with LibreWolf.