# 在家庭互联网环境下通过Cloudflare Tunnel安装Discourse

**URL:** <https://meta.discourse.org/t/install-discourse-on-a-residential-internet-with-cloudflare-tunnel/211297>\
**Category:** Sysadmins\
**Tags:** arm, how-to, raspberry-pi, install\
**Created:** [2021年十二月7日 14:02 UTC](https://meta.discourse.org/t/install-discourse-on-a-residential-internet-with-cloudflare-tunnel/211297 "2021-12-07T14:02:07Z")\
**Posts on this page:** 1\
**Showing post:** 67

<div class="post-metadata">

**Author:** ![Sailor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sailor/32/579029_2.png) [@Sailor](https://meta.discourse.org/u/Sailor)\
**Post date:** [2025年三月2日 11:42 UTC](https://meta.discourse.org/t/install-discourse-on-a-residential-internet-with-cloudflare-tunnel/211297/67 "2025-03-02T11:42:58Z")

</div>

我刚接触这些，所以认为这两个说明似乎相互冲突

> [@Falco](#):
>
> 您唯一需要更改的是将 URL 从 `url: http://localhost:8000` 更改为 `url: http://localhost:80`。

> [@Falco](#):
>
> 并在 `env:` 部分下添加以下行：
> 
> ```plaintext
> DISCOURSE_FORCE_HTTPS: true
> 
> ```

一方面，建议隧道通过 `http://localhost:80` 与 discourse 通信，但随后设置强制所有内容通过 https？

是否建议在没有 SSL 的情况下使用端口 80 在本地工作，因为隧道将在边缘提供 SSL 握手，然后隧道到本地主机可以没有证书？

我可以通过 caddy 设置本地证书进行续订。是否有办法将密钥和证书的配置提供到 `app.yml` 中？

也许我误解了搜索结果中关于 `DISCOURSE_FORCE_HTTPS: true` 的内容，它反映了链接/图像被指示通过 https 加载，而与 Discourse 本身运行的端口/模式无关？

---

_[View the full topic](https://meta.discourse.org/t/install-discourse-on-a-residential-internet-with-cloudflare-tunnel/211297)._
