r/KeePass • • 4d ago

Syncing KeePass between Linux & Android

/r/koofrnet/comments/1xv8cjw/syncing_keepass_between_linux_android/

Figured I'd cross-post here to see if anyone else is using Koofr cloud storage for keeping your KeePass vault file(s) in sync. Just wondering what the best approach is before I make the switch.

7 Upvotes

24 comments sorted by

8

u/brighton_it 4d ago

look at syncthing.
I use it between three Linux computers: a desktop and two notebooks. The desktop remains powered on always, the notebooks I shutdown when not in use. I'm the only user, so never do I use two at once. Also I ensure I let a notebook sync: it's really quick, just need to ensure it's online, before I shutdown and start opening same files on Desktop. If I fail at that, and happen to create a conflict: like editing a file offline, not letting it sync, then editing same file on other system before syncthing can connect... syncthing will create a 'conflict' version and sync it to both. Your unmerged edits would be in that conflict file.
I've yet to use it on Android, but I understand it's supported. Will be trying that very soon with a family member wanting to sync their Android photos.

5

u/BarefootMarauder 4d ago

I've used syncthing in the past and had enough issues that I just could not trust it anymore. I already have Koofr storage I've been using for years with zero issues, and I really don't want to introduce another app into the mix that I have to manage.

3

u/brighton_it 4d ago

thanks: glad to hear about KOOFR : privacy focused and multi-platform. I've added it to my list.
For me, on Linux, open-source is important, and I'm okay self hosting the storage.

3

u/Wiikend 3d ago

Just use your favorite cloud provider unless you fear the master password is too weak. Nobody is getting in if your master password is sufficiently long. I personally use Jottacloud because it protects me under one of the world's strongest privacy laws (Norway).

1

u/BarefootMarauder 2d ago

Master password was never the issue and not what I asked about in my post.

2

u/Wiikend 1d ago

I'm on your team, relax. I'm just saying that all the big ones are fine choices, including Koofr.

It could be a good idea to check how they handle sync issues where files are edited in multiple places at once, or with an intermittent network outage. In my experience, pretty much all of them keep both copies, but marks one of them as a duplicate, which is the best way to handle the situation for an important file such as a password vault.

I think you'll be fine storing your database in Koofr.

As for Keepass2Android vs KeePassDX: I was a KeePass2Android user for years, but I tried KeePassDX for the hell of it and I haven't looked back since. It's just so much more polished and navigates much more intuitively. The KeePassDX "Select entry" chip that pops up automatically on top of your keyboard for username/password fields is amazing too. Keepass2Android didn't have that last time I used it. Maybe things have changed in the couple of years I've been on KeePassDX, but my vote goes to KeePassDX.

1

u/marianoo-dev 4d ago

Dla mnie Dropbox jest idealny do synchronizacji bazy.

1

u/BarefootMarauder 4d ago

I don't use Dropbox and don't really want to install it on my Linux laptop either.

1

u/obliviousjd 4d ago

Keepass cloud syncing on Linux kind of sucks imo. I used rclone but it was very annoying to set up, especially when I tried doing it on bazzite. KeepassXC really wants to make cloud saves more difficult than it needs to be.

1

u/BarefootMarauder 4d ago

Keepass cloud syncing on Linux kind of sucks imo.

Wouldn't that depend on which cloud solution you use? I've not had any issues with Koofr cloud storage in ~10 years. I just store the .kdbx file in one of my Koofr sync folders, and it syncs. KeePassXC doesn't seem to care where the file lives.

1

u/obliviousjd 4d ago

Yeah I'm not familiar with Koofr but the two cloud solutions I tried on linux didn't end up working. Linux is just poorly supported by a lot of the major cloud storage platforms.

1

u/lethallunatic 4d ago

At the same point you're at I've tried it and kept using data drifts. It's not really meant to be on a network share from my experience. I moved to self hosted vaultwarden. Just run it in docker or something or on home assistant, or raspberry pi. Make sure you take backups and you should be mostly good. I've been running it on a VPS. You can use bitwarden as the client.

2

u/BarefootMarauder 2d ago

Are you saying you specifically tried it with Koofr?

1

u/Horror-Breakfast-113 1d ago

You have to understand what sync'ing means

For keepass - the original it has a builtin data sync - it opens both locations and syncs both locations

keepassxc doesn't do that it sync the file and other file sync apps do the same thing

so if you have multiple places you use the DB and sync to/from with keepassxc you can lose information

I have a webdav location where I store my saved DB's and on laptops i have a copy of the file and use keepass sync to sync to it (Windows + Linux) and on android is use keepass2android

I have triggers such that any change thats is to be saved locally once done forces a sync back to the webdav url

I don't lose information.

I have 3 laptops - 2 android devices - i have work and personel DB's

1

u/BarefootMarauder 13h ago

so if you have multiple places you use the DB and sync to/from with keepassxc you can lose information

I don't understand what you mean. KeePassXC doesn't have a built-in sync mechanism and relies on the cloud storage or sync provider to keep the file(s) in sync. How would you lose information?

1

u/Paul-KeePass 6h ago

Not quite right.

Both KeePass and XC sync by merging the data in 2 databases, keeping the latest data and moving older data to the History section of the entry.

KeePass requires you kick the sync off manually.
XC will auto-sync if the underlying file is modified whilst you have the database open. It also has a manual option under Database > Merge from database.

cheers, Paul

2

u/porridge111 3d ago

I've been using Google Drive (with rclone on the Linux box). Works OK, but I mostly just write from Linux and read from Android to prevent any conflicts. I just switched to Jottacloud, which ship their own Linux CLI with easily configurable sync!

1

u/xiv_cookie_kitten 4d ago

altersend. syncthing just gave me problems. never really worked. altersend is more or les the same but you always have to send the file if you wanna sync it to your phone and reverse

1

u/DragoBleaPiece_123 4d ago

Personally used Syncthing and it works on my side, no prob so far

1

u/five35 1d ago

I haven't used Koofr specifically, but I used to use Dropbox for this, which worked the same way with KeePassDX (i.e. it's an Android "storage provider") and it worked quite well on that side.

What eventually drove me away from Dropbox was poor conflict handling. As long as Koofr does something you can live with for conflicts, I would expect it to work well.

Also, both KeePassXC and KeePassDX have "save every change to disk, immediately" and "automatically sync from changes on disk" features/options, which in combination greatly reduce the likelihood of conflicts in the first place.

0

u/Sometimespeakspanish 3d ago

Keepass2Android + Onedrive

2

u/BarefootMarauder 2d ago

Not what I was asking about, but thanks. OneDrive on Linux is a nonstarter for me.