Move Keys to encrypted volume?

I used gpg many years ago and have now come back to it. I’m using Win 11 and have an encrypted volume using “VeraCrypt” is it possible to move the Key files to that volume and point Kleopatra to use that location rather than the default.

Hi @Johnnyg,
welcome back to GnuPG and Gpg4win then. :slight_smile:

You can point the environment variable GNUPGHOME or a registry key to a different directory for your key material and configuration files. See Agent Options (Using the GNU Privacy Guard)

As far as I know “veracrypt” just offers encrypted drives like any other file system paths, so it should be fine to use.

Regards,
Bernhard

Thanks for the reply.

I had looked for a registry entry but couldn’t find one. Looks like I need to create it.

Thanks again.
Regards
John

I was doing something very similar recently, except I didn’t need to change anything in the Registry. I was able to move my configuration files including the keys by copying the current home folders contents in their entirety over to a VC drive (the old location for me was the default “C:\Users\MyUserName\AppData\Roaming\gnupg”). The only issue I experienced with the transfer of files was with moving the “public-keys.d\pubring.db” which I found could complete once all tasks running in the background were stopped with Task Manager (gpg-agent.exe, keyboxd.exe, scdaemon.exe).

@sds if you move the GnuPG home directory you will have to tell GnuPG where to find it, using --homedir is one method. If stuff works for you, does gpg --version show the new location for you?

It does @bernhard, all preferences and keys are in order just as before.

w/Regards

Sorry forgot to update! Yes moving the Home Dir to the new location and adding HomeDir to the registry works perfectly.

Thanks for the help
J

1 Like