# Add an offline page to display when Discourse is rebuilding or starting up

**URL:** https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238
**Category:** Sysadmins
**Tags:** configuring, how-to, advanced-setup
**Created:** [6월 4, 2016, 8:41오전 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238 "2016-06-04T08:41:48Z")
**Posts on this page:** 20
**Page:** 5

<div class="post-metadata">

### Author: ![eatcodetravel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eatcodetravel/32/94385_2.png) [@eatcodetravel](https://meta.discourse.org/u/eatcodetravel)
#### Post date: [5월 24, 2019, 11:01오후 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/81 "2019-05-24T23:01:58Z")

</div>

Cool good to know, thanks for your feedback

The first post says this

> [@fefrei](#):
>
> This guide is intended for advanced users, who are already using nginx outside the docker container

Is this the only way to do it? We don’t have nginx running outside docker

---

<div class="post-metadata">

### Author: ![marianord](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marianord/32/90502_2.png) [@marianord](https://meta.discourse.org/u/marianord)
#### Post date: [5월 24, 2019, 11:05오후 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/82 "2019-05-24T23:05:18Z")

</div>

Yes, that’s the only way. The idea is to install a webserver (nginx recommended) to serve the request, if Discourse is up it routes it there. If not it does something else. All the installation process is explained step by step.

---

<div class="post-metadata">

### Author: ![amotl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amotl/32/109873_2.png) [@amotl](https://meta.discourse.org/u/amotl)
#### Post date: [6월 27, 2019, 10:19오후 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/83 "2019-06-27T22:19:44Z")

</div>

Hi there,

## Introduction

Thanks for that solution, @fefrei! We’ve implemented this on [https://community.hiveeyes.org/](https://community.hiveeyes.org/) and it works like a charm.

## Further thoughts

However, we would like to reference the related question by @mlinksva at [Site maintenance mode during rebuilds?](https://meta.discourse.org/t/site-maintenance-mode-during-rebuilds/29697) here, as this also resonates with us and does not get solved by the `/errorpages` solution yet. This is about improving the generic text “_Sorry, we couldn’t load that topic, possibly due to a connection problem._”. We will try to outline this in more detail.

### Serving `discourse_offline.html`

This is perfect when users come along fresh to the site.

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/b/7b41c02b6f19e1a4b6ae9dff5250abc37eaf0457.png)

### Serving a different “Sorry for that” text

However, when navigating within Discourse, it will yell at you like

 ![image](https://global.discourse-cdn.com/meta/original/3X/c/b/cb0de4238e3041190c4cd1208fca3fc7cc6633b9.png)

without reveilling anything about the reason.

As we know you already, there will probably be a customization feature for being able to change that text, right? We might just have missed that. We’ve also not investigated whether the Feature _Admin » Backup » Enable read-only_ would solve that already as outlined in [Maintenance Mode?](https://meta.discourse.org/t/maintenance-mode/91300).

Nevertheless, it made sense to us to bring up this topic here again and hope you don’t mind if that would have been silly.

With kind regards,  
Andreas.

* * *

P.S.: [@staff](https://meta.discourse.org/groups/staff): As this discussion somehow spiraled out of control regarding appropriate Nginx or Web server configuration details, I would like to suggest a thorough refactoring by splitting these posts into an appropriately named topic like “Configuring web server for offline page”. I’m sure you will find a good title. Thanks already if you like that suggestion and find it worth to follow.

---

<div class="post-metadata">

### Author: ![amotl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amotl/32/109873_2.png) [@amotl](https://meta.discourse.org/u/amotl)
#### Post date: [6월 27, 2019, 10:33오후 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/84 "2019-06-27T22:33:13Z")

</div>

> [@amotl](#):
>
> As we know you already, there will probably be a customization feature for being able to change that text, right? We might just have missed that.

> [@amotl](#):
>
> If [asking about] that would have been silly.

Now, we actually **do** feel silly after finding it right away as a customizable site text block:

 ![image](https://global.discourse-cdn.com/meta/original/3X/f/7/f7f528f82e639b1d918f6544ec4ab6aa07074e90.png)  
– [https://community.hiveeyes.org/admin/customize/site\_texts/js.topic.server\_error.description](https://community.hiveeyes.org/admin/customize/site_texts/js.topic.server_error.description)

* * *

We’ve changed the standard text `js.topic.server_error.description` to read:

> [@](#):
>
> We’re sorry that we could not load that topic right now, possibly due to a connection problem. This usually means we are currently upgrading the site or performing scheduled maintenance.
> 
> Please check back later. If the problem persists, let us know.

Thanks for listening ;].

---

<div class="post-metadata">

### Author: ![amotl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amotl/32/109873_2.png) [@amotl](https://meta.discourse.org/u/amotl)
#### Post date: [6월 27, 2019, 10:57오후 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/85 "2019-06-27T22:57:57Z")

</div>

> [@amotl](#):
>
> We’ve changed the standard text `js.topic.server_error.description`

Hm. We are not sure if changing that text actually works for us. Do we have to consider something special here when amending this guy?

* * *

Also, we would like to mention that during specific time range while the site was down, it was yelling differently like

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/2/d2ac988d17b2b7a3d756672f242912bf9e85084b.png)

Do you have an idea how we would be able to change that also?

---

<div class="post-metadata">

### Author: ![Juan\_Adamuz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/juan_adamuz/32/86808_2.png) [@Juan\_Adamuz](https://meta.discourse.org/u/Juan_Adamuz)
#### Post date: [8월 27, 2019, 10:12오후 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/86 "2019-08-27T22:12:12Z")

</div>

I use that, but i want a custom offline webpage and im not able to do it

---

<div class="post-metadata">

### Author: ![Bathinda](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bathinda/32/135888_2.png) [@Bathinda](https://meta.discourse.org/u/Bathinda)
#### Post date: [9월 11, 2019, 2:37오후 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/101 "2019-09-11T14:37:51Z")

</div>

> [@fefrei](#):
>
> You must set a reminder run to `letsencrypt renew` before your cert expires in three months. For tips on automating this, see [the certbot documentation](https://certbot.eff.org)

Wonderful guide.  
But if only you had told some commands to auto-renew this certificate also. It’d be a complete guide.  
Because I’ve seen the link mentioned here. But that link only tells to install the certificate fresh. Or to renew it.  
But I couldn’t find the guidance to ‘Auto-renew’ the same.

Thanks.

---

<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: [9월 11, 2019, 2:57오후 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/102 "2019-09-11T14:57:46Z")

</div>

Good point! I updated this section above in the original post ⏫

---

<div class="post-metadata">

### Author: ![tehspaceg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tehspaceg/32/119558_2.png) [@tehspaceg](https://meta.discourse.org/u/tehspaceg)
#### Post date: [11월 30, 2019, 5:29오전 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/109 "2019-11-30T05:29:11Z")

</div>

업그레이드가 진행될 때 더 일반적인 500 에러가 표시되는 것을 다른 분들도 목격하셨나요? 제가 시기를 잘못 잡은 건가요?

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [11월 30, 2019, 6:17오전 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/110 "2019-11-30T06:17:56Z")

</div>

재빌드 중에 컨테이너가 중지되면, 500 에러를 반환할 프로세스가 실행되지 않습니다.

---

<div class="post-metadata">

### Author: ![Alex\_P](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alex_p/32/163548_2.png) [@Alex\_P](https://meta.discourse.org/u/Alex_P)
#### Post date: [12월 5, 2019, 6:00오후 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/111 "2019-12-05T18:00:57Z")

</div>

처음에 제안된 대로 이러한 수동 단계를 피하기 위해 다른 Docker 컨테이너를 사용해 본 사람이 있습니까?

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [12월 6, 2019, 3:11오후 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/112 "2019-12-06T15:11:50Z")

</div>

네, 이미 많은 분들이 그렇게 하셨습니다. [Move from standalone container to separate web and data containers](https://meta.discourse.org/t/how-to-move-from-standalone-container-to-separate-web-and-data-containers/29413) 를 참고해 주세요. 단, 컨테이너를 분리하는 방식은 설치 과정이 더 복잡하며, 메타 사이트의 많은 가이드는 단일 컨테이너(스탠드얼론) 설치를 전제로 하고 있습니다. 컨테이너를 분리하기 전에 두 컨테이너가 각각 어떤 역할을 하는지, 그리고 앞으로 어떻게 상호작용해야 하는지 충분히 이해하고 있는지 확인하시기 바랍니다. 특히 주목할 점은: `./launcher` 명령어의 유효한 대상(target)으로 `app`을 더 이상 사용할 수 없다는 것입니다.

---

<div class="post-metadata">

### Author: ![Alex\_P](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alex_p/32/163548_2.png) [@Alex\_P](https://meta.discourse.org/u/Alex_P)
#### Post date: [12월 6, 2019, 3:34오후 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/113 "2019-12-06T15:34:57Z")

</div>

음, 이 주제에서 왜인지 두 개의 게시물에 여전히 "앞단에 nginx"라고 언급되어 있네요…

그리고 실제로 제가 원하는 것은

- 여기서 오프라인 페이지를 논의하는 것
- 웹 서버에서 http → https 및 루트 도메인 → www로 리다이렉트하는 것입니다. 러시아에서 일부 IP가 차단되어 있어서 Cloudflare를 이를 위해 사용하길 원하지 않습니다.

제가 이해하기로는 웹 전용 컨테이너에서 어떻게 하면 되는지 알아내면 되는 것 같습니다 😀

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [12월 6, 2019, 4:37오후 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/114 "2019-12-06T16:37:17Z")

</div>

이제 좀 혼란스럽네요.

> [@Alex\_P](#):
>
> - 오프라인 페이지를 여기서 논의하기
> - 웹 서버에서 http → https 및 루트 도메인 → www로 리디렉션 설정. 일부 IP가 러시아에서 차단되어 있기 때문에 이를 위해 Cloudflare를 사용하고 싶지 않습니다.

위 두 가지 목표 모두 별도의 컨테이너 구성을 요구하지 않습니다. 위의 두 단계를 설정하되, 각각 독립적으로 별도의 컨테이너를 원하시나요? 아니면 위의 내용을 완료하기 위해 별도의 컨테이너가 필요하다고 생각하여 그렇게 보신 건가요?

---

<div class="post-metadata">

### Author: ![Alex\_P](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alex_p/32/163548_2.png) [@Alex\_P](https://meta.discourse.org/u/Alex_P)
#### Post date: [12월 6, 2019, 4:44오후 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/115 "2019-12-06T16:44:39Z")

</div>

제 이해로는 오프라인(재구축) 페이지 처리는 같은 컨테이너에 둘 수 없는데, 해당 컨테이너가 실행되지 않기 때문입니다. 따라서 현재 주제에서 제안된 해결책은 nginx를 앞에 배치하는 것입니다. 하지만 이 주제에서 논의되었듯이 수동 단계가 많고 OS에 종속적이어서, 이 프론트 nginx를 위해 별도의 Docker 컨테이너를 사용하는 것이 더 안정적이고 유지보수가 쉽다고 생각했습니다.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [12월 6, 2019, 6:31오후 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/116 "2019-12-06T18:31:37Z")

</div>

아, 이제 이해가 됩니다. 그렇다면 이전에 링크한 주제는 무시해 주세요. 그 주제는 Discourse 웹 서버와 데이터베이스를 분리하는 것에 대한 논의였는데, 여기서는 필요하지 않습니다.

Nginx를 운영체제에 직접 설치하는 대신 Docker 컨테이너에 설치하는 것은 분명히 가능하지만, 이를 위한 Discourse 전용 가이드는 제가 알고 있는 바가 없습니다. 이 경로를 선택하신다면, 이 주제의 원포스터(OP)가 설명한 내용(오프라인 페이지 생성 및 Nginx 프록시 설치를 위한 필수 변경 사항)을 충분히 이해하고 계신지, 그리고 특히 두 Docker 컨테이너 간의 네트워크 설정을 포함한 Docker 작동 방식을 잘 숙지하고 계신지 반드시 확인해 주세요. 또한, 이는 우리가 경험이 없는 분야이므로 도움을 드릴 수 있는 범위가 제한적일 수 있다는 점도 유의해 주세요.

---

<div class="post-metadata">

### Author: ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)
#### Post date: [12월 8, 2019, 10:07오전 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/117 "2019-12-08T10:07:26Z")

</div>

이 문제가 더 이상 작동하지 않는다는 것도 깨달았습니다.

11월 초에 @fefrei님의 방식을 구현했는데, 그때는 확실히 잘 작동했습니다. 아마도 `/admin/upgrade`를 사용하는 대신 컨테이너를 수동으로 중지하고 git pull을 실행했기 때문일 수도 있습니다.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [12월 10, 2019, 9:42오후 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/118 "2019-12-10T21:42:32Z")

</div>

4개의 게시물이 새 주제로 분리되었습니다: [Add support for a native offline page when rebuilding](https://meta.discourse.org/t/add-support-for-a-native-offline-page-when-rebuilding/135605)

---

<div class="post-metadata">

### Author: ![amotl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amotl/32/109873_2.png) [@amotl](https://meta.discourse.org/u/amotl)
#### Post date: [12월 11, 2019, 3:00오전 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/119 "2019-12-11T03:00:09Z")

</div>

> [@Nacho\_Caballero](#):
>
> 이 기능이 더 이상 작동하지 않는다는 것도 깨달았습니다. 아마도 며칠 전에는 컨테이너를 수동으로 중지하고 `/admin/upgrade` 대신 `git pull`을 사용했기 때문에 작동했던 것 같습니다.

우리는 최근에 정확히 그렇게 했고, 오프라인 페이지가 **성공적으로 표시되었습니다**.

지금 우리는 `/admin/upgrade`를 통해 온라인 업그레이드를 진행했는데, Discourse가 아예 오프라인으로 전환되지 않았습니다! 이것이 최근에 개선되었든 아니든, 아니면 이번에는 운이 좋았던 것일지라도, 아무런 심각한 다운타임 없이 온라인 업그레이드가 진행되는 것을 보니 정말 좋습니다.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [12월 11, 2019, 3:02오전 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/120 "2019-12-11T03:02:24Z")

</div>

> [@amotl](#):
>
> 지금 `/admin/upgrade`를 통해 온라인 업그레이드를 진행했는데, Discourse가 전혀 오프라인이 되지 않았습니다!

Docker Manager(`/admin/upgrade`)를 통해 업그레이드를 실행하는 동안 Discourse는 절대 오프라인이 되어서는 안 됩니다. 여러분은 보통 오프라인이 됩니까? 그렇다면 해당 문제에 대해 #Support 토픽을 시작해야 합니다.

[이전 페이지](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238.md?page=4)

[다음 페이지](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238.md?page=6)
