Create public and private GnuPG keys for email encryption in cPanel

To use email encryption the first step is to generate your private and public key for your email address. You can generate these keys in cPanel. Your messages will be encrypted with the private key. The recipients will decrypt the messages using your public key.

Do not give your private key to anyone! Give only your public key.

Steps to generate private and public keys for email encryption:

  1. Connect to your cPanel account
  2. Look for Encryption (EMAIL section)
  3. Here enter the details for:
    – Your Name
    – Your Email
    – Comment or Nickname
    – Key Password (you can use the Password Generator)
    – Expiration Date (1y (1 year) 3w (3 weeks) 5d (5 days) 0 (No expiration date))
    – Key Size (2048 or 4096)
  4. Click the Generate Key button. You will see a message at the top of the page saying “Key is being generated. This may take a few minutes.
  5. Wait for a few seconds and you will see “The Key has been successfully created.” 
  6. Refresh the page and you will see the private and public keys.
  7. To view and copy a key click the View link.
cpanel email encryption
cPanel Email Encryption

To delete the keys, delete the private key. The public key will be automatically deleted. Notice that you can’t delete the public key. If you try to delete the public key, you will receive an error message: “Sorry, you must delete the secret key before removing the public key.

The short video how-to is here:

Generate GnuPG keys


Related KB: How to configure email encryption in Horde Groupware

Leave a Reply