Syncing KeepassXC database

I am using Syncthing to sync the database between my PC and phone, and it works well when both are connected to the same network.

Problem is that when both are disconnected, and I change something on the database on both devices then Syncthing has a conflict.

I understand why there is a conflict, but is there a better way to deal with this from my KeePassXC setup side?

From the perspective of Syncthing: No. From the perspective of KeePassXC: Probably not, but I guess it is more likely you get help in a KeePassXC forum.

Personally I very rarely have a time window in which BOTH devices are 1) disconnected and 2) I modify the file on both devices.

This is based on these assumptions:

  1. Global discovery and relaying is always on.
  2. The cellphone almost always have internet connection.
  3. The computer almost always have internet connection.

Unfortunately there is no KeePassXC forum.

I only use Syncrhing over LAN. Though I might just look into also doing it over the internet.

I use Syncthing to synchronise KeePass databases and it does the job very well, but yeah, if you edit the database file on different machines simultaneously, you will get conflicts.

You may want to look up an easy way to merge KeePass databases, perhaps by a command line script or something in that manner.

I ended up using KeePass’s own synchronization functionality (although I use KeePass rather than KeePassXC), simply because that properly handles merging conflicts, and I didn’t want to risk locking myself out of somewhere due to a bad merge.

1 Like

I use KeePassXC because I’m on Linux. Unfortunately KeePassXC can’t merge.

I did however think that Keeshare could resolve my issue. Could that work?

From a quick scan of the docs, it does seem to be talking about doing synchronization with merges, so quite possibly!

Unless your mobile internet connection is prohibitive expensive, I see absolutely no reason at all to only sync when on LAN.

Not really on topic, but Syncthing can drain a phone battery pretty quickly if you’re on the move across areas with weak signal (e.g. the countryside), which will likely force it to disconnect and reconnect constantly.

I personally also sync on (W)LAN only.

1 Like

Establishing a server that is always on might be one of the solutions.

1 Like

This is not my experience.

KeePassXC can merge: Menu Database > Merge from Database. I need to do that every now and again if I do changes on the phone and pc at the same time ( (had the phone running only when charging, now all the time - no battery issues for me) .

I tried using keeshare and it should work, but unfortunately the Android clients don’t support keeshare. I’m using keepass2android. A solution that requires zero user intervention would be nice.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.