How do I add a self-signed certificate for a domain through the CLI?

How do I add a self-signed certificate for a domain through the CLI? I am using Cloudflare in SSL FULL mode, I need a self-signed certificate

v-add-web-domain-ssl $user $domain /folder/with/selfgeneratedssl/

1 Like

Thanks, but I don’t understand what command to generate self-signed certificates that will put in /folder/with/selfgeneratedssl/

v-generate-ssl-cert will return a folder if you run:
ssl=$(v-generate-ssl-cert “$domain” “[email protected]$domain” US CA “Orange County” HestiaCP IT “mail.$domain” | tail -n1 | awk ‘{print $2}’);

$ssl will contain your folder where they are located

-add-web-domain-ssl $user $domain $ssl

should work fine

After you are done don’t forget to remove
$ssl folder

1 Like

You helped me out. I am very inspired by the speed and quality of the user support. Thank you for your enthusiasm.
My steps. I hope this is correct practice, correct me if it is not:

1.) v-generate-ssl-cert test.com [email protected] US California San Francisco MyCompany LLC
Directory: /tmp/tmp.YgJ9EMs93z
2.) v-add-web-domain-ssl user test.com /tmp/tmp.YgJ9EMs93z

How do I specify in which folder to write the certificates? The tmp folder is not suitable

Directory is generated via:

# Create temporary work directory
workdir=$(mktemp -d)
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.