Install KeePass on Mac OSX

Most professionals use multiple highly complex passwords for every purpose  so the only problem usually occurs is saving password somewhere safe and accessible. There are few good choices for storing passwords, some are online such as LastPass and some are off-line in which the passwords will be encrypted and stored in files. The best password manager application I know and ever tested is KeePass.

The main reason why KeePass 2.x  is not so popular in Linux base operating system community is because this software does not have Linux or Mac version, but it is easy to run it on Linux. Mind that there are some native Linux applications such as KeePassX that can handle .kdb files which is used for KeePass 1.x but the KeePass2.x uses another file format which is .kdbx

In this tutorial, I’m going to write the best way to install KeePass on Mac OSX. Also you can find how to install KeePass on Linux in this website.

The following installation procedure is tested on Mac OSX Lion, but basically it should be applicable on most unix-base operating systems if you can install mono on them.

You should go through the following steps to get this done:

  1. Download and install mono
  2. Download and extract KeePass 2.x
  3. Run the KeePass executable file

 

1. Download and install mono

In order to download Mono, you should go to the following website and download the stable version that suites your OS (There is one version for Mac OSX):

http://www.go-mono.com/mono-downloads/download.html

install the Mono on your Mac (or what ever Unix distribution you have).

 

2. Download and extract KeePass 2.x

Download the KeePass from the official website and then download the “Portable KeePass 2.x (ZIP Package)” from the right column as the image below shows:

 KeePass Download Section

then simply extract the ZIP file on your hard drive in what ever folder you want.

 

3. Run the KeePass executable file

after extracting, open the terminal and go to the folder where you extracted the zip file in, and simply use the command below to set the proper permission:

chmod +x KeePass.exe

finally you are good to go and run the KeePass with the following command:

mono KeePass.exe

This way has a simple problem, you can not double click on the keepass to run it, so if you want to open it with double click, you can use a small shell script to load the keepass in mono. to do that, copy and paste the following lines of code to a file named ” KeePass.command ” and then save the file. later on you can run the keepass with double clicking on the shell script you just created 😉

#!/bin/bash
mono /{PATH}/KeePass.exe

remember that the {PATH} should be replaced with the actual path the you extracted your keepass zip file in it.

 

 Update (20.Jul.2014): Felix Geyer who is working on KeePassX on 22.Sep.2010 announced that he is writing KeePassX2 from scratch and in this new version which will be similar to keepass 2.x, he is going to support .kdbx files. At the moment he released his 6th alpha version which has Mac OSx bundle, so you can easily install it via drag and drop into your Application folder. Remember that KeePassX is not official version of famous KeePass and is just a port and it tries to mimic the same functionality.

20 thoughts on “Install KeePass on Mac OSX”

  1. Hey I’m new to mac and I have no idea what your talking about in step 3 you think you can walk me through it step by step? I have been trying to do this for days.

    1. Sorry for answering late, plz send me email (info[at]nixsos.com) so I can help you in a conversation.
      Let me know what part is different in your computer.

    1. You can use keepassx, but it has two drawbacks:
      1. it does not support the .kdbx which is more advanced than .kdb and it is supported in keepass v2.x
      2. keepassx is an “unofficial keepass port”, as stated in http://keepass.info/download.html so basically it means that the developer of keepassx may use some code to highjack some data (which in keepass it means your passwords) and it’s safty is not guaranteed by keepass developers !
      so I personally do not recommend it.

  2. Tried what you wrote, this was the result

    Cannot open assembly ‘KeePass-2.25-Setup.exe’: File does not contain a valid CIL image.

    Suggestions?

  3. i used to use keepass 2x in windows. and I’m new to mac and I have no idea in step 3 how to “open the terminal” and where i can type in the command. waiting for your reply. thanks a lot.

  4. Hi there! Thanks for the well written guide. I’m having some trouble though. I give KeePass.exe executable permissions, and run it by using ‘mono KeePass.exe’, but the program never starts. Sometimes it will return a huge stack trace, but the general error returned is

    “error: Aborting reading of commands after command #4: ‘quit’ failed with .”

    I could send you the whole error trace if you think it will be of help, but I’d really appreciate any idea’s you may have to get this working. KeePass’s lack of support for MacOS is preventing me from being able to switch over to it entirely.

    1. Hi, please send me via email (info -at- nixsos -.- com):
      1. the chain of commands you used during this process of setting up keepass
      2. the chmod status of your .exe file (you can use the following command within your keepass folder:

      ls -al

      3. errors.

  5. Small typo:
    #!/bin/bash/
    should be
    #!/bin/bash
    (without the slash at the end, it’s not a directory)

    Thanks for helping me getting KeePass on my Mac!
    (btw – love the puzzle captcha)

    1. Thanks for the correction, I deleted that extra slash
      and about the article, this site is meant to help people spend relatively less time to solve problem that I’ve already spent some time on. I’m glad you found it helpful.

  6. Hi,

    I’m getting following error when I try: mono KeePass.exe

    Unhandled Exception:
    System.NullReferenceException: Object reference not set to an instance of an object
    at KeePass.Forms.MainForm.CleanUpEx () [0x00000] in :0
    at KeePass.Forms.MainForm.OnFormClosing (System.Object sender, System.Windows.Forms.FormClosingEventArgs e) [0x00000] in :0

    Do you have please any idea? I’m working on Mac OS X Yosemite… But it should be no problem since using mono, or?

    Thank you very much.

    1. Hi,

      I don’t know what went wrong in your case, but I know that there are lot of incompatibility in Yosemite. So I think you should follow the following steps:

  7. I’m getting similar problems as mcnarik. I’ve installed the latest version of mono 3.10 and am also running on Mac OS Yosemite. I’m pretty sure Yosemite has probably broken some of mono’s functions.

  8. Thanks for your help, I’m not very far to succeed but when I try to open my windows file, it doesn’t work. Sometimes, nothing happened, other time I have this message :
    Unhandled Exception:
    System.NotImplementedException: The requested feature is not implemented.
    at System.Windows.Forms.XplatUICarbon.SystrayRemove (IntPtr hwnd, System.Windows.Forms.ToolTip& tt) [0x00000] in :0
    at System.Windows.Forms.XplatUI.SystrayRemove (IntPtr handle, System.Windows.Forms.ToolTip& tt) [0x00000] in :0
    at System.Windows.Forms.NotifyIcon.HideSystray () [0x00000] in :0
    at System.Windows.Forms.NotifyIcon.Dispose (Boolean disposing) [0x00000] in :0
    at System.ComponentModel.Component.Finalize () [0x00000] in :0

    Any idea ?

    1. I haven’t faced it and yet I have no idea what has went wrong there, but please let me know if you got a solution

  9. You can forget the previous message, this times it works (I don’t know why).

    But the shortcut doesn’t work, it seems that i haven’t enought rights…

    Thanks a lot

  10. Hello All — I was having problems with getting KeePass to run on Mac OS X previously using Mono 3.10. However, I just downloaded the latest version of Mono (3.12) and KeePass miracuously opens my kdbx file now!

    I am going to test for a few days before I pronounce everything working but this is a huge step forward. KeePassX was “survival mode” for the last couple of months but it lacks a lot of the features of full-blown KeePass and also has been at Alpha 6 since something like April.

  11. @mcnarik @phil
    First I installed Mono via Brew, that gave me losts of mono errors and no KeePass.

    Installing Mono via the Mono mdk the Mono website gave the expected results. Mono Starts now.

    Also do not forget to install the latest XQuartz: http://xquartz.macosforge.org

Leave a Reply

Your email address will not be published. Required fields are marked *

This is new type of CAPTCHA, make the puzzle please !WordPress CAPTCHA