24
submitted 2 weeks ago by PumpkinDrama@reddthat.com to c/linux@lemmy.ml

I’m trying to sync a KeePassXC database between my Android phone and my Manjaro Linux system. I want full two-way sync of changes, but I don’t want deletions on one device to remove the file on the other. What’s the best way to configure this? Tools like Syncthing seem close, but I’m not sure which folder settings or ignore rules would prevent deletion sync while still keeping both sides updated. Any guidance or examples would help. Thanks!

you are viewing a single comment's thread
view the rest of the comments
[-] hermelino@feddit.org 2 points 1 week ago

There is a way to make this work. It goes like this:

  • You do not use any external sync mechanism. Instead you work on one file only. Multiple clients can have it open simultaneously.
  • The apps I use succesfully that way are KeepassXC on Linux and Keepass2Android on Android.
  • You make the file accessible via SFTP (WebDAV might work too, although I haven't tried that). I have a public server running where I created an account to only serve this keepass db file.
  • On the Linux clients I created an automount via SSHFS. KeepassXC opens the file via this mount.
  • Keepass2Android has SFTP built-in and can therefore access the file directly itself. This is important since all solutions that involve presenting the file via Android Storage Provider are not designed for that task and can lead to data loss (ask me how I know.) That's why KeePassDX is not an option. It deals with local files only. (I haven't checked any of the other Android apps.)
  • The syncing is handled by the apps themselves. They can detect or be made aware of changes to the file by the user that may happen even whilst they have it open, and they both handle the syncing correctly and reliably.
  • Keepass2Android can even deal with network outages since it is smart enough to keep an internal local copy of the file and to take care of the sync later.
  • Since KeepassXC doesn't have this caching it needs the network to be up. You should create a cron job (or systemd timer) that makes a local copy every now and then, so you have a fallback.
this post was submitted on 16 Nov 2025
24 points (100.0% liked)

Linux

57274 readers
246 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS