# How to set a file as key file for a particular .kbdx database?

**URL:** <https://forum.authpass.app/t/how-to-set-a-file-as-key-file-for-a-particular-kbdx-database/39>\
**Category:** User Help\
**Created:** [November 7, 2020, 5:28am UTC](https://forum.authpass.app/t/how-to-set-a-file-as-key-file-for-a-particular-kbdx-database/39 "2020-11-07T05:28:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![aahnik](https://forum.authpass.app/user_avatar/forum.authpass.app/aahnik/32/16_2.png) [@aahnik](https://forum.authpass.app/u/aahnik)\
**Post date:** [November 7, 2020, 5:28am UTC](https://forum.authpass.app/t/how-to-set-a-file-as-key-file-for-a-particular-kbdx-database/39/1 "2020-11-07T05:28:53Z")

</div>

I could not find any way yet. Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![hpoul](https://forum.authpass.app/user_avatar/forum.authpass.app/hpoul/32/6_2.png) [@hpoul](https://forum.authpass.app/u/hpoul)\
**Post date:** [November 7, 2020, 7:07am UTC](https://forum.authpass.app/t/how-to-set-a-file-as-key-file-for-a-particular-kbdx-database/39/2 "2020-11-07T07:07:08Z")

</div>

You have to specify the keyfile when you open the kdbx file.

If I understand you correctly your would like to be able to have the app remember the keyfile, but not the password? This is probably the same as [https://github.com/authpass/authpass/issues/123](https://github.com/authpass/authpass/issues/123)

---

<div class="post-metadata">

**Author:** ![hpoul](https://forum.authpass.app/user_avatar/forum.authpass.app/hpoul/32/6_2.png) [@hpoul](https://forum.authpass.app/u/hpoul)\
**Post date:** [November 7, 2020, 7:08am UTC](https://forum.authpass.app/t/how-to-set-a-file-as-key-file-for-a-particular-kbdx-database/39/3 "2020-11-07T07:08:21Z")

</div>

Or do you mean changing the keyfile (and master password) for a kdbx file?

---

<div class="post-metadata">

**Author:** ![aahnik](https://forum.authpass.app/user_avatar/forum.authpass.app/aahnik/32/16_2.png) [@aahnik](https://forum.authpass.app/u/aahnik)\
**Post date:** [November 7, 2020, 7:11pm UTC](https://forum.authpass.app/t/how-to-set-a-file-as-key-file-for-a-particular-kbdx-database/39/4 "2020-11-07T19:11:08Z")

</div>

I am new to kbdx  
I am asking how to set the key file for the first time for a kbdx database.

When I create a new database , I set a master password, which is used to unlock the database every time.

But how do I set the key file for that database for the first time ?

---

<div class="post-metadata">

**Author:** ![aahnik](https://forum.authpass.app/user_avatar/forum.authpass.app/aahnik/32/16_2.png) [@aahnik](https://forum.authpass.app/u/aahnik)\
**Post date:** [November 8, 2020, 6:37am UTC](https://forum.authpass.app/t/how-to-set-a-file-as-key-file-for-a-particular-kbdx-database/39/5 "2020-11-08T06:37:30Z")

</div>

@hpoul I don’t mean changing. I am asking how to set a key file for the first time ?

---

<div class="post-metadata">

**Author:** ![hpoul](https://forum.authpass.app/user_avatar/forum.authpass.app/hpoul/32/6_2.png) [@hpoul](https://forum.authpass.app/u/hpoul)\
**Post date:** [November 8, 2020, 8:53pm UTC](https://forum.authpass.app/t/how-to-set-a-file-as-key-file-for-a-particular-kbdx-database/39/6 "2020-11-08T20:53:18Z")

</div>

ok got it. (changing and setting the first time is kind of the same thing for me 😅) Right now this is not supported directly, unfortunately. [https://github.com/authpass/authpass/issues/46](https://github.com/authpass/authpass/issues/46)

btw. how would you like to set it - do you have a file you would like to use as a keyfile, or would you like to generate a random new one?

(i also fear a bit about usability, some people are really confused by the concept of a “keyfile” - some users have even referenced the `kdbx` file as their keyfile 🤷‍♂️not sure how to make this obvious to reduce friction. Or maybe hiding it behind an “advanced” button or similar)

---

<div class="post-metadata">

**Author:** ![aahnik](https://forum.authpass.app/user_avatar/forum.authpass.app/aahnik/32/16_2.png) [@aahnik](https://forum.authpass.app/u/aahnik)\
**Post date:** [November 9, 2020, 3:55am UTC](https://forum.authpass.app/t/how-to-set-a-file-as-key-file-for-a-particular-kbdx-database/39/7 "2020-11-09T03:55:07Z")

</div>

> [@hpoul](#):
>
> btw. how would you like to set it - do you have a file you would like to use as a keyfile, or would you like to generate a random new one?

I would currently love to use an existing file as key file.

From the docs of keepass I learnt that any file ( of common mime types ) can be used as a key file. Just that the data in the file should be random.

And the concept of generating a keyfile is also cool. That would ensure a high security.
