Running KeePass 2.x on OSX using MacPack

There is no native OSX installer for KeePass. An alternative is running KeePassX but the the 2.0 password safe database format is not cross-compatible with KeePass on Windows. For those of us who keep KeePass databases syncronized between our Windows machines, Apple iPhone’s and Linux desktops, standard file format is important.

One option is to run KeePass under Mono in OSX but this can be a hassle to setup and maintain. The best solution is to install the Mono framework then use MacPack to compile a native OSX APP, as follows:

  1. Install Mono Framework
  2. Download latest version of KeePass 2.x and unpack it
  3. Open Terminal and navigate to unpacked KeePass folder
  4. Run the following command:

    macpack -o:. -m:winforms -r:/Library/Frameworks/Mono.framework/Versions/Current/lib/ libCocoaSharpGlue.dylib -r:KeePass.chm -r:KeePass.XmlSerializers.dll -r:KeePassLibC32.dll -r:KeePassLibC64.dll -r:License.txt -r:ShinstUtil.exe -r:./XSL -n:KeePass -a:KeePass.exe

  5. Confirm the file is built and no errors occur.

This will create a file that you can drag into your \Applications folder or desktop.