Hugo pages in gitlab with TLS lestencrypt certs


I was trying to follow this instructions to create and put TLS certs to my site but, I was not sure how to create the .acme directory and present the files. I tried to follow the hugo quickstart but, that did not work.

using hugo creative theme
my project sysadminonlinux / page · GitLab

1 Like

Just put it in your static directory. It will be copied to the root of the site when it’s generated in /public/

For example:


Then when you build the website, you will have:


and then letsencrypt servers can easily access it like so:

Once you do this, they will generate a certificate and key for you. Now you can follow the rest of the tutorial.

I read the tutorial and I can see how it can be a bit confusing. In Hugo you don’t have to serve it via a content page (.Page). You can simply drop it in static and it will be show up exactly how it needs to for letsencrypt crawler.

1 Like

thank you! that worked perfectly!

1 Like

I’m glad. :slightly_smiling:

Please mark the post as [Solved]. Thanks! :slight_smile: