Sync passwords between Mac and Android with KeePass
This is a very old post. These days I recommend using LastPass.
It’s actually not too difficult to manage all your online passwords in such a way that you can access and update them from a Mac and an Android phone or tablet, without spending a cent.
The solution involves DropBox and KeePass, and here’s how you do it.
1. Install DropBox on your Mac
If you don’t already have DropBox installed, here’s the link: www.dropbox.com/downloading. Get yourself a DropBox account if you haven’t got one.
2. Install KeePassX on your Mac
There are two versions of KeePass available for the Mac. I’m using the older KeePassX version because its password database format can be both read and written by the Android app, whereas the newer version’s database files cannot be written on Android.
Get KeePassX from www.keepassx.org and install it.
3. Install KeePass on a Windows machine
Yes, you read that correctly. There’s a bug in KeePassX on the Mac which prevents a new password database file from being created (at least, I couldn’t save a new database on my Mac – the file naming dialogue just kept changing folder without actually saving anything). The easiest way to circumvent this is to go to keepass.info/download.html, install KeePass Classic Edition (not Professional Edition) on a Windows computer and use it to create a new “.kdb” password database file, then copy this file to your Mac’s DropBox folder. I did this using a Parallels virtual machine running Windows 7.
4. Create a desktop alias to the database (optional)
So now you have a .kdb password database file in your Mac’s DropBox folder, and hopefully you’ve opened it with KeePassX and added a couple of passwords to see how it works.
A simple way to ensure quick access to your passwords if to create an alias to the file and place that alias on your desktop (or some other favourite location), so do this if you wish.
5. Install DropBox on your phone
I’m fairly sure that DropBox is installed as standard on most Android phones, but if it isn’t on yours, install it now from the Google Play store and set it up to use your DropBox account.
6. Install KeePassDroid on your phone
Use the Google Play store to search for KeePassDroid and install it. When it’s installed, run it and try to open a .kdb file. You’ll probably find that it asks you to install the OIntent file browser app, and you should let it do this. Once this is done, you can exit KeePassDroid.
7. Open your password database on your phone
The best way to get to your passwords on your phone is to open DropBox and tap the file. KeePassDroid will then launch and ask you for the master password, and then you’re in.
On your phone, you may need to clear DropBox’s cache from time to time, depending on how often you open the file.
2. The sorting bug
On your Mac, open KeePassX’s preferences and set it to save the database after every change. This helps you to avoid being stung by a significant bug, which often causes KeePassX to crash when you try to ‘Sort Groups’. In my experience, selecting Sort Groups from KeePassX’s top menu bar causes the crash more often than right-clicking a group and selecting Sort Groups from the context menu.
This may make KeePassX sound rather flaky, but apart from this bug I’ve had no problems at all, and I feel comfortable using it to store over 300 passwords and access codes.
I’ll leave the actual business of learning how to use KeePassX and KeePassDroid as an exercise for the reader. Don’t worry, they’re pretty intuitive. Have fun!