Re-installing and Let's Encrypt

If, for any reasons (e.g. due to the failing migrations requiring re-installations or any other “experimenting”) you have to perform a few subsequent rebuild-app’s, what would be the safest way to ensure the already existing Let’s Encrypt cert is re-used and not re-issued?

As I understand (this is what I saw in some post here), after a few tries Let’s Encrypt blocks your cert for some time (days?), hence the question.

Rebuild should not reissue a certificate every time, only when it is due for renewal,

If you are wiping the server and then re-installing discourse then it will become a problem.

1 Like

Are you sure? I mean, “should not” or “will not”? In my case after probably the 4th discourse-setup within the same existing installation the server finally started to “time-out” (for a few days). There are many posts here advising to use ./discourse-setup when you need to modify setup details, emails etc.
There are those 3 lines in the app.yml:

## Uncomment these two lines if you wish to add Lets Encrypt (https)
  - "templates/web.ssl.template.yml"
  - "templates/web.letsencrypt.ssl.template.yml"

but I’m not sure whether commenting them out means the existing cert will be left/reused or there will be no cert at all.

Did it work and got a certificate and you didn’t change the hostname after that?

You get no cert if you comment them out.