/go/openssl: openssl from the Command Line

/go/openssl handles paid SSL certificates, the ones you buy from a certificate authority (CA) rather than get free from Let's Encrypt. Getting one takes four steps, and the command covers three of them: It can also remove a domain's SSL files with delete. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# 1. Create the private key and the CSR
/go/openssl example.com

# 2. Show the CSR, and send it to your certificate authority
cat /etc/ssl/example.com/example.com.csr

# 3. Save the certificate as /etc/ssl/example.com/crt.pem
# and the CA bundle as /etc/ssl/example.com/bundle.pem

# 4. Install the certificate
/go/openssl example.com install

Options

Argument Required Notes
<domain> Yes The domain of the hosting account. Use all to go through every domain.
install No Checks and installs the certificate files.
delete No Removes the SSL files and rebuilds the web server configuration.
(no action) No Creates the private key and the CSR.

Examples

# Create the key and the CSR for example.com
/go/openssl example.com
cat /etc/ssl/example.com/example.com.csr

# Install the certificate after saving crt.pem and bundle.pem
/go/openssl example.com install

# Remove the SSL files of a domain
/go/openssl example.com delete

# Create keys and CSRs for every domain
/go/openssl all

Output

Action What you get
Create a CSR Nothing is printed. The files are saved in /etc/ssl/<domain>/.
install SSL Certificate installed successfully. and Certificate expires on: <date>
install with a problem Invalid Certificate., Invalid Certificate Authority Bundle., or Private Key and Certificate do not match.
delete Nothing, apart from the output of the web server rebuild and reload.

install, delete, and all always end with exit status 1, even when they work.

Every run is logged to /var/log/go/openssl.log with a timestamp and the arguments used.

See the full reference at /go/openssl and the GoAdmio command index.

GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.

By:

Posted in:


Leave a Reply

Your email address will not be published. Required fields are marked *