Hugo pages in gitlab with TLS lestencrypt certs

hello,

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

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:

/static/.well-known/acme-challenge/5TBu788fW0tQ5EOwZMdu1Gv3e9C33gxjV58hVtWTbDM.html

Then when you build the website, you will have:

/public/.well-known/acme-challenge/5TBu788fW0tQ5EOwZMdu1Gv3e9C33gxjV58hVtWTbDM.html

and then letsencrypt servers can easily access it like so:

http://yoursite.com/.well-known/acme-challenge/5TBu788fW0tQ5EOwZMdu1Gv3e9C33gxjV58hVtWTbDM.html

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.

thank you! that worked perfectly!

I’m glad. :slightly_smiling:

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