Integrating KeeWeb With Dropbox for Data Access [How-To]
By now, if you’re new to using KeeWeb, you should probably have read my really basic intro to getting KeeWeb working from a place you host. You may have decided to host it on your own server or computer, but I thought putting it in Dropbox was a good primer for what’s next: Integrating this tool into Dropbox’s API and using that for storage. This can seem really complicated at first look, but I’ll show you that it’s not as bad as you think.
A warning: This is a densely populated list of instructions. My intention is for you to follow this list and hopefully succeed in building this solution.
To start this, you’ll need to gather the following:
1. Your Dropbox credentials. 1
2. A computer that runs Linux or OS X, but I’ll talk about using Windows here.
3. A Keepass database (even a simple one is fine, you don’t have to go all the way to start)
Next, we work with the KeeWeb Github page:
1. The first step is to create a Dropbox app of your own. Go here and log into the account you will place your Keepass database in. Keep this window open as we go through this process. There are a few things you should think about when creating this app.
– First, the app has to have a unique name, and that name can be anything.
– The status will be “Development” and that’s ok. You don’t need to change that or worry about it
– The Redirect URLs will be a key setting.2
2. Download the index.html file from the KeeWeb Github page. It’s important you get the pre-compiled version for my example.
3. Inject your DropBox App key into the index.html file. Get the “App Key” from the Dropbox development page you had open. Don’t be confused with “App Secret” or “Access Token”, you’ll only need the “App Key”.
– If you are on OS X, you run a terminal and use the “cd” command to change to the folder you decompressed the index.html file (downloaded above).
Then run this command: sed -i.bak s/qp7ctun6qt5n9d6/put your app key here/g index.html
– For Windows, the process is similar. Go download sed and dependencies for Windows and place the .exe and .dlls in the same folder as your downloaded index.html file.
Then open a command prompt, “cd” to the directory you did the above and run this: sed -i.bak s/qp7ctun6qt5n9d6/put your app key here/g index.html
4. Good, that part was probably the most challenging. Now, out that index.html file in a public location. On Dropbox-like my previous example is good. Ge the URL of that location, it probably looks something like this: https://dl.dropboxusercontent.com/u/123456789/index.html – You should be able to go to that URL and see the KeeWeb welcome screen.
5. Now, place that public URL location in the “Redirect URIs” section of your Dropbox application. This helps your app reference back to where it’s running and an important step.
So, now let’s test this. Load up your Dropbox public link in a browser. You should see the KeeWeb welcome screen. When you click on the “Dropbox” link, you should see the following in a new window (after “with”, you’ll see your own app name). Log into the Dropbox account where you’ll be keeping the Keepass database. If you do happen to already be logged in, you’ll bypass this but there won’t be any errors:
6. Good, you just have one more step – putting the database into Dropbox. So, log into your Dropbox web interface and find the folder (from the root) \Apps\your app name here\. Upload your Keepass database file(s) here. This is what you want to see when you click the “Dropbox” link on this welcome screen. Because I placed the file “testing.kdbx” in the above Dropbox folder, this example shows the “testing” Keepass database as available to open. After this, you use your password and you’re in.
Done! If you are facing more challenges with this, you might find some advanced clues on this support page. Keep at it, and if you have any questions let me know. The question of security will come up, and, given that you place your index.html on an encrypted server, and the Dropbox link is encrypted, you should be able to trust this solution as reasonably secure. 3
If you liked this, do let me know in the comments and share below.