Keepass tutorial – Setup and Sync across devices

After writting up Best free password managers – Top 10 picks article, I decided that the most suitable option was to try out Keepass. This is the the option for those of you who like to tinker and want to play around with as many options as possible! Afterall, where’s the ‘fun’ in something that just works, right!? However if you’ve suddenly changed your mind and prefer an easy method then my next pick would be Bitwarden instead. If you’re still here, then let’s crack on!

Situation
I’ll explain the situation as if your scenario or needs are vastly different then this guide may not be for you. This will be the most useful if;

  • You want a password manager that allows granular customisation
  • You would like to Sync your devices – in this scenario Linux Mint to Android mobile
  • Happy to either self host your database (i.e. Nextcloud on a Raspberry Pi) or use a 3rd party like DropBox

High level
Essentially our end goal is to be able to store our passwords in a database that we can access to retrieve passwords etc. We then want to extend this facility to be able to retrieve the data from any device/devices (compatible with the Cloud service of choice). Whilst there are a couple of methods to achieve this, we will be storing our primary Keepass database on the Cloud service directly. This means that the file in question is now accessible on any device that has the Cloud app accessible. This is exactly like when you save an Excel document on OneDrive on your PC and can then access the same file on your tablet as long as you’re logged into OneDrive.

This is an encrypted file that can only be opened with Keepass (authentication required) so this important file is protected if you have concerns over a 3rd party Cloud provider i.e. Google Drive scanning your data.

We then want the ability to save a set of credentials/password on device 1, let’s say on my tablet when I’ve created a new account doing some casual browsing at a friends house and then want to go back to the website over the weekend on device 2/PC for a better shopping experience before I make a purchase. In this case, we need the ability to sync our passwords from device 1/tablet to device 2/PC and vice versa.

Compatability issues
In this example given, I am looking to sync the database between a Linux OS (laptop) and an Android mobile phone. The main issue with compatability was that you need to download the Deskptop App version of the Cloud service you choose. Google Drive App is currently not officially supported on any Linux distro and the Mega App method was not a reliable method for achieving a simple sync functionaility.

For these reasons, I went ahead with DropBox which provides a free tier and curently allows sync across 3 devices and gives you 2GB Cloud space which is more than sufficient for saving a text based database.
There are a few options for the Keepass mobile app in Playstore, I tried Keepass2Android and KeePassDroid and I would say stick to Keepass2Android as it was easier to customise and worked fine.
The Deskpop App for Keepass on Linux, I went with Keepass with the current version which was 2x.


Setup guide – Keepass | DropBox | Keepass2Android | Sync

Keepass

  1. First let’s head over to your Linux machine and download the Keepass Application by either vising their website or Terminal command: sudo apt-get install keepass2
  2. Check and confirm the usual propmts to install an application
  3. Keepass should now be available by checking the Applications menu

DropBox

  1. Head over to DropBox and create an account if you don’t already have one
  2. Then install the Desktop App on the DropBox link or via Termial: sudo apt-get install nautilus-dropbox
  3. After checking a couple of prompts, DropBox should now be installed on your Linux machine. You may see a shortcut pinned to the Desktop Panel
  4. Open your Dropbox account via the Web and create your folder where your Keepass database will live i.e. ‘Ethan Keepass Folder

Back to Keepass

  1. Open Keepass if it’s not already
  2. Click on File then New
  3. You will then see a prompt which you need to confirm

4. Once you click OK, you need to choose a File name and path. Within the Save As dialogue box, you may need to click on Personal and then click on ‘Dropbox’ (or your chosen cloud provider as long as you’ve downloaded the Desktop App first)
5. Double click Dropbox and then double click on the folder name you created within the Dropbox App i.e. ‘Ethan Keepass Folder’
6. Click Save and now you have created your primary Keepass database in .kdbx format in the Cloud, effectively providing you an automatic sync functionaility
7. Screenshot below now shows the top level folder name which in my case is called KeePass Andoird Drop. Inside this folder we will see sub folders with our passwords/data etc

Keepass2Android

  1. Head over to Google Play store and download Keepass2Android
  2. Click on the options menu (top left corner)
  3. Click Change database, then Open File
  4. Click Dropbox (this is where you can see other compatible 3rd party Cloud services you can use on the App subject to cross compatability with your Linux distro!)
  5. Click Allow to grant the required permissions and select the folder you created in Dropbox i.e. ‘Ethan Keepass Folder’ and that’s it!

Note:
– Keepass2Android – you may need to re-start a session once a set of credentials has been added from another device. Once logged in, click on the 3 dot menu on the top right and click Synchronize database. You will then be notified if it has picked up any changes to the ‘master database’ i.e. the database stored in the cloud
– Keepass desktop App – Remeber to click Save once credentials are added every time!

Now you can create a set of login credentials or secure note etc and save it on one device and retireve it on another providing you a combination of convenience and some level of security. In this setup, we use the service by copying and pasting our credentials across into the browser login page that we need access. For more information, see Keepass’s First steps guide to find our useful features to make this service more intuitive or head over to the next part of this guide ‘I’ve downloaded Keepass, now what?’