# Re-installing and Let's Encrypt

**URL:** https://meta.discourse.org/t/re-installing-and-lets-encrypt/300358
**Category:** Self-hosting
**Created:** [March 21, 2024, 1:48pm UTC](https://meta.discourse.org/t/re-installing-and-lets-encrypt/300358 "2024-03-21T13:48:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![JPD](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jpd/32/371816_2.png) [@JPD](https://meta.discourse.org/u/JPD)
#### Post date: [March 21, 2024, 1:48pm UTC](https://meta.discourse.org/t/re-installing-and-lets-encrypt/300358/1 "2024-03-21T13:48:33Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [March 21, 2024, 2:09pm UTC](https://meta.discourse.org/t/re-installing-and-lets-encrypt/300358/2 "2024-03-21T14:09:53Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![JPD](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jpd/32/371816_2.png) [@JPD](https://meta.discourse.org/u/JPD)
#### Post date: [March 21, 2024, 6:39pm UTC](https://meta.discourse.org/t/re-installing-and-lets-encrypt/300358/3 "2024-03-21T18:39:02Z")

</div>

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:

```plaintext
## 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.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 22, 2024, 6:53pm UTC](https://meta.discourse.org/t/re-installing-and-lets-encrypt/300358/4 "2024-03-22T18:53:34Z")

</div>

> [@JPD](#):
>
> 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).

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

> [@JPD](#):
>
> commenting them out means the existing cert will be left/reused or there will be no cert at all.

You get no cert if you comment them out.
