Keepass and Owncloud

Keepass Owncloud iOS

Note: Updated for Kypass v.3

I was looking for a way to keep up with my passwords and Keepass is pretty much the most widely used so I decided to give it a shot. Installing it was easy and I had no difficulties there (note: the “professional” edition isn’t a paid version or anything else, it’s just a fork of the original version that’s had more features added, get this one). I did this at work and later got home and went looking for a password – I decided updating two copies separately was silly in 2013 and wondered if I should install it to a flash drive. This didn’t make sense either because I’m really only using it at work and at home right? I’ll use Dropbox… no wait, I just set up an Owncloud server on my home server. Perfect!

I like this idea better than dropbox for two reasons: Firstly, it’s not susceptible to any Dropbox insecurities or any widespread password leaks. Sony, Google, Dropbox, and other large companies are targeted for attacks because of the sheer amount of treasure to be had when someone manages to get in. With my Owncloud installation it’s protected with obscurity and by the fact that hardly anything of importance for anyone other than myself resides there. Secondly, the whole NSA spying thing makes me uneasy… sure I’ve got nothing that I don’t want the NSA to see – but it’s MY stuff! I don’t want anyone but my wife and kids to have access to MY stuff… With the information on my own server and in my own hands, it’s under my control.

Keepass and Owncloud

Setting up Keepass to use my Owncloud server was easy – I had the Owncloud client installed on both PC’s and simply saved my .kdbx database file to a folder inside my Owncloud sync folder and made both Keepass clients use that database file. Once I updated it on one computer, it updated on the other. Easy enough. But what if I’m not on my work PC or my home PC? What if I’m somewhere else? I have an iPhone so I started searching for options for keepass apps on iOS. I tried a few and even wasted a few dollars in the process. Some had the ability to sync to just Dropbox and some had Dropbox and Google Drive, but none natively supported Owncloud – no surprise there. I had another avenue though, WebDAV. In a nutshell, WebDAV makes the web a readable and writable medium – meaning you can read and write to files. Owncloud supports WebDAV so I decided to give it a shot. They’ve got a whole guide on how to set up your operating system to use it via WebDAV, but I needed a keepass iOS app that supported it and I found one called Kypass. It wasn’t cheap, it was $4.99, but I decided to give it a try – after all I’d found a post on the developer’s site where some people were trying to do exactly as I was doing (in the comments).

Once you’ve got your kdbx database on your Owncloud server, open up Kypass and go to Settings, click on File Synchronization, and the last option “WebDAV” click Add a connection. You’ll point it to your database file using this address:
http://username:password@yourowncloud.com:80/remote.php/
webdav/database.kdbx

As of Kypass v.3:

http://username:password@yourowncloud.com/remote.php/
webdav/database.kdbx

Keepass iOS Owncloud

If you have it in a folder in your Owncloud files it’d be:

http://username:password@yourowncloud.com:80/remote.php/
webdav/folder/database.kdbx

As of Kypass v.3:

http://username:password@yourowncloud.com/remote.php/
webdav/folder/database.kdbx

And just to have one more example (more’s always helpful, right?), let’s assume your username is James and your password is mockingbird12 and your Owncloud is installed at www.jamescloud.com and your keepass database named keepass.kdbx is in the root folder. Your Kypass WebDAV would point to:

http://James:mockingbird12@jamescloud.com:80/remote.php/webdav/database.kdbx.

As of Kypass v.3:

http://James:mockingbird12@jamescloud.com:80/remote.php/
webdav/database.kdbx
.

Pretty simple, huh?

Kypass Keepass Owncloud

I haven’t bothered getting it to work fully over https and I believe some others in the comments I linked earlier had issues with it as well. The developer stated 6 days ago that he sent an update for the app to Apple to get approved that fixes using Kypass over https with Owncloud. If you manage to get it working, let me know in the comments what your Owncloud settings and Kypass settings are. If you have any trouble getting it to work like I described, please leave a message and let me know and I’ll try to help you troubleshoot it. I’ll be trying to find some to-do list apps for the iPhone that use WebDAV so I can share grocery lists and to-do lists with my wife and other people and will post a guide when I find something.

Changes to this post as of Kypass v.3:

I’m not sure if it was a change in Kypass v.3 or a change in the way Owncloud handled HTTP vs HTTPS requests or WebDav, but I had to remove the port 80 from my address in order for Kypass to see the file. I’m leaning towards it being an Owncloud thing though because I couldn’t get mobile Safari to see the database file with port 80 in it either. So if you’re having trouble with it not seeing the file, try removing the port. If you don’t have the port in the address and Kypass still doesn’t see it, try adding port 80 like the striked out previous instructions above have, and make sure you’re not using HTTPS.

6 Comment(s)

  1. I prefer copy.com. Quite new, but perhaps the new dropbox.

    If you register with the link below you get 20 GB instead of 15 GB.

    Furthermore you earn 5 GB ! of extra free storage for yourself each time you introduce someone new to Copy. However, this is a limited time opportunity during the promotion phase.

    https://copy.com?r=ZwE0u7
    Note from admin: This is a referral link to copy.com, Muffi (I don’t know him) will receive more free storage by people using his referral link to sign up. I don’t mind him sharing this and if you’d like to help him out, he would appreciate it I’m sure

    Muffi | Jul 22, 2013 | Reply

  2. v2.4.1 is available now 🙂 https ready…
    Don’t hesitate if you need something else.

    RedBug | Jul 22, 2013 | Reply

  3. Won’t opening it on an apple device ruin your “avoid NSA” plan? 🙂

    Lars | Jul 23, 2013 | Reply

  4. @ Lars, gotta take what you can get I guess… It’s a step in the right direction.

    @ RedBug, wow comment from the dev of Kypass! Thanks for a great app and thanks for the heads up on the update. I’ll try it out very soon and will let you know if I have any issues. I will say that the method of connecting to WebDAV is a bit unintuitive. I grabbed a program called Notebooks and am in the process of trying it out now. The WebDAV connect settings have a place for description, directory, username, password, etc. It’s probably easier for the average user to figure out than the chain of http address Kypass makes use of. Thanks again for a great app and I’ll definitely give feedback if I have any issues.

    Rants&Raves | Jul 26, 2013 | Reply

  5. Great article. I will try KyPass with WebDev.
    I have OwnCloud setup with SSL. Strange thing is … OwnCloud mobile client (iOS) does not sync the kdbx files for reasons beyond me. So once you install OwnCloud mobile app, the kdbx file syncs once…and that’s it, doesnt pickup changes past that point.

    Charlie | Mar 26, 2014 | Reply

  6. Just like Charlie (in 2014), I can connect and open my kdbx, the first time, access it, make changes, but it doesn’t sync back to my ownCloud (over SSL). When I do “File Sync”, my file disappears, along with all changes, since my file back on my ownCloud, never updated. Help?

    Roberto Perez | Apr 5, 2021 | Reply

Post a Comment