How can I use a Let's Encrypt SSL certificate?

The Easy Way

Edit your site and flip the Let's Encrypt switch!

Note that this option is available only for domains that are using Opalstack's name servers. If your site domain uses external name servers and attempt to save your site with LE enabled, DNS verification for LE will fail for those domains and the control panel will notify you of this.

Please read step 6 "Configure your HTTPS options" under Adding Sites for more information.

The Manual Way

1

Create a site by following the instructions here: Building a Site.

The rest of this procedure assumes that you're using a PHP or static application for your site, and uses the following values which you will need to change to match your specific user, app, and domain:

  • myuser is the shell user name
  • myapp is the application name
  • mydomain.com is the domain name
2

Log into your server via SSH with the shell user that you created in step 1 above.

3

Execute the following commands in your SSH session to create your certificate:

mkdir ~/certbot
certbot certonly --webroot-path /home/myuser/apps/myapp \
 --config-dir /home/myuser/certbot/ \
 --work-dir /home/myuser/certbot/ \
 --logs-dir /home/myuser/certbot/ \
 -d mydomain.com -d www.mydomain.com

Follow the onscreen prompts in your SSH session to create the certificate.

4

Follow our instructions for adding a certificate to the panel, using the contents of the following files for the certificate details:

  • Certificate: /home/myuser/certbot/live/mydomain.com/cert.pem
  • Intermediate Certificate: /home/myuser/certbot/live/mydomain.com/chain.pem
  • Key: /home/myuser/certbot/live/mydomain.com/privkey.pem

You can use the cat command in your SSH session to get the contents of the files, eg cat /home/myuser/certbot/live/mydomain.com/cert.pem, which you can then copy from your terminal and paste into the control panel form for your new certificate.

5

Finally, assign the certificate to your site.

🎉 Congratulations - you now have a website encrypted with a manually-generated free Let's Encrypt SSL certificate!