Link KeePass databases easily?

10.01.2019 -

Data scandals, as happened again recently, show time and again: it is important to protect and manage your passwords well. KeePass is a popular password management tool. In the article "Password management in 5 minutes" we have already given an introduction on how to set up the solution quickly. In this article, I want to show you how you can easily link KeePass databases.

Linking KeePass databases - what for?

When you work on projects, you usually have several passwords. Of course, you shouldn't write them on post-its so that you can remember them. If you are working on a project with several people, it doesn't make password management any easier. This is where KeePass and the linking of databases comes into play. This allows you to save passwords in a database, which can then be accessed by selected people. This means you only have to remember one password and can then access all saved passwords.

If you are working on a project with several employees, not everyone needs to work on their own database. It is advisable to create a main database. This way, employees can access a project database and do not have to remember a separate password for each database. In addition, the project is together and organized and not scattered. For example, you can create a database as a project overview in which several databases are stored.

How To: Linking databases with KeePass

To link databases, simply follow these instructions. It is not difficult and does not take long.
Instructions:

  1. Start KeePass.
  2. Change URL overrides: Tools -> Options -> Integration -> URL Overrides -> activate kdbx
    KeePass URL overridesKeePass URL overrides kdbx
  3. Register with the desired database to.
    Link KeePass databases
  4. Left-click on a group. Go to the field on the right-hand side, which contains "Title, username, password, URL and comments" by default. Right-click in this field.
  5. Select 'Add entry ...'
    Add KeePass entry
  6. In 'Title' you can assign a name to the database link.
  7. For 'Password', enter the password that you also use to access the database to be added.
  8. It is advisable to add comments for clarity.
  9. For URL, enter the path to the database to be added. Make sure that the path is structured as follows: kdbx://"C: \Projects\Keepass1.kdbx" Confirm with 'OK'.

You can now open the other database by pressing Ctrl+U or double-clicking on the URL column.

Open certain databases when starting the main database

However, if you work with several databases and do not want to open them separately each time, you can use a plug-in to set several linked databases to open when you start one database. This saves time.
This is how it works:

  1. Download the KeeAutoExec plug-in.
  2. Now you have to find the 'Plugins' folder of KeePass and drag in the downloaded files unpacked. The folder is usually located under: C:\Program Files (x86)\KeePass2x\Plugins
  3. Create a new group with the name 'AutoOpen' (Note: How to create a new group, see above).
  4. Jetzt sollte ein neuer Eintrag in der soeben erstellten Gruppe AutoOpen angelegt werden. Dies sollte im gleichen Schema wie bereits oben gezeigt ablaufen. Aber in diesem Fall die URL ohne –> kdbx://““<– angeben.

 

Combine with double-click on the URL and automatic opening

It is also possible to combine these two linking options so that databases can be opened both automatically when KeePass is started and manually. This offers convenient operation of the databases via KeePass. However, it is important to note:

  • Wenn man die URL mit –>kdbx://““ <– schreibt, dann lässt sich die Datenbank nicht automatisch öffnen.
  • Wenn man es ohne angibt –>kdbx://““<– dann kann man es nicht mit einem Doppelklick öffnen.
  1. Go to the AutoOpen Group and then click on the desired database.
    KeePass databases automatic opening
  2. Select Edit entry.
  3. Nun müssen Sie nur noch auf den Reiter ‚Eigenschaften‘ klicken und bei ‚URL überschreiben‘ (z.B. um einen bestimmten Browser zu verwenden) eingeben: –> kdbx://“{URL}“ <–
  4. Press 'OK' to confirm.

By automatically opening the database, you no longer have the effort of unlocking all the databases you need individually.

Special case: Use of a key file (key file)

If a key file is used, something else needs to be set.
How exactly this is done is explained in the following section.

  1. Go to the desired entry, right-click on it and select Edit Entry
    Edit KeePass entry
  2. Enter the path to your key file under "User name:"
  3. Write only the URL to the database in URL (without kdbx://"")
    KeePass URL to the database
  4. Add the following text under the Properties tab for Override URL:

    cmd://"{APPDIR}\Keepass.exe" "{URL}" -keyfile:"{USERNAME}" -pw-enc:"{PASSWORD_ENC}"

    KeePass Override URL

Once these steps have been completed, a database that is protected with a key file can also be opened with a double-click.

Conclusion
KeePass is a good tool for organizing the password storage of projects. KeePass can also be automated in many ways, more here.

Back to overview

12 comments on "Link KeePass databases easily?"

  1. Hello,

    First of all, thanks for the great instructions!
    For those who have a problem with kdbx://"" and spaces in the path: I use this successfully with Keepass version 2.45 without the quotation marks, i.e. only with kdbx://, e.g.
    kdbx://Z:\The directory\thefile.kdbx

    Mit AutoOpen ist die URL auch ohne Gänsefüsschen, und beim „Override URL“ (um AutoOpen und Doppelklick-Öffnung zu kombinieren) ist auch nur folgendes eingetragen:
    kdbx://{URL}
    ohne Gänsefüsschen ;)

    LG,
    Mario

  2. Hello Reiner,
    I have tried, unfortunately without success, to reproduce the error described.
    For me, the linking of the databases also works with spaces in the database and/or key file path.
    Your comment will certainly help other readers who encounter the same error.
    Many thanks for your help and the comment.
    Best regards Malte

  3. Thanks Malte

    I had similar problems to Leo. It seems that in this case Keepass can't handle spaces in the path despite the "goose quotes".

    In Leo's entry 07.06.2019 at 22:47 he has exactly the behavior that I also have when I proceed as in your instructions and have a space in the path. (Umlauts, on the other hand, it tolerates without any problems)

  4. Hello Kalle,
    thanks for your comment.
    This post is all about how databases can be linked in KeePass.
    By collecting passwords in a database, you no longer have to remember so many passwords.
    The goal is not just to open one entry, but the entire database.
    As described above, you can open another database by double-clicking on the URL.
    All you have to do is follow the steps described above.
    I hope the post is understandable enough.
    If you have any further questions about the topic or post, please feel free to ask.
    Best regards Malte

  5. Hello Leo,
    Thank you for your comment. I apologize for the delay.
    The error you mentioned results from the fact that the so-called encoding (character encoding) does not match.
    The computer interprets the quotation marks that you have copied from the text differently than the
    quotation marks that you write with the keyboard.
    The "correct" encoding is now used in the text. Thank you for your help!
    Troubleshooting:
    Copy the text that must be entered for "Override URL" again.
    If this does not work, replace the quotation marks from the text with quotation marks that you write with your keyboard.
    If you have any further difficulties or questions, please feel free to contact us.
    Best regards Malte

  6. I actually wanted to implement additional databases from Keepass in Keepass, which has not worked so far. The hint at the top with the URL and kdbx including the folder of the 2nd DB is quite nice, but if I write the password of the 2nd DB in the 1st DB, this doesn't really help me at all as far as the nesting of password databases is concerned.
    Double-clicking on the added entry opens the entry, but not the 2nd database.

  7. Hi Malte,
    First of all, thanks for your efforts and the additional instructions. Unfortunately without success :-/

    As soon as I double-click on the URL to open the database, an error message appears
    File/URL: "C:Program
    Arguments: Files (x86)\Keepass Password Safe 2\...
    etc

    The system cannot find the specified file.
    I have also put my files dQDirectly on the desktop or somewhere else and always the same result.
    Any other ideas? Thank you very much
    Leo

  8. Hello Leo,
    Thank you for your question. I have added this scenario to the post. You will find your answer in the bottom section under "Special case: Use of a key file".
    I hope this has helped you.
    Regards Malte

  9. Hi,
    Really good instructions and many thanks for them! I have now packed my fiancée's folder into a database so that I can open it with a double click.
    Unfortunately, this does not work as soon as a key file is used. Do you have a solution for this? So that I don't always have to take the detour via open file etc.?
    Thanks for your help
    Best regards
    Leo

  10. Hey Patrick,
    thanks for your message! Here are a few tips on how it can work well

    Eigentlich müsste [ kdbx: cmd://“{APPDIR}\KeePass.exe“ „{URL}“ -pw-enc:“{PASSWORD_ENC}“ ] schon per default bei den URL-Überschreibungen gelistet sein. Falls dies bei dir nicht der Fall war – danke dir in jedem Fall für die Information!
    Beim automatischen Öffnen wird der Pfad, wie oben beschrieben, NICHT mehr mit [ kdbx://““ ] angegeben. Stattdessen wird nur noch der reine Pfad angegeben. Anführungszeichen werden nur bei der URL Angabe mit [ kdbx://““ ] benötigt, nicht bei AutoOpen.

    The database automatically opens in a new tab. If it opens in a new window for you, it could be due to a different KeePass version or a changed configuration. I am using KeePass version 2.40. I hope I could help you.

    Do you have any questions or tips? Then feel free to comment!
    Greetings Malte

  11. Hello, it didn't really work for me.

    I had to make the following changes:

    1. Bei der URL-Überschreibung eine eigene Überschreibung für Schema kdbx: cmd://“{APPDIR}\KeePass.exe“ „{URL}“ -pw-enc:“{PASSWORD_ENC}“

    2. in my entry for URL the path without quotation marks Ex: G:\my_path\database.kdbx

    Eine Frage hätte ich noch. Obwohl ich unter Eigenschaften den Wert kdbx://{URL} eingetragen habe, öffnet sich beim öffnen der Datenbank die zweite nicht automatisch, sondern ich muss diese erneut anklicken. Oder verstehe ich AutoOpen nicht richtig? oO

    A second question. Is it possible to open the database in a new tap? Currently, a new window always opens.

    Thanks and greetings
    Patrick

Write a comment

Your e-mail address will not be published. Required fields are marked with *

*Mandatory fields

*