Setting Up KeePass For Centos 6

This mini-howto describes how to set up KeePass on Centos 6. It requires building mono from source and installing the "portable" version of KeePass. Finally there are a few tweaks that need to be done so that it can execute properly.


Building mono

To build mono, follow the steps described in Installing Mono in CentOS 5.x/6.x with the following modifications:

  • You are instructed to add the epel repository. I strongly recommend using the yum priorities plugin and setting the epel repo to lower priority.
  • Get the most recent mono source [tarball] from mono source directory The latest version as of this writing is 3.2.0. Also note that it is a bzip2 file. So that changes the steps to

    $ wget
    $ tar jxvf mono-3.2.0.tar.bz2

  • I like to save the output of running make and also prefer to run make as an ordinary user instead of root. So I suggest first building mono with make as follows:

    $ make 2>&1 | tee make.log

    Then you have the make.log file to check if you run into any problems. Now you can become root and do the make install:

    $ make install


Install Portable KeePass (ZIP Package)

The next step is to install the portable version of KeePass. Go here. Choose the Professional Edition portable package. After downloading the ZIP file, make a directory for KeePass (I create one under my home directory).

$ mkdir KeePass
$ cd KeePass
$ unzip <path to zip file>/


Libray Tweaks

If you try to run KeePass (from the KeePass directory where you unzipped it), you will get an exception like:

System.DllNotFoundException: /usr/local/lib/

libgdiplus was one of the packages you installed earlier. Checking the files that were installed:

$ rpm -ql libgdiplus


We need to make a symlink (in the install directory tree -- /usr/local/lib in our case) for Become root and do the following:

# cd /usr/local/lib
# ln -s /usr/lib64/
# ln -s /usr/lib64/
# ln -s /usr/lib64/

You will still get a System.DllNotFoundException even after this. The problem is that /usr/local/lib is not in the So the final steps are:

# cd /etc/
# echo /usr/local/lib > local.conf
# ldconfig

After this KeePass should run and you will hopefully be all set to make your passwords much more secure.


Desktop Setup

Assuming you are using Gnome desktop here's how to add an application menu item to the Applications Menu and optionally to the Panel. First download the KeePass png icon from KeePass icon Put it in the same directory where you unzipped the portable KeePass zipfile. Next install the alacarte menu editor for the Gnome desktop:

# yum install alacarte

You can of course skip that step if you already have alacarte installed. Next -- start (as the desktop user, not root) alacarte

$ alacarte

This will bring up the menu editing window. In the left panel you will see the categories under "Applications". I clicked "Internet", and then press the "+ New Item" button on the right. This will pop up a dialog where you enter the information to start KeePass. Click on the icon button and browse to the png icon. In the "command" field make sure to use the full path to both mono and KeePass.exe. After you are done you should find KeePass in the Applications->Internet menu (or whereever you chose to put it).

Share this page:

9 Comment(s)

Add comment


From: JohnP

Why not just load KeePassX instead?

Don't know about CentOS, but KeePassX is part of the Ubuntu repos.

$ sudo apt-get install keepassx



Centos does not have KeePass or KeePassX available via yum repos. That's the reason I wrote this article. This is, after all, the Centos section. Anyone who wants to run Ubuntu won't need this article.

From: Anonymous

Keepassx is in epel. Also, it does not require mono.

From: Anonymous

Keepassx does not support Keepass v2 databases.

From: alexnogard

To go further, you can sync Keepass with Google drive :)



From: alexnogard

Nice article :)

To go further, I wrotte an article about Keepass add-on :

Sync Keepass Database on Google Drive


Instead of building mono (link in the article is no longer reachable) do the following:

yum install mono-core mono-winforms

This was enough to allow keepass to run for me. (Centos 6.5)

Also since you are not building mono, you don't need to add symlink for the libraries.  It just works.

Adding /usr/local/lib directory to ld.conf is also simplier

ldconfig /usr/local/libq



From: Raj

This worked for me on Centos 7. Along with mono-core and mono-winforms, it offered to install 8 other dependency packages, in which libgdiplus was also included. Once you are done installing, you just need cd into the unzipped files directory and run it by using the command:

mono KeePass.exe

From: GJSmith3rd

I tried both methods - compiling, and installing mono-core and mono-winforms from epel repo.  The latter did not work for me on CentOS 6.6 with KeePass 2.28 Pro portable. I encountered a incompatible version with KeePassHttp.plgx. 

I went back to the compile method and all works fine.

I read some reports that solving the version incompatibility problem could be accomplished by using the Newtonsoft.json.dll and KeePassHttp.dll instead of the KeePassHttp.pglx file.  That didn't work for me.

Thanks for this post and comments all.  I really needed to get KP2 running on a little sandbox running OpenShift Origin. I didn't want to run headless and KP2 was the deal breaker.