# Minimum needed to get LetsEncrypt working on a GCE instance

**URL:** https://meta.discourse.org/t/minimum-needed-to-get-letsencrypt-working-on-a-gce-instance/64853
**Category:** Support
**Created:** [June 21, 2017, 4:43am UTC](https://meta.discourse.org/t/minimum-needed-to-get-letsencrypt-working-on-a-gce-instance/64853 "2017-06-21T04:43:38Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![dmahler](https://avatars.discourse-cdn.com/v4/letter/d/e480ec/32.png) [@dmahler](https://meta.discourse.org/u/dmahler)
#### Post date: [June 21, 2017, 4:43am UTC](https://meta.discourse.org/t/minimum-needed-to-get-letsencrypt-working-on-a-gce-instance/64853/1 "2017-06-21T04:43:38Z")

</div>

I have a working Discourse instance on a GCE instance.  
I have email working through Mailjet by setting smtp\_port=2525  
I am now trying to enable HTTPS.

My reading of [Set up HTTPS support with Let's Encrypt](https://meta.discourse.org/t/setting-up-lets-encrypt/40709)  
is that I just need to uncomment

```plaintext
  #- "templates/web.ssl.template.yml"
  #- "templates/web.letsencrypt.ssl.template.yml"

```

in app.yml and set `LETSENCRYPT_ACCOUNT_EMAIL` to the email address I have registered with Mailjet,  
which is the same as `DISCOURSE_DEVELOPER_EMAILS` and the `From:` address used by Discourse,  
and then rebuild and restart Discourse with

```plaintext
sudo ./launcher rebuild app

```

After that LetsEncrypt/HTTPS should just work automagically if I understand the instructions correctly.  
However I am finding that Discourse just becomes inaccessible after that.  
It becomes accessible again if I undo the above changes and rebuild again.

Am I missing something?  
Is there anything special needed on GCE?

I currently use the GCE external IP as `DISCOURSE_HOSTNAME`,  
which is working fine with regular HTTP.  
Do I need to set up a DNS domain and hotname to wok with LetsEncrypt?

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [June 21, 2017, 4:45am UTC](https://meta.discourse.org/t/minimum-needed-to-get-letsencrypt-working-on-a-gce-instance/64853/2 "2017-06-21T04:45:34Z")

</div>

> [@dmahler](#):
>
> Do I need to set up a DNS domain and hotname to wok with LetsEncrypt?

Yup you’ll need to have a valid hostname in order to get a cert.

---

<div class="post-metadata">

### Author: ![dmahler](https://avatars.discourse-cdn.com/v4/letter/d/e480ec/32.png) [@dmahler](https://meta.discourse.org/u/dmahler)
#### Post date: [June 21, 2017, 4:47am UTC](https://meta.discourse.org/t/minimum-needed-to-get-letsencrypt-working-on-a-gce-instance/64853/3 "2017-06-21T04:47:47Z")

</div>

Thanks! Why does my Discourse become completely inaccessible though rather than keep working through HTTP?

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [June 21, 2017, 4:48am UTC](https://meta.discourse.org/t/minimum-needed-to-get-letsencrypt-working-on-a-gce-instance/64853/4 "2017-06-21T04:48:45Z")

</div>

Because when you uncomment the `web.ssl.template.yml` it redirects all HTTP traffic to use HTTPS. Known issue but not trivial to fix.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 8, 2024, 12:44pm UTC](https://meta.discourse.org/t/minimum-needed-to-get-letsencrypt-working-on-a-gce-instance/64853/5 "2024-06-08T12:44:34Z")

</div>

This topic was automatically closed after 2544 days. New replies are no longer allowed.
