# How should I enable letsencrypt while discourse is beside other websites

**URL:** <https://meta.discourse.org/t/how-should-i-enable-letsencrypt-while-discourse-is-beside-other-websites/58107>\
**Category:** Self-hosting\
**Created:** [2017年二月28日 18:26 UTC](https://meta.discourse.org/t/how-should-i-enable-letsencrypt-while-discourse-is-beside-other-websites/58107 "2017-02-28T18:26:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)\
**Post date:** [2017年二月28日 19:20 UTC](https://meta.discourse.org/t/how-should-i-enable-letsencrypt-while-discourse-is-beside-other-websites/58107/2 "2017-02-28T19:20:55Z")

</div>

You can puzzle the steps together by following my guide about setting up an offline page:

> [@Add an offline page to display when Discourse is rebuilding or starting up](https://meta.discourse.org/t/adding-an-offline-page-when-rebuilding/45238):
>
> warning This guide is intended for advanced users, who are already using nginx outside the docker container. By following this guide you make your setup more complicated and will lose some speed benefits like HTTP2 if you’re not running Ubuntu 16.04 or later. Proceed with caution! When Discourse is rebuilding or starting up, your users will usually either see an error message from their browser… …or a not-so-nice 502 error message from Nginx: If you’re a perfectionist …

The guide assumes you start out with Discourse _not_ running behind `nginx` and guides you through setting up `nginx` including Let’s Encrypt and setting up an offline page. You should be able to simply skip what you’ve done already, and stop as soon as the offline page work starts 🙂

(The core idea is to set up Certbot _on the host_, configure `nginx` to redirect most HTTP traffic to HTTPS _but answer `acme-challenge` queries from the webroot_, and teach `nginx` to use the resulting cert.)

---

_[View the full topic](https://meta.discourse.org/t/how-should-i-enable-letsencrypt-while-discourse-is-beside-other-websites/58107)._
