Setting up Let’s Encrypt with Multiple Domains

If you do not have https configured already (you do if you have done a standard install recently) see Setting up Let’s Encrypt as your first step,

Step 1 - letsencrypt

It’s pretty simple really, add something like the following to your app.yml hooks section:

  after_ssl:
    - replace:
        filename: "/etc/runit/1.d/letsencrypt"
        from: /--keylength/
        to: "-d second-domain.com -d www.second-domain.com -d other-domain.com -d www.other-domain.com --keylength"

If you just want to have https configured for a second domain that will redirect to the correct one (e.g., your forum is community.example.com and you want people who visit https://forum.example.com be redirected without a certificate error), that’s all you need.

23 Likes