Install Let's Encrypt SSL manually on Run Cloud

February 20, 2018 1.3k views
Let's Encrypt WordPress Nginx Apache Ubuntu Ubuntu 16.04

I'm running my WordPress site via runcloud.io service and in the free account, there's no automatic option for Let's Encrypt Integration. How can I manually install the Let's Encrypt?

I tried with the certbot but it affects the runcloud.io Nginx configuration.

2 Answers

Runcloud support Let's Encrypt directly as part of their Pro plan. As Runcloud manages the Nginx instance on your server, certbot's Nginx integration is unlikely to work with it. Though, it may be possible to create a certificate in certonly mode and then upload it to Runcloud manually.

You will need to make one change to the Nginx config first, but luckily they do provide a way to include a custom directive in the /etc/nginx-rc/extra.d/ directory. Adding one that allows access to .well-known will allow certbot to respond to the Let's Encrypt challenge to verify your domain. Like so:

    location ~ /.well-known {
        allow all;
    }

Next, run certbot in certonly mode replacing the webroot path with the one used by Runcloud (e.g. /home/runcloud/webapps/runcloud-blog;):

  • sudo certbot certonly --webroot --webroot-path=/var/www/html -d example.com

After running through the prompts, all the needed certificate file will be available in /etc/letsencrypt/live/example.com/ You will then need to download those files and re-upload them through Runcloud's interface, allowing them to configure SSL for your domain in Nginx.

The major drawback to this approach is that you will not be able to use cerbot's auto renewal functionality.

You may use https://github.com/rehmatworks/runcloud-letsencrypt in order to install Let's Encrypt SSL certs on both paid and free plans of RunCloud.

Disclaimer: I'm the author of this script.

Have another answer? Share your knowledge.