Everyone should use password managers, because remembering unique passwords is difficult. There are many great password FOSS password managers such as bitwarden, keepass, keepassxc etc. I wouldnt recommend using bitwarden because its cloud based, Your password database is being stored in cloud, and it makes me really paranoid. because there are thousands of users using it, so a lot of hackers trying to hack bitwarden's server. bitwarden allows you to self-host it, so you can host it in your own server.
But you know, your boy is still paranoid. So i will go with keepassxc because its completely offlilne. You can read the installation instructions and read more about it on keepassxc.org However, we are going focus more about how to sync the password database created from keepassxc on your desktop and cellphone(android).
After you are done installing keepassxc on your desktop, install keepassdx on your cellphone, To access your encrypted password database from your cellphone.
opensshon termux by running
pkg install openssh rsync
Once you are done with that, go to the terminal on your desktop and run this command:
here i specify the port with
--rsh='ssh -p 8022' because specifying it with
--port flag didng work for me.
repace your username with your username and local ip adress of termux in
and repace the paths in the commands to where your password database is stored in your desktop and cellphone.
and here we go, it will sync the database.
However, i wanted to go further and make it a bit automaticish, so i ended up with this script.
#!/bin/sh # paths of database file locations in android and desktop anpath="storage/shared/path/to/pass-database.kdbx" deskpath="path/to/pass-database.kdbx"
# getting last modified date desktop= android=
# syncing the database between both devices by calculating # in which device the password database was last modified. # not syncing anything if there was no change. if [; then elif [; then elif [; then fi
When i run this script, it will check in which device i had the password database last modified, and sync the password databse from desktop to cellphone if it was last modified on my desktop computer and vice versa.
Thank you for reading my blog with bajillions of spelling & grammar mistakes.