Automated LetsEncrypt on GitLab Pages

Edit 2020-03-17: This has been obsolete for a while now. GitLab has baked-in LetsEncrypt infrastructure, so go use that!

The two links above describe how to set up an auto-renewing LetsEncrypt SSL Certificate on gitlab pages. The instructions were easy to follow, and worked without any major fuss.

Since we’re using Hugo here, make sure the .gitlab-ci.yml file references the output path static/.well-known/acme-challenge.

The CI environment variables where you will configure CERT_DOMAINS, CERT_OPTIONS, and CERT_TOKEN is located in the project settings, under “CI / CD”. Make sure to set CERT_TOKEN as Protected!

Create a “Scheduling Pipeline”. In theory if I ever had multiple scheduled jobs, then each should have a JOBNAME variable to check against in the job configuration?

Lastly, create the “User Access Token”, with api scope. Make sure to save the token somewhere safe in case you accidentally lose it.


bookmarknotes

144 Words

2019-01-12 00:13 +0000

2020-03-17 16:29 +0000