How to sync KeepassXC database?

Hi,
I’ve been using KDE for a little while, but I’m not sure how best to get my KeepassXC database to sync to the cloud?
I’m currently using Google Drive but I’m open to alternatives.

KIO seems to download a temporary file in ~/.cache/kioexec/krun/ which doesn’t write back changes. I’ve read that KeepassXC would need to be “KIO-aware” to work otherwise.
Otherwise, when using GNOME, GVfs mounts to /run/user/1000/gvfs and writes changes back to GDrive. If I could continue mount to GVfs in KDE this could be an option.

Thanks in advance.

I’m not sure what you mean. Do you want to sync KeePassXC settings? The passwords are stored in an encrypted kdbx-file that you can place whereever you want and sync it like you would sync any other file.

Hi, I’m not trying to sync the settings, but the kbdx password database file itself.
I have the kbdx file in my Google Drive, but editing it with KeepassXC doesn’t save any changes back to GDrive.

As I mentioned, Dolphin/KIO seem to make a temporary copy when I open the kbdx file, into the /home/user/.cache/kioexec/krun folder. KeepassXC also opens the file from this location on launch, so if I edit the file on another device the changes don’t sync. I have to reopen the file from GDrive, which makes another temporary cached copy.
I can copy and upload files into Google Drive using Dolphin and most other applications though.

That seems odd. I have my database within a Nextcloud synced folder and it gets synced on every save. I don’t even have the ~/.cache/kioexec folder. Doesn’t Google recognize that the file has changed when you save it?

My understanding is that KIO (contrarily to GVFS) does not really mount the remote as a local filesystem but provides some sort of abstraction. This has advantages but also limitations. In both cases though, you are accessing the file directly on the cloud storage.

What I would suggest is that you sync the file locally, i.e. keep a local copy of your Keepass synchronised with an actual cloud sync tool. Not sure it’s possible with Google Drive (maybe through rclone), surely it is with Dropbox, MEGA or a Nextcloud provider.

2 Likes